always emit Containment::requestConfiguration()
emit that signal when the configure action is treggered for each applet, the applet pointer to the interested applet is passed is the first step for moving config ui i the sell
This commit is contained in:
parent
0fbe46415c
commit
79d5724ef1
@ -364,7 +364,6 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
* @since 4.4
|
||||
*/
|
||||
void statusChanged(Plasma::ItemStatus status);
|
||||
|
||||
|
||||
//CONFIGURATION
|
||||
/**
|
||||
@ -571,6 +570,7 @@ class PLASMA_EXPORT Applet : public QObject
|
||||
Q_PRIVATE_SLOT(d, void updateShortcuts())
|
||||
Q_PRIVATE_SLOT(d, void globalShortcutChanged())
|
||||
Q_PRIVATE_SLOT(d, void propagateConfigChanged())
|
||||
Q_PRIVATE_SLOT(d, void requestConfiguration())
|
||||
|
||||
AppletPrivate *const d;
|
||||
|
||||
|
@ -241,9 +241,9 @@ Q_SIGNALS:
|
||||
void screenChanged(int wasScreen, int isScreen, Plasma::Containment *containment);
|
||||
|
||||
/**
|
||||
* Emitted when the user wants to configure/change containment.
|
||||
* Emitted when the user wants to configure/change the containment, or an applet inside it.
|
||||
*/
|
||||
void configureRequested(Plasma::Containment *containment);
|
||||
void configureRequested(Plasma::Applet *applet);
|
||||
|
||||
/**
|
||||
* Emitted when the wallpaper plugin is changed
|
||||
@ -319,7 +319,6 @@ Q_SIGNALS:
|
||||
|
||||
Q_PRIVATE_SLOT(d, void appletDeleted(Plasma::Applet*))
|
||||
Q_PRIVATE_SLOT(d, void triggerShowAddWidgets())
|
||||
Q_PRIVATE_SLOT(d, void requestConfiguration())
|
||||
Q_PRIVATE_SLOT(d, void checkStatus(Plasma::ItemStatus))
|
||||
|
||||
friend class Applet;
|
||||
|
@ -73,6 +73,8 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
|
||||
} else if (appletId > s_maxAppletId) {
|
||||
s_maxAppletId = appletId;
|
||||
}
|
||||
QObject::connect(actions->action("configure"), SIGNAL(QAction::triggered()),
|
||||
q, SLOT(Applet::requestConfiguration));
|
||||
}
|
||||
|
||||
AppletPrivate::~AppletPrivate()
|
||||
@ -221,6 +223,13 @@ KActionCollection* AppletPrivate::defaultActions(QObject *parent)
|
||||
return actions;
|
||||
}
|
||||
|
||||
void AppletPrivate::requestConfiguration()
|
||||
{
|
||||
if (q->containment()) {
|
||||
emit q->containment()->configureRequested(q);
|
||||
}
|
||||
}
|
||||
|
||||
void AppletPrivate::updateShortcuts()
|
||||
{
|
||||
if (isContainment) {
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
|
||||
static KActionCollection* defaultActions(QObject *parent);
|
||||
|
||||
void requestConfiguration();
|
||||
|
||||
static uint s_maxAppletId;
|
||||
|
||||
|
@ -161,11 +161,6 @@ void ContainmentPrivate::configChanged()
|
||||
q->setWallpaper(group.readEntry("wallpaperplugin", defaultWallpaper));
|
||||
}
|
||||
|
||||
void ContainmentPrivate::requestConfiguration()
|
||||
{
|
||||
emit q->configureRequested(q);
|
||||
}
|
||||
|
||||
void ContainmentPrivate::checkStatus(Plasma::ItemStatus appletStatus)
|
||||
{
|
||||
//kDebug() << "================== "<< appletStatus << q->status();
|
||||
|
@ -65,7 +65,6 @@ public:
|
||||
}
|
||||
|
||||
void triggerShowAddWidgets();
|
||||
void requestConfiguration();
|
||||
void checkStatus(Plasma::ItemStatus status);
|
||||
void setScreen(int newScreen);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user