]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Dialog.h
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / Dialog.h
index 64dd73008644fb1b63c3d2fca40d0a92ae26f2d5..7b96d65390cc35eee15587f82bb9a8b53c7ba3f1 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "lfuns.h"
 
+#include <QString>
 #include <string>
 
 class QWidget;
@@ -49,13 +50,34 @@ 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.
-       Dialog(GuiView & lv, std::string const & name);
+       /// \param title is the window title used for decoration.
+       Dialog(GuiView & lv, QString const & name, QString const & title);
 
        virtual ~Dialog();
 
        virtual QWidget * asQWidget() = 0;
        virtual QWidget const * asQWidget() const = 0;
 
+       /// Session key.
+       /**
+        * This key must be used for any session setting.
+        **/
+       QString sessionKey() const;
+
+       /// Save session settings.
+       /**
+        * This default implementation saves the geometry state.
+        * Reimplement to save more settings.
+        **/
+       virtual void saveSession() const;
+
+       /// Restore session settings.
+       /**
+        * This default implementation restores the geometry state.
+        * Reimplement to restore more settings.
+        **/
+       virtual void restoreSession();
+
        /** \name Container Access
         *  These methods are publicly accessible because they are invoked
         *  by the parent container acting on commands from the LyX kernel.
@@ -108,10 +130,7 @@ public:
        //@}
 
        /// Dialog identifier.
-       /// FIXME for Andre': Now that Dialog is entirely within qt4/
-       /// We can use QString instead in order to avoid <string> inclusion
-       /// or we can pimpl name_.
-       std::string const & name() const;
+       QString name() const { return name_; }
 
        //@{
        /** Enable the controller to initialise its data structures.
@@ -230,13 +249,18 @@ public:
        //@}
 
 protected:
+       ///
+       void setTitle(QString const & title) { title_ = title; }
+       ///
        virtual void apply();
 
 private:
        /** The Dialog's name is the means by which a dialog identifies
         *  itself to the LyXView.
         */
-       std::string const name_;
+       QString const name_;
+       ///
+       QString title_;
        ///
        GuiView * lyxview_;