]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/DialogView.h
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / DialogView.h
index 058d21dbf2764118bbec7b25220744b95a1648bd..aa00f64e123af45b9d141a562a4c6d76f93de503 100644 (file)
@@ -23,41 +23,33 @@ namespace frontend {
 
 class DialogView : public QDialog, public Dialog
 {
+       Q_OBJECT
+
 public:
        /// \param lv is the access point for the dialog to the LyX kernel.
        /// \param name is the identifier given to the dialog by its parent
        /// container.
        /// \param title is the window title used for decoration.
-       DialogView(GuiView & lv, QString const & name, QString const & title)
-               : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
-       {}
+       DialogView(GuiView & lv, QString const & name, QString const & title);
 
        virtual QWidget * asQWidget() { return this; }
        virtual QWidget const * asQWidget() const { return this; }
 
 protected:
-       /// Dialog inherited methods
+       /// \name Dialog inherited methods
        //@{
        void applyView() {}
        bool initialiseParams(std::string const & /*data*/) { return true; }
        void clearParams() {}
+       bool needBufferOpen() const { return isBufferDependent(); }
        //@}
        /// Any dialog that overrides this method should make sure to call it.
-       void closeEvent(QCloseEvent * ev)
-       {
-               clearParams();
-               Dialog::disconnect();
-               ev->accept();
-       }
+       void closeEvent(QCloseEvent * ev);
        /// Any dialog that overrides this method should make sure to call it.
-       void hideEvent(QHideEvent * ev)
-       {
-               if (!ev->spontaneous()) {
-                       clearParams();
-                       Dialog::disconnect();
-                       ev->accept();
-               }
-       }
+       void hideEvent(QHideEvent * ev);
+
+protected Q_SLOTS:
+       void onBufferViewChanged() {};
 };
 
 } // namespace frontend