a property in Applet to tell if the user is configuring
pure model, doesn't actually carry the config dialog, but serves as bookkeeping
This commit is contained in:
parent
98612b983d
commit
590cb7baa7
@ -409,6 +409,21 @@ void Applet::setConfigurationRequired(bool needsConfig, const QString &reason)
|
|||||||
d->showConfigurationRequiredMessage(needsConfig, reason);
|
d->showConfigurationRequiredMessage(needsConfig, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Applet::isUserConfiguring() const
|
||||||
|
{
|
||||||
|
return d->userConfiguring;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Applet::setUserConfiguring(bool configuring)
|
||||||
|
{
|
||||||
|
if (configuring == d->userConfiguring) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
d->userConfiguring = configuring;
|
||||||
|
emit userConfiguringChanged(configuring);
|
||||||
|
}
|
||||||
|
|
||||||
Types::ItemStatus Applet::status() const
|
Types::ItemStatus Applet::status() const
|
||||||
{
|
{
|
||||||
return d->itemStatus;
|
return d->itemStatus;
|
||||||
@ -465,10 +480,6 @@ void Applet::flushPendingConstraintsEvents()
|
|||||||
|
|
||||||
d->updateShortcuts();
|
d->updateShortcuts();
|
||||||
Containment *cont = containment();
|
Containment *cont = containment();
|
||||||
Corona *corona = 0;
|
|
||||||
if (cont) {
|
|
||||||
corona = cont->corona();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c & Plasma::Types::ImmutableConstraint) {
|
if (c & Plasma::Types::ImmutableConstraint) {
|
||||||
|
@ -209,6 +209,18 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
*/
|
*/
|
||||||
bool configurationRequired() const;
|
bool configurationRequired() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true when the configuration interface is being shown
|
||||||
|
* @since 4.5
|
||||||
|
*/
|
||||||
|
bool isUserConfiguring() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tells the applet the user is configuring
|
||||||
|
* @param configuring true if the configuration ui is showing
|
||||||
|
*/
|
||||||
|
void setUserConfiguring(bool configuring);
|
||||||
|
|
||||||
//UTILS
|
//UTILS
|
||||||
/**
|
/**
|
||||||
* Accessor for the associated Package object if any.
|
* Accessor for the associated Package object if any.
|
||||||
@ -376,6 +388,11 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
*/
|
*/
|
||||||
void configNeedsSaving();
|
void configNeedsSaving();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* emitted when the config ui appears or disappears
|
||||||
|
*/
|
||||||
|
void userConfiguringChanged(bool configuring);
|
||||||
|
|
||||||
//ACTIONS
|
//ACTIONS
|
||||||
/**
|
/**
|
||||||
* Emitted when activation is requested due to, for example, a global
|
* Emitted when activation is requested due to, for example, a global
|
||||||
@ -389,7 +406,7 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
* Emitted when the applet is deleted
|
* Emitted when the applet is deleted
|
||||||
*/
|
*/
|
||||||
void appletDeleted(Plasma::Applet *applet);
|
void appletDeleted(Plasma::Applet *applet);
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
//BOOKKEEPING
|
//BOOKKEEPING
|
||||||
/**
|
/**
|
||||||
|
@ -68,7 +68,8 @@ AppletPrivate::AppletPrivate(KService::Ptr service, const KPluginInfo *info, int
|
|||||||
needsConfig(false),
|
needsConfig(false),
|
||||||
started(false),
|
started(false),
|
||||||
globalShortcutEnabled(false),
|
globalShortcutEnabled(false),
|
||||||
uiReady(false)
|
uiReady(false),
|
||||||
|
userConfiguring(false)
|
||||||
{
|
{
|
||||||
if (appletId == 0) {
|
if (appletId == 0) {
|
||||||
appletId = ++s_maxAppletId;
|
appletId = ++s_maxAppletId;
|
||||||
|
@ -116,6 +116,7 @@ public:
|
|||||||
bool started : 1;
|
bool started : 1;
|
||||||
bool globalShortcutEnabled : 1;
|
bool globalShortcutEnabled : 1;
|
||||||
bool uiReady : 1;
|
bool uiReady : 1;
|
||||||
|
bool userConfiguring : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Plasma namespace
|
} // Plasma namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user