expose correctly useConfiguring
This commit is contained in:
parent
0ddc59af24
commit
b690e612cc
@ -67,6 +67,8 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
|
||||
applet(), &Plasma::Applet::configNeedsSaving);
|
||||
connect(applet(), &Plasma::Applet::immutabilityChanged,
|
||||
this, &AppletInterface::immutableChanged);
|
||||
connect(applet(), &Plasma::Applet::userConfiguringChanged,
|
||||
this, &AppletInterface::userConfiguringChanged);
|
||||
|
||||
connect(applet(), &Plasma::Applet::statusChanged,
|
||||
this, &AppletInterface::statusChanged);
|
||||
@ -78,6 +80,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
|
||||
connect(m_appletScriptEngine, &DeclarativeAppletScript::contextChanged,
|
||||
this, &AppletInterface::contextChanged);
|
||||
|
||||
|
||||
m_qmlObject = new QmlObject(this);
|
||||
m_qmlObject->setInitializationDelayed(true);
|
||||
|
||||
@ -458,8 +461,7 @@ bool AppletInterface::immutable() const
|
||||
|
||||
bool AppletInterface::userConfiguring() const
|
||||
{
|
||||
//FIXME
|
||||
return false;
|
||||
return applet()->isUserConfiguring();
|
||||
}
|
||||
|
||||
int AppletInterface::apiVersion() const
|
||||
|
@ -63,7 +63,7 @@ class AppletInterface : public QQuickItem
|
||||
Q_PROPERTY(bool expanded WRITE setExpanded READ isExpanded NOTIFY expandedChanged)
|
||||
Q_PROPERTY(Plasma::Types::BackgroundHints backgroundHints WRITE setBackgroundHints READ backgroundHints NOTIFY backgroundHintsChanged)
|
||||
Q_PROPERTY(bool immutable READ immutable NOTIFY immutableChanged)
|
||||
Q_PROPERTY(bool userConfiguring READ userConfiguring) // @since 4.5
|
||||
Q_PROPERTY(bool userConfiguring READ userConfiguring NOTIFY userConfiguringChanged)
|
||||
Q_PROPERTY(int apiVersion READ apiVersion CONSTANT)
|
||||
Q_PROPERTY(Plasma::Types::ItemStatus status READ status WRITE setStatus NOTIFY statusChanged)
|
||||
Q_PROPERTY(QString associatedApplication WRITE setAssociatedApplication READ associatedApplication)
|
||||
@ -185,6 +185,7 @@ Q_SIGNALS:
|
||||
void implicitHeightChanged();
|
||||
void fillWidthChanged();
|
||||
void fillHeightChanged();
|
||||
void userConfiguringChanged();
|
||||
|
||||
protected:
|
||||
void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
|
||||
|
@ -265,6 +265,7 @@ ConfigView::ConfigView(Plasma::Applet *applet, QWindow *parent)
|
||||
: QQuickView(parent),
|
||||
m_applet(applet)
|
||||
{
|
||||
applet->setUserConfiguring(true);
|
||||
qmlRegisterType<ConfigModel>("org.kde.plasma.configuration", 2, 0, "ConfigModel");
|
||||
qmlRegisterType<ConfigCategory>("org.kde.plasma.configuration", 2, 0, "ConfigCategory");
|
||||
|
||||
@ -300,6 +301,7 @@ ConfigView::ConfigView(Plasma::Applet *applet, QWindow *parent)
|
||||
|
||||
ConfigView::~ConfigView()
|
||||
{
|
||||
m_applet->setUserConfiguring(false);
|
||||
}
|
||||
|
||||
void ConfigView::init()
|
||||
|
Loading…
Reference in New Issue
Block a user