]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/Qt2Base.h
Get rid of the static_casts.
[lyx.git] / src / frontends / qt2 / Qt2Base.h
index e771848b7d6f88312f2bbad8c86296c7e1f0d753..027911319f1485e35a55388626eaaa2055a9b2ed 100644 (file)
@@ -12,9 +12,6 @@
 #ifndef QT2BASE_H
 #define QT2BASE_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "ViewBase.h"
 #include <boost/scoped_ptr.hpp>
@@ -28,15 +25,13 @@ class Qt2BC;
 
 /** This class is an Qt2 GUI base class.
  */
-class Qt2Base : public QObject, public ViewBase
-{
+class Qt2Base : public QObject, public ViewBase {
        Q_OBJECT
 public:
        ///
-       Qt2Base(QString const &);
+       Qt2Base(string const &);
        ///
        virtual ~Qt2Base() {}
-
 protected:
        /// build the actual dialog
        virtual void build_dialog() = 0;
@@ -46,6 +41,8 @@ protected:
        virtual void show();
        /// update the dialog's contents
        virtual void update_contents() = 0;
+       ///
+       virtual bool isVisible() const;
 
        /// the dialog has changed contents
        virtual void changed();
@@ -54,11 +51,10 @@ protected:
        virtual bool isValid();
 
        ///
-       Qt2BC & bc();
+       Qt2BC & bcview();
 
        /// are we updating ?
        bool updating_;
-
 protected slots:
        // dialog closed from WM
        void slotWMHide();
@@ -74,22 +70,16 @@ protected slots:
 
        // Close button clicked
        void slotClose();
-
 private:
-       /// Pointer to the actual instantiation of xform's form
+       /// Pointer to the actual instantiation of the Qt dialog
        virtual QDialog * form() const = 0;
-
-private:
-       /// dialog title, displayed by WM.
-       QString title_;
 };
 
 
 template <class Dialog>
-class Qt2DB: public Qt2Base
-{
+class Qt2DB: public Qt2Base {
 protected:
-       Qt2DB(QString const &);
+       Qt2DB(string const &);
 
        /// update the dialog
        virtual void update();
@@ -107,7 +97,7 @@ protected:
 
 
 template <class Dialog>
-Qt2DB<Dialog>::Qt2DB(QString const & t)
+Qt2DB<Dialog>::Qt2DB(string const & t)
        : Qt2Base(t)
 {}
 
@@ -158,18 +148,19 @@ public:
                return controller().bufferIsReadonly();
        }
 
-protected:
-       ///
-       Qt2CB(QString const &);
        /// The parent controller
        Controller & controller();
        /// The parent controller
        Controller const & controller() const;
+
+protected:
+       ///
+       Qt2CB(string const &);
 };
 
 
 template <class Controller, class Base>
-Qt2CB<Controller, Base>::Qt2CB(QString const & t)
+Qt2CB<Controller, Base>::Qt2CB(string const & t)
        : Base(t)
 {}