From e2c71c3844de35f20b9c7af8c513c993cf06cebb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 19 Dec 2013 16:57:29 +0100 Subject: Check if the window is still centered once a second and move it if neccessary. This is needed to account for resolution changes while the vmChooser is being displayed. --- src/dialog.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/dialog.h') diff --git a/src/dialog.h b/src/dialog.h index 805ed08..cc3627a 100644 --- a/src/dialog.h +++ b/src/dialog.h @@ -11,6 +11,7 @@ namespace Ui { class Dialog; } +class QTimer; class Dialog : public QDialog { Q_OBJECT @@ -30,6 +31,8 @@ class Dialog : public QDialog { Ui::Dialog *ui; SessionTreeModel *model_; QSettings *pvsSettings_; + QPoint oldCenter_; + QTimer *centerTimer_; void readPVSSettings(); void writePVSSettings(); @@ -39,6 +42,7 @@ class Dialog : public QDialog { void on_pushButtonStart_clicked(); void on_pushButtonAbort_clicked(); void on_treeView_activated(QModelIndex index); + void on_centerTimer(); }; #endif // DIALOG_H -- cgit v1.2.3-55-g7522