properties++
This commit is contained in:
parent
84b3eaf0c1
commit
a81c44d376
@ -141,7 +141,6 @@ void ContainmentActions::contextEvent(QEvent *event)
|
|||||||
|
|
||||||
QList<QAction*> ContainmentActions::contextualActions()
|
QList<QAction*> ContainmentActions::contextualActions()
|
||||||
{
|
{
|
||||||
//empty list
|
|
||||||
return QList<QAction*>();
|
return QList<QAction*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,8 +156,10 @@ bool ContainmentActions::configurationRequired() const
|
|||||||
|
|
||||||
void ContainmentActions::setConfigurationRequired(bool needsConfig)
|
void ContainmentActions::setConfigurationRequired(bool needsConfig)
|
||||||
{
|
{
|
||||||
//TODO: reason?
|
if (d->needsConfig != needsConfig) {
|
||||||
d->needsConfig = needsConfig;
|
d->needsConfig = needsConfig;
|
||||||
|
emit configurationRequiredChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ContainmentActions::eventToString(QEvent *event)
|
QString ContainmentActions::eventToString(QEvent *event)
|
||||||
|
@ -54,9 +54,10 @@ class ContainmentActionsPrivate;
|
|||||||
class PLASMA_EXPORT ContainmentActions : public QObject
|
class PLASMA_EXPORT ContainmentActions : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString name READ name)
|
Q_PROPERTY(QString name READ name CONSTANT)
|
||||||
Q_PROPERTY(QString pluginName READ pluginName)
|
Q_PROPERTY(QString pluginName READ pluginName CONSTANT)
|
||||||
Q_PROPERTY(QString icon READ icon)
|
Q_PROPERTY(QString icon READ icon CONSTANT)
|
||||||
|
Q_PROPERTY(bool configurationRequired READ configurationRequired NOTIFY configurationRequiredChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@ -126,7 +127,7 @@ class PLASMA_EXPORT ContainmentActions : public QObject
|
|||||||
* for example, when right-clicking an applet, the "Activity Options" submenu is populated
|
* for example, when right-clicking an applet, the "Activity Options" submenu is populated
|
||||||
* with this.
|
* with this.
|
||||||
*/
|
*/
|
||||||
virtual QList<QAction*> contextualActions();
|
Q_INVOKABLE virtual QList<QAction*> contextualActions();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the given DataEngine
|
* Loads the given DataEngine
|
||||||
@ -166,6 +167,12 @@ class PLASMA_EXPORT ContainmentActions : public QObject
|
|||||||
*/
|
*/
|
||||||
void setContainment(Containment *newContainment);
|
void setContainment(Containment *newContainment);
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
/**
|
||||||
|
* Emitted when @see configurationRequired() changes
|
||||||
|
*/
|
||||||
|
void configurationRequiredChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* This constructor is to be used with the plugin loading systems
|
* This constructor is to be used with the plugin loading systems
|
||||||
|
Loading…
Reference in New Issue
Block a user