2016-12-29 00:40:35 -05:00
# ifndef VISIBILITYMANAGERPRIVATE_H
# define VISIBILITYMANAGERPRIVATE_H
# include "../liblattedock/dock.h"
# include "windowinfowrap.h"
2016-12-30 02:17:38 -05:00
# include "abstractwindowinterface.h"
2016-12-29 00:40:35 -05:00
# include <unordered_map>
2016-12-30 02:17:38 -05:00
# include <memory>
2016-12-29 00:40:35 -05:00
# include <QObject>
# include <QTimer>
# include <QEvent>
# include <plasmaquick/containmentview.h>
namespace Latte {
class VisibilityManager ;
/*!
* \ brief The Latte : : VisibilityManagerPrivate is a class d - pointer
*/
class VisibilityManagerPrivate : public QObject {
Q_GADGET
public :
VisibilityManagerPrivate ( PlasmaQuick : : ContainmentView * view , VisibilityManager * q ) ;
~ VisibilityManagerPrivate ( ) ;
void setMode ( Dock : : Visibility mode ) ;
2016-12-30 02:17:38 -05:00
void setIsHidden ( bool isHidden ) ;
2017-01-02 03:06:47 -05:00
void setBlockHiding ( bool blockHiding ) ;
2016-12-29 00:40:35 -05:00
void setTimerShow ( int msec ) ;
void setTimerHide ( int msec ) ;
void raiseDock ( bool raise ) ;
2017-01-02 03:06:47 -05:00
void updateHiddenState ( ) ;
2016-12-29 00:40:35 -05:00
void setDockRect ( const QRect & rect ) ;
void windowAdded ( WId id ) ;
void dodgeActive ( WId id ) ;
2016-12-30 02:17:38 -05:00
void dodgeMaximized ( WId id ) ;
2016-12-29 00:40:35 -05:00
void dodgeWindows ( WId id ) ;
void checkAllWindows ( ) ;
2016-12-30 02:17:38 -05:00
bool intersects ( const WindowInfoWrap & winfo ) ;
2016-12-29 00:40:35 -05:00
void saveConfig ( ) ;
void restoreConfig ( ) ;
bool event ( QEvent * ev ) override ;
VisibilityManager * q ;
2016-12-30 02:17:38 -05:00
PlasmaQuick : : ContainmentView * view ;
std : : unique_ptr < AbstractWindowInterface > wm ;
2017-01-02 01:04:10 -05:00
Dock : : Visibility mode { Dock : : None } ;
2016-12-29 00:40:35 -05:00
std : : array < QMetaObject : : Connection , 4 > connections ;
2016-12-30 02:17:38 -05:00
std : : unordered_map < WId , WindowInfoWrap > windows ;
2016-12-29 00:40:35 -05:00
QTimer timerShow ;
QTimer timerHide ;
QTimer timerCheckWindows ;
QRect dockRect ;
bool isHidden { false } ;
2017-01-03 12:36:40 -05:00
bool dragEnter { false } ;
2017-01-02 03:06:47 -05:00
bool blockHiding { false } ;
2016-12-29 00:40:35 -05:00
bool containsMouse { false } ;
} ;
}
# endif // VISIBILITYMANAGERPRIVATE_H