diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/mdiwindow.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/mdiwindow.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/mdiwindow.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/mdiwindow.h b/SQLiteStudio3/guiSQLiteStudio/mdiwindow.h new file mode 100644 index 0000000..fd6c4dc --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/mdiwindow.h @@ -0,0 +1,43 @@ +#ifndef MDIWINDOW_H +#define MDIWINDOW_H + +#include "guiSQLiteStudio_global.h" +#include <QMdiSubWindow> +#include <QPointer> + +class MdiChild; +class MdiArea; +class Db; + +class GUI_API_EXPORT MdiWindow : public QMdiSubWindow +{ + Q_OBJECT + + public: + MdiWindow(MdiChild* mdiChild, MdiArea *mdiArea, Qt::WindowFlags flags = 0); + virtual ~MdiWindow(); + + virtual QVariant saveSession(); + virtual bool restoreSession(const QVariant& sessionValue); + + MdiChild* getMdiChild() const; + void setWidget(MdiChild* value); + bool restoreSessionNextTime(); + void rename(const QString& title); + + void changeEvent(QEvent *event); + void closeEvent(QCloseEvent* e); + + private: + bool confirmClose(); + + QPointer<QWidget> lastFocusedWidget; + MdiArea* mdiArea = nullptr; + bool dbBeingClosed = false; + + private slots: + void dbAboutToBeDisconnected(Db* db, bool& deny); + void dbDisconnected(Db* db); +}; + +#endif // MDIWINDOW_H |
