|
|
|
@ -14,9 +14,14 @@ class VisibilityManager : public QObject {
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(Latte::Dock::Visibility mode READ mode WRITE setMode NOTIFY modeChanged)
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(bool isHidden READ isHidden WRITE isHidden NOTIFY isHiddenChanged)
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged)
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(int timerShow READ timerShow WRITE setTimerShow NOTIFY timerShowChanged)
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY(int timerHide READ timerHide WRITE setTimerHide NOTIFY timerHideChanged)
|
|
|
|
|
Q_PROPERTY(Latte::Dock::VisibilityState state READ state WRITE setState NOTIFY stateChanged)
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit VisibilityManager(PlasmaQuick::ContainmentView *view);
|
|
|
|
@ -32,45 +37,21 @@ public:
|
|
|
|
|
void setTimerHide(int msec);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief show, change state to Dock::Visible when show timer is triggered.
|
|
|
|
|
*/
|
|
|
|
|
Q_INVOKABLE void show();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief showImmediately, same that show, but without timer
|
|
|
|
|
*/
|
|
|
|
|
Q_INVOKABLE void showImmediately();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief restore, change to last state, respecting the timers.
|
|
|
|
|
*/
|
|
|
|
|
Q_INVOKABLE void restore();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief showTemporarily, same that show but restores last state automatically
|
|
|
|
|
* @param msec, timeout before restoring
|
|
|
|
|
*/
|
|
|
|
|
Q_INVOKABLE void showTemporarily(int msec);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief updateDockGeometry, the geometry should be inside screen, not into window.
|
|
|
|
|
* @brief updateDockGeometry, the window geometry in absolute coordinates.
|
|
|
|
|
*/
|
|
|
|
|
void updateDockGeometry(QRect &geometry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
/**
|
|
|
|
|
* @brief mouseEntered, emitted when mouse enters the dock
|
|
|
|
|
*/
|
|
|
|
|
void mouseEntered();
|
|
|
|
|
void mustBeShown();
|
|
|
|
|
void mustBeHide();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief mouseExited, emitted when mouse leaves the dock
|
|
|
|
|
*/
|
|
|
|
|
void mouseExited();
|
|
|
|
|
|
|
|
|
|
void modeChanged();
|
|
|
|
|
void isHiddenChanged();
|
|
|
|
|
void containsMouseChanged();
|
|
|
|
|
void timerShowChanged();
|
|
|
|
|
void timerHideChanged();
|
|
|
|
|
void stateChanged();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
VisibilityManagerPrivate *const d;
|
|
|
|
|
};
|
|
|
|
|
#endif // VISIBILITYMANAGER_H
|
|
|
|
|