proxy to setAttribute()

This commit is contained in:
Marco Martin 2011-02-25 19:00:01 +01:00
parent 8128291fee
commit fcfafcbc6e
2 changed files with 11 additions and 0 deletions

View File

@ -159,5 +159,10 @@ void DialogProxy::showPopup(QGraphicsObject *item)
emit visibleChanged();
}
void DialogProxy::setAttribute(int attribute, bool on)
{
m_dialog->setAttribute((Qt::WidgetAttribute)attribute, on);
}
#include "dialog.moc"

View File

@ -39,6 +39,10 @@ class DialogProxy : public QObject
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
public:
enum WidgetAttribute {
WA_X11NetWmWindowTypeDock = Qt::WA_X11NetWmWindowTypeDock
};
DialogProxy(QObject *parent = 0);
~DialogProxy();
@ -49,6 +53,8 @@ public:
void setVisible(const bool visible);
Q_INVOKABLE void showPopup(QGraphicsObject *item);
//FIXME:: Qt::WidgetAttribute should be already
Q_INVOKABLE void setAttribute(int attribute, bool on);
Q_SIGNALS:
void mainItemChanged();