Mercurial > octave
diff gui/src/FileEditorMdiSubWindow.h @ 13524:8c143d6d0330
gui-editor: improved behaviour when closing a modified file
author | ttl (Torsten) <ttl@justmail.de> |
---|---|
date | Wed, 20 Jul 2011 21:23:07 +0200 |
parents | c70511cf64ee |
children | 8e87f3ba3beb |
line wrap: on
line diff
--- a/gui/src/FileEditorMdiSubWindow.h Wed Jul 20 10:44:42 2011 +0200 +++ b/gui/src/FileEditorMdiSubWindow.h Wed Jul 20 21:23:07 2011 +0200 @@ -22,6 +22,7 @@ #include <QMdiSubWindow> #include <QToolBar> #include <QStatusBar> +#include <QCloseEvent> #include <Qsci/qsciscintilla.h> // Not available in the Debian repos yet! // #include <Qsci/qscilexeroctave.h> @@ -34,7 +35,9 @@ ~FileEditorMdiSubWindow (); void loadFile (QString fileName); - public slots:void newFile (); + public slots: + + void newFile (); void saveFile (); void saveFileAs (); @@ -45,6 +48,10 @@ void showToolTipRedo (); void registerModified (bool modified); + +protected: + void closeEvent(QCloseEvent *event); + private: int checkFileModified (QString msg); void construct ();