Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/submenu.h
Show All 15 Lines | |||||
16 | * along with this program; if not, write to the * | 16 | * along with this program; if not, write to the * | ||
17 | * Free Software Foundation, Inc., * | 17 | * Free Software Foundation, Inc., * | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | 20 | | |||
21 | #ifndef SUBMENU_H | 21 | #ifndef SUBMENU_H | ||
22 | #define SUBMENU_H | 22 | #define SUBMENU_H | ||
23 | 23 | | |||
24 | #include <dialog.h> | 24 | #include <PlasmaQuick/Dialog> | ||
25 | 25 | | |||
26 | class QScreen; | 26 | class QScreen; | ||
27 | 27 | | |||
28 | class SubMenu : public PlasmaQuick::Dialog | 28 | class SubMenu : public PlasmaQuick::Dialog | ||
29 | { | 29 | { | ||
30 | Q_OBJECT | 30 | Q_OBJECT | ||
31 | 31 | | |||
32 | Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged) | 32 | Q_PROPERTY(int offset READ offset WRITE setOffset NOTIFY offsetChanged) | ||
33 | Q_PROPERTY(bool facingLeft READ facingLeft NOTIFY facingLeftChanged) | 33 | Q_PROPERTY(bool facingLeft READ facingLeft NOTIFY facingLeftChanged) | ||
34 | 34 | | |||
35 | public: | 35 | public: | ||
36 | SubMenu(QQuickItem *parent = 0); | 36 | SubMenu(QQuickItem *parent = 0); | ||
37 | ~SubMenu(); | 37 | ~SubMenu(); | ||
38 | 38 | | |||
39 | Q_INVOKABLE QRect availableScreenRectForItem(QQuickItem *item) const; | 39 | Q_INVOKABLE QRect availableScreenRectForItem(QQuickItem *item) const; | ||
40 | 40 | | |||
41 | QPoint popupPosition(QQuickItem *item, const QSize &size); | 41 | QPoint popupPosition(QQuickItem *item, const QSize &size) override; | ||
42 | 42 | | |||
43 | int offset() const; | 43 | int offset() const; | ||
44 | void setOffset(int offset); | 44 | void setOffset(int offset); | ||
45 | 45 | | |||
46 | bool facingLeft() const { return m_facingLeft; } | 46 | bool facingLeft() const { return m_facingLeft; } | ||
47 | 47 | | |||
48 | Q_SIGNALS: | 48 | Q_SIGNALS: | ||
49 | void offsetChanged() const; | 49 | void offsetChanged() const; | ||
50 | void facingLeftChanged() const; | 50 | void facingLeftChanged() const; | ||
51 | 51 | | |||
52 | private: | 52 | private: | ||
53 | int m_offset; | 53 | int m_offset; | ||
54 | bool m_facingLeft; | 54 | bool m_facingLeft; | ||
55 | }; | 55 | }; | ||
56 | 56 | | |||
57 | #endif | 57 | #endif |