Windows snapped to the mainwindow now move, if the mainwindow is moves
This commit is contained in:
parent
c7531032d7
commit
77f8c332f1
4 changed files with 130 additions and 12 deletions
|
|
@ -21,20 +21,23 @@
|
|||
class QMouseEvent;
|
||||
class QPoint;
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class BaseWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BaseWindow (QWidget *parent);
|
||||
|
||||
bool touches (QWidget *);
|
||||
MainWindow * mw ();
|
||||
|
||||
protected:
|
||||
void mousePressEvent (QMouseEvent *event);
|
||||
void mouseReleaseEvent (QMouseEvent *event);
|
||||
void mouseMoveEvent (QMouseEvent *event);
|
||||
|
||||
QPoint snapWindow (QPoint pos);
|
||||
|
||||
private:
|
||||
QPoint snapWindow (QPoint pos, QWidgetList ignore = QWidgetList());
|
||||
QPoint m_diff;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue