aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h')
-rw-r--r--src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
index 47699ae6..20491014 100644
--- a/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
+++ b/src-qt5/core/lumina-desktop-unified/src-desktop/src-widgets/NativeWindow.h
@@ -21,8 +21,21 @@ public:
public slots:
void initProperties();
+ //Mouse Interactivity
+ void startMoving();
+ void startResizing();
private:
+ //Window status
+ enum ModState{Normal, Move, ResizeTop, ResizeTopRight, ResizeRight, ResizeBottomRight, ResizeBottom, ResizeBottomLeft, ResizeLeft, ResizeTopLeft};
+ ModState activeState;
+ ModState currentCursor;
+ QPoint offset; //needed for movement calculations (offset from mouse click to movement point)
+ //Functions for getting/setting state
+ ModState getStateAtPoint(QPoint pt, bool setoffset = false); //generally used for mouse location detection
+ void setMouseCursor(ModState, bool override = false); //Update the mouse cursor based on state
+ QTimer *moveTimer;
+
//Core object
NativeWindowObject *WIN;
// Interface items
@@ -49,6 +62,18 @@ private slots:
void syncVisibility(bool init = false);
void syncWinType();
void syncGeom();
+
+protected:
+ void mousePressEvent(QMouseEvent*);
+ void mouseMoveEvent(QMouseEvent*);
+ void mouseReleaseEvent(QMouseEvent*);
+ void leaveEvent(QEvent *ev);
+ //void enterEvent(QEvent *ev);
+ void moveEvent(QMoveEvent *ev);
+
+signals:
+ void windowMoved(NativeWindowObject*);
+
};
#endif
bgstack15