Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/tooltipdialog.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 44 | public: | |||
---|---|---|---|---|---|
45 | explicit ToolTipDialog(QQuickItem *parent = nullptr); | 45 | explicit ToolTipDialog(QQuickItem *parent = nullptr); | ||
46 | ~ToolTipDialog() override; | 46 | ~ToolTipDialog() override; | ||
47 | 47 | | |||
48 | QQuickItem *loadDefaultItem(); | 48 | QQuickItem *loadDefaultItem(); | ||
49 | 49 | | |||
50 | Plasma::Types::Direction direction() const; | 50 | Plasma::Types::Direction direction() const; | ||
51 | void setDirection(Plasma::Types::Direction loc); | 51 | void setDirection(Plasma::Types::Direction loc); | ||
52 | 52 | | |||
53 | void dismiss(); | 53 | void dismiss(QObject *owner); | ||
54 | void keepalive(); | 54 | void keepalive(); | ||
55 | 55 | | |||
56 | bool interactive(); | 56 | bool interactive(); | ||
57 | void setInteractive(bool interactive); | 57 | void setInteractive(bool interactive); | ||
58 | 58 | | |||
59 | bool autoShowHide(); | ||||
60 | void setAutoShowHide(bool autoShowHide); | ||||
61 | | ||||
62 | bool containsMouse(); | ||||
63 | void setContainsMouse(bool contains); | ||||
64 | | ||||
59 | /** | 65 | /** | ||
60 | * Basically the last one who has shown the dialog | 66 | * Basically the last one who has shown the dialog | ||
61 | */ | 67 | */ | ||
62 | QObject *owner() const; | 68 | QObject *owner() const; | ||
63 | void setOwner(QObject *owner); | 69 | void setOwner(QObject *owner); | ||
64 | 70 | | |||
71 | Q_SIGNALS: | ||||
72 | void containsMouseChanged(); | ||||
73 | | ||||
65 | protected: | 74 | protected: | ||
66 | void showEvent(QShowEvent *event) override; | 75 | void showEvent(QShowEvent *event) override; | ||
67 | void hideEvent(QHideEvent *event) override; | 76 | void hideEvent(QHideEvent *event) override; | ||
68 | void resizeEvent(QResizeEvent *re) override; | 77 | void resizeEvent(QResizeEvent *re) override; | ||
69 | bool event(QEvent *e) override; | 78 | bool event(QEvent *e) override; | ||
70 | 79 | | |||
71 | private Q_SLOTS: | 80 | private Q_SLOTS: | ||
72 | void valueChanged(const QVariant &value); | 81 | void valueChanged(const QVariant &value); | ||
73 | 82 | | |||
74 | private: | 83 | private: | ||
75 | KDeclarative::QmlObject *m_qmlObject; | 84 | KDeclarative::QmlObject *m_qmlObject; | ||
76 | QTimer *m_showTimer; | 85 | QTimer *m_showTimer; | ||
77 | int m_hideTimeout; | 86 | int m_hideTimeout; | ||
78 | bool m_interactive; | 87 | bool m_interactive; | ||
88 | bool m_autoShowHide; | ||||
89 | bool m_containsMouse; | ||||
79 | QObject *m_owner; | 90 | QObject *m_owner; | ||
80 | }; | 91 | }; | ||
81 | 92 | | |||
82 | #endif | 93 | #endif |