Merge branch 'master' into sebas/themeswitch2
This commit is contained in:
commit
b2ead1fe09
@ -40,6 +40,8 @@ Units::Units (QObject *parent)
|
||||
: QObject(parent),
|
||||
m_gridUnit(-1),
|
||||
m_devicePixelRatio(-1),
|
||||
m_smallSpacing(-1),
|
||||
m_largeSpacing(-1),
|
||||
m_longDuration(defaultLongDuration) // default base value for animations
|
||||
{
|
||||
m_iconSizes = new QQmlPropertyMap(this);
|
||||
|
@ -171,6 +171,44 @@ void AppletInterface::setTitle(const QString &title)
|
||||
emit titleChanged();
|
||||
}
|
||||
|
||||
QString AppletInterface::toolTipMainText() const
|
||||
{
|
||||
if (m_toolTipMainText.isNull()) {
|
||||
return title();
|
||||
} else {
|
||||
return m_toolTipMainText;
|
||||
}
|
||||
}
|
||||
|
||||
void AppletInterface::setToolTipMainText(const QString &text)
|
||||
{
|
||||
if (m_toolTipMainText == text) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_toolTipMainText = text;
|
||||
emit toolTipMainTextChanged();
|
||||
}
|
||||
|
||||
QString AppletInterface::toolTipSubText() const
|
||||
{
|
||||
if (m_toolTipMainText.isNull()) {
|
||||
return applet()->pluginInfo().comment();
|
||||
} else {
|
||||
return m_toolTipSubText;
|
||||
}
|
||||
}
|
||||
|
||||
void AppletInterface::setToolTipSubText(const QString &text)
|
||||
{
|
||||
if (m_toolTipSubText == text) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_toolTipSubText = text;
|
||||
emit toolTipSubTextChanged();
|
||||
}
|
||||
|
||||
bool AppletInterface::isBusy() const
|
||||
{
|
||||
return m_busy;
|
||||
|
@ -67,6 +67,18 @@ class AppletInterface : public AppletQuickItem
|
||||
*/
|
||||
Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
|
||||
|
||||
/**
|
||||
* Main title for the plasmoid tooltip or other means of quick information:
|
||||
* it's the same as the title property by default, but it can be personalized
|
||||
*/
|
||||
Q_PROPERTY(QString toolTipMainText READ toolTipMainText WRITE setToolTipMainText NOTIFY toolTipMainTextChanged)
|
||||
|
||||
/**
|
||||
* Description for the plasmoid tooltip or other means of quick information:
|
||||
* it comes from the pluginifo comment by default, but it can be personalized
|
||||
*/
|
||||
Q_PROPERTY(QString toolTipSubText READ toolTipSubText WRITE setToolTipSubText NOTIFY toolTipSubTextChanged)
|
||||
|
||||
/**
|
||||
* Icon to represent the plasmoid
|
||||
*/
|
||||
@ -230,6 +242,12 @@ public:
|
||||
QString title() const;
|
||||
void setTitle(const QString &title);
|
||||
|
||||
QString toolTipMainText() const;
|
||||
void setToolTipMainText(const QString &text);
|
||||
|
||||
QString toolTipSubText() const;
|
||||
void setToolTipSubText(const QString &text);
|
||||
|
||||
uint id() const;
|
||||
|
||||
Plasma::Types::FormFactor formFactor() const;
|
||||
@ -278,6 +296,8 @@ Q_SIGNALS:
|
||||
//PROPERTY change notifiers--------------
|
||||
void iconChanged();
|
||||
void titleChanged();
|
||||
void toolTipMainTextChanged();
|
||||
void toolTipSubTextChanged();
|
||||
void formFactorChanged();
|
||||
void locationChanged();
|
||||
void contextChanged();
|
||||
@ -307,6 +327,8 @@ private:
|
||||
//UI-specific members ------------------
|
||||
|
||||
|
||||
QString m_toolTipMainText;
|
||||
QString m_toolTipSubText;
|
||||
Plasma::Types::BackgroundHints m_backgroundHints;
|
||||
bool m_busy : 1;
|
||||
bool m_hideOnDeactivate : 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user