expose Applet::id() in the plasmoid object
We need this in the containment to do our book-keeping, if we just guess the applet id, we don't know which containment is passed into addApplet(), so we can't know where to restore it. So we use applet.id to match a geometry saved to the config with the applet that is being loaded.
This commit is contained in:
parent
fbf4ada101
commit
729c3fed2d
@ -209,6 +209,11 @@ QString AppletInterface::title() const
|
||||
return applet()->title();
|
||||
}
|
||||
|
||||
uint AppletInterface::id() const
|
||||
{
|
||||
return applet()->id();
|
||||
}
|
||||
|
||||
void AppletInterface::setTitle(const QString &title)
|
||||
{
|
||||
if (applet()->title() == title) {
|
||||
|
@ -60,6 +60,7 @@ class AppletInterface : public QQuickItem
|
||||
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
|
||||
//TODO: writable icon
|
||||
Q_PROPERTY(QString icon READ icon CONSTANT)
|
||||
Q_PROPERTY(uint id READ id CONSTANT)
|
||||
Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged)
|
||||
Q_PROPERTY(Location location READ location NOTIFY locationChanged)
|
||||
Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged)
|
||||
@ -183,6 +184,8 @@ enum IntervalAlignment {
|
||||
QString title() const;
|
||||
void setTitle(const QString &title);
|
||||
|
||||
uint id() const;
|
||||
|
||||
FormFactor formFactor() const;
|
||||
|
||||
Location location() const;
|
||||
|
Loading…
Reference in New Issue
Block a user