[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/network/telepathy-accounts-kcm-plugins
From: Gustavo P. Boiko <gustavo.boiko () kdemail ! net>
Date: 2010-09-30 13:34:19
Message-ID: 20100930133419.7AEDCAC88E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1181233 by boiko:
Port the current plugins to the main/advanced config scheme
M +2 -2 butterfly/CMakeLists.txt
M +7 -11 butterfly/butterfly-account-ui.cpp
M +3 -6 butterfly/butterfly-account-ui.h
A butterfly/main-options-widget.cpp \
butterfly/mandatory-parameters-widget.cpp#1180721 [License: LGPL (v2.1+)] A \
butterfly/main-options-widget.h butterfly/mandatory-parameters-widget.h#1180721 [License: \
LGPL (v2.1+)] A butterfly/main-options-widget.ui \
butterfly/mandatory-parameters-widget.ui#1180721 D \
butterfly/mandatory-parameters-widget.cpp D \
butterfly/mandatory-parameters-widget.h D \
butterfly/mandatory-parameters-widget.ui M +3 -2 gabble/CMakeLists.txt
A gabble/advanced-options-widget.cpp [License: LGPL (v2.1+)]
A gabble/advanced-options-widget.h [License: LGPL (v2.1+)]
M +32 -32 gabble/gabble-account-ui.cpp
M +8 -6 gabble/gabble-account-ui.h
A gabble/main-options-widget.cpp gabble/mandatory-parameters-widget.cpp#1180721 \
[License: LGPL (v2.1+)] A gabble/main-options-widget.h \
gabble/mandatory-parameters-widget.h#1180721 [License: LGPL (v2.1+)] A \
gabble/main-options-widget.ui gabble/mandatory-parameters-widget.ui#1180721 D \
gabble/mandatory-parameters-widget.cpp D gabble/mandatory-parameters-widget.h
D gabble/mandatory-parameters-widget.ui
--- trunk/playground/network/telepathy-accounts-kcm-plugins/butterfly/CMakeLists.txt \
#1181232:1181233 @@ -7,11 +7,11 @@
set (kcmtelepathyaccounts_plugin_butterfly_SRCS
butterfly-account-ui-plugin.cpp
butterfly-account-ui.cpp
- mandatory-parameters-widget.cpp
+ main-options-widget.cpp
)
kde4_add_ui_files (kcmtelepathyaccounts_plugin_butterfly_SRCS
- mandatory-parameters-widget.ui
+ main-options-widget.ui
)
kde4_add_plugin (kcmtelepathyaccounts_plugin_butterfly
--- trunk/playground/network/telepathy-accounts-kcm-plugins/butterfly/butterfly-account-ui.cpp \
#1181232:1181233 @@ -20,7 +20,7 @@
#include "butterfly-account-ui.h"
-#include "mandatory-parameters-widget.h"
+#include "main-options-widget.h"
#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
@@ -42,8 +42,8 @@
kDebug();
// Register supported parameters
- registerSupportedMandatoryParameter("account", QVariant::String);
- registerSupportedMandatoryParameter("password", QVariant::String);
+ registerSupportedParameter("account", QVariant::String);
+ registerSupportedParameter("password", QVariant::String);
}
ButterflyAccountUi::~ButterflyAccountUi()
@@ -53,19 +53,15 @@
delete d;
}
-AbstractAccountParametersWidget *ButterflyAccountUi::mandatoryParametersWidget(
+AbstractAccountParametersWidget *ButterflyAccountUi::mainOptionsWidget(
Tp::ProtocolParameterList parameters,
- const QVariantMap &values) const
+ const QVariantMap &values,
+ QWidget *parent) const
{
kDebug();
- return new MandatoryParametersWidget(parameters, values);
+ return new MainOptionsWidget(parameters, values, parent);
}
-QList<AbstractAccountParametersWidget*> \
ButterflyAccountUi::optionalParametersWidgets(Tp::ProtocolParameterList parameters, const \
QVariantMap &values) const
-{
- QList<AbstractAccountParametersWidget*> list;
- return list;
-}
#include "butterfly-account-ui.moc"
--- trunk/playground/network/telepathy-accounts-kcm-plugins/butterfly/butterfly-account-ui.h \
#1181232:1181233 @@ -32,12 +32,9 @@
virtual ~ButterflyAccountUi();
virtual AbstractAccountParametersWidget
- *mandatoryParametersWidget(Tp::ProtocolParameterList parameters,
- const QVariantMap &values = QVariantMap()) const;
- virtual QList<AbstractAccountParametersWidget*>
- optionalParametersWidgets(Tp::ProtocolParameterList parameters,
- const QVariantMap &values = QVariantMap()) const;
-
+ *mainOptionsWidget(Tp::ProtocolParameterList parameters,
+ const QVariantMap &values = QVariantMap(),
+ QWidget *parent = 0) const;
private:
Q_DISABLE_COPY(ButterflyAccountUi);
--- trunk/playground/network/telepathy-accounts-kcm-plugins/gabble/CMakeLists.txt \
#1181232:1181233 @@ -7,13 +7,14 @@
set (kcmtelepathyaccounts_plugin_gabble_SRCS
gabble-account-ui-plugin.cpp
gabble-account-ui.cpp
- mandatory-parameters-widget.cpp
+ main-options-widget.cpp
+ advanced-options-widget.cpp
server-settings-widget.cpp
proxy-settings-widget.cpp
)
kde4_add_ui_files (kcmtelepathyaccounts_plugin_gabble_SRCS
- mandatory-parameters-widget.ui
+ main-options-widget.ui
server-settings-widget.ui
proxy-settings-widget.ui
)
--- trunk/playground/network/telepathy-accounts-kcm-plugins/gabble/gabble-account-ui.cpp \
#1181232:1181233 @@ -20,9 +20,8 @@
#include "gabble-account-ui.h"
-#include "mandatory-parameters-widget.h"
-#include "proxy-settings-widget.h"
-#include "server-settings-widget.h"
+#include "main-options-widget.h"
+#include "advanced-options-widget.h"
#include <KCMTelepathyAccounts/AbstractAccountParametersWidget>
@@ -44,25 +43,25 @@
kDebug();
// Register supported parameters
- registerSupportedMandatoryParameter("account", QVariant::String);
- registerSupportedMandatoryParameter("password", QVariant::String);
+ registerSupportedParameter("account", QVariant::String);
+ registerSupportedParameter("password", QVariant::String);
- registerSupportedOptionalParameter("port", QVariant::UInt);
- registerSupportedOptionalParameter("server", QVariant::String);
- registerSupportedOptionalParameter("require-encryption", QVariant::Bool);
- registerSupportedOptionalParameter("old-ssl", QVariant::Bool);
- registerSupportedOptionalParameter("low-bandwidth", QVariant::Bool);
- registerSupportedOptionalParameter("ignore-ssl-errors", QVariant::Bool);
- registerSupportedOptionalParameter("keepalive-interval", QVariant::UInt);
+ registerSupportedParameter("port", QVariant::UInt);
+ registerSupportedParameter("server", QVariant::String);
+ registerSupportedParameter("require-encryption", QVariant::Bool);
+ registerSupportedParameter("old-ssl", QVariant::Bool);
+ registerSupportedParameter("low-bandwidth", QVariant::Bool);
+ registerSupportedParameter("ignore-ssl-errors", QVariant::Bool);
+ registerSupportedParameter("keepalive-interval", QVariant::UInt);
- registerSupportedOptionalParameter("stun-server", QVariant::String);
- registerSupportedOptionalParameter("stun-port", QVariant::UInt);
- registerSupportedOptionalParameter("fallback-stun-server", QVariant::String);
- registerSupportedOptionalParameter("fallback-stun-port", QVariant::UInt);
- registerSupportedOptionalParameter("https-proxy-server", QVariant::String);
- registerSupportedOptionalParameter("https-proxy-port", QVariant::UInt);
- registerSupportedOptionalParameter("fallback-socks5-proxies", QVariant::StringList);
- registerSupportedOptionalParameter("fallback-conference-server", QVariant::String);
+ registerSupportedParameter("stun-server", QVariant::String);
+ registerSupportedParameter("stun-port", QVariant::UInt);
+ registerSupportedParameter("fallback-stun-server", QVariant::String);
+ registerSupportedParameter("fallback-stun-port", QVariant::UInt);
+ registerSupportedParameter("https-proxy-server", QVariant::String);
+ registerSupportedParameter("https-proxy-port", QVariant::UInt);
+ registerSupportedParameter("fallback-socks5-proxies", QVariant::StringList);
+ registerSupportedParameter("fallback-conference-server", QVariant::String);
}
GabbleAccountUi::~GabbleAccountUi()
@@ -72,28 +71,29 @@
delete d;
}
-AbstractAccountParametersWidget *GabbleAccountUi::mandatoryParametersWidget(
+AbstractAccountParametersWidget *GabbleAccountUi::mainOptionsWidget(
Tp::ProtocolParameterList parameters,
- const QVariantMap &values) const
+ const QVariantMap &values,
+ QWidget *parent) const
{
kDebug();
- return new MandatoryParametersWidget(parameters, values);
+ return new MainOptionsWidget(parameters, values, parent);
}
-QList<AbstractAccountParametersWidget*> GabbleAccountUi::optionalParametersWidgets(
+bool GabbleAccountUi::hasAdvancedOptionsWidget() const
+{
+ return true;
+}
+
+AbstractAccountParametersWidget *GabbleAccountUi::advancedOptionsWidget(
Tp::ProtocolParameterList parameters,
- const QVariantMap &values) const
+ const QVariantMap &values,
+ QWidget *parent) const
{
kDebug();
- QList<AbstractAccountParametersWidget*> widgets;
-
- // Add each of the optional parameter widgets.
- widgets.append(new ServerSettingsWidget(parameters, values));
- widgets.append(new ProxySettingsWidget(parameters, values));
-
- return widgets;
+ return new AdvancedOptionsWidget(parameters, values, parent);
}
--- trunk/playground/network/telepathy-accounts-kcm-plugins/gabble/gabble-account-ui.h \
#1181232:1181233 @@ -32,11 +32,14 @@
virtual ~GabbleAccountUi();
virtual AbstractAccountParametersWidget
- *mandatoryParametersWidget(Tp::ProtocolParameterList parameters,
- const QVariantMap &values = QVariantMap()) const;
- virtual QList<AbstractAccountParametersWidget*>
- optionalParametersWidgets(Tp::ProtocolParameterList parameters,
- const QVariantMap &values = QVariantMap()) const;
+ *mainOptionsWidget(Tp::ProtocolParameterList parameters,
+ const QVariantMap &values = QVariantMap(),
+ QWidget *parent = 0) const;
+ virtual bool hasAdvancedOptionsWidget() const;
+ virtual AbstractAccountParametersWidget
+ *advancedOptionsWidget(Tp::ProtocolParameterList parameters,
+ const QVariantMap &values = QVariantMap(),
+ QWidget *parent = 0) const;
private:
Q_DISABLE_COPY(GabbleAccountUi);
@@ -45,6 +48,5 @@
Private * const d;
};
-
#endif // header guard
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic