popupShowing property

This commit is contained in:
Marco Martin 2012-09-20 17:07:07 +02:00
parent 708be449c3
commit 18c1cc8dab
2 changed files with 15 additions and 1 deletions

View File

@ -539,6 +539,16 @@ bool PopupAppletInterface::isPassivePopup() const
return popupApplet()->isPassivePopup();
}
bool PopupAppletInterface::isPopupShowing() const
{
return popupApplet()->isPopupShowing();
}
void PopupAppletInterface::setPopupShowing(bool show)
{
show ? popupApplet()->showPopup() : popupApplet()->hidePopup();
}
void PopupAppletInterface::togglePopup()
{
popupApplet()->togglePopup();

View File

@ -365,6 +365,7 @@ class PopupAppletInterface : public APPLETSUPERCLASS
Q_PROPERTY(bool passivePopup READ isPassivePopup WRITE setPassivePopup)
Q_PROPERTY(QGraphicsWidget *popupWidget READ popupWidget WRITE setPopupWidget)
Q_PROPERTY(QVariantHash popupIconToolTip READ popupIconToolTip WRITE setPopupIconToolTip NOTIFY popupIconToolTipChanged)
Q_PROPERTY(bool popupShowing READ isPopupShowing WRITE setPopupShowing NOTIFY popupEvent)
public:
PopupAppletInterface(AbstractJsAppletScript *parent);
@ -380,11 +381,14 @@ public:
void setPassivePopup(bool passive);
bool isPassivePopup() const;
bool isPopupShowing() const;
void setPopupShowing(bool show);
void setPopupWidget(QGraphicsWidget *widget);
QGraphicsWidget *popupWidget();
Q_SIGNALS:
void popupEvent(bool);
void popupEvent(bool popupShowing);
void popupIconToolTipChanged();
public Q_SLOTS: