#include "qt_helpers.h"
#include "frontends/LyXView.h"
+#include <QCloseEvent>\r
+#include <QSettings>\r
+#include <QShowEvent>\r
+\r
using std::string;
namespace lyx {
}
+void GuiDialog::showEvent(QShowEvent * e)\r
+{\r
+ QSettings settings;\r
+ string key = name_ + "/geometry";\r
+ restoreGeometry(settings.value(key.c_str()).toByteArray());\r
+ QDialog::showEvent(e);\r
+}\r
+\r
+\r
+void GuiDialog::closeEvent(QCloseEvent * e)\r
+{\r
+ QSettings settings;\r
+ string key = name_ + "/geometry";\r
+ settings.setValue(key.c_str(), saveGeometry());\r
+ QDialog::closeEvent(e);\r
+}\r
+
} // namespace frontend
} // namespace lyx
#include <QDialog>
#include <QObject>
+class QCloseEvent;
+class QShowEvent;
+
namespace lyx {
namespace frontend {
virtual void applyView() {}
/// default: do nothing
virtual void updateContents() {}
-
+ ///
+ void closeEvent(QCloseEvent *);\r
+ ///\r
+ void showEvent(QShowEvent *);\r
+\r
protected:
/// Hide the dialog.
virtual void hideView();