Windows snapped to the mainwindow now move, if the mainwindow is moves

This commit is contained in:
Thomas Frauendorfer 2008-02-29 15:24:58 +01:00
parent c7531032d7
commit 77f8c332f1
4 changed files with 130 additions and 12 deletions

View file

@ -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;
};