]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/DialogView.h
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / DialogView.h
index 36f3ef2f0892e327735ee92eb82f40da7217683e..d34b83dff28f375f41060e88402a3ce4cd6545c9 100644 (file)
 #define DIALOGVIEW_H
 
 #include "Dialog.h"
+#include "GuiView.h"
 
 #include <QDialog>
 
-class QCloseEvent;
-class QShowEvent;
-
 namespace lyx {
 namespace frontend {
 
@@ -27,26 +25,25 @@ 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.
-       explicit DialogView(GuiView & lv, std::string const & name);
-       virtual ~DialogView() {}
+       /// \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)
+       {}
 
        virtual QWidget * asQWidget() { return this; }
        virtual QWidget const * asQWidget() const { return this; }
 
-public:
-       ///
-       void setViewTitle(docstring const & title);
-
-       ///
-       void closeEvent(QCloseEvent *);
-       ///
-       void showEvent(QShowEvent *);
+protected:
+       /// Dialog inherited methods
+       //@{
+       void applyView() {}
+       bool initialiseParams(std::string const & /*data*/) { return true; }
+       void clearParams() {}
+       //@}
 };
 
 } // namespace frontend