mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-05 12:58:18 +03:00
The new interface as we agreed.
also VisibilityManager will perform the logic of the visibility as it corresponds through a class d-pointer using AbstractWindowInterface.
This commit is contained in:
parent
08bfa47709
commit
ed9870b624
@ -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();
|
||||
|
||||
/**
|
||||
* @brief mouseExited, emitted when mouse leaves the dock
|
||||
*/
|
||||
void mouseExited();
|
||||
void mustBeShown();
|
||||
void mustBeHide();
|
||||
|
||||
void modeChanged();
|
||||
void isHiddenChanged();
|
||||
void containsMouseChanged();
|
||||
void timerShowChanged();
|
||||
void timerHideChanged();
|
||||
void stateChanged();
|
||||
|
||||
private:
|
||||
VisibilityManagerPrivate *const d;
|
||||
};
|
||||
#endif // VISIBILITYMANAGER_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user