AdopterWindow to inherit from MainBase.
[dorian] / widgets / mainbase.h
index 62b1ba3..3c72999 100755 (executable)
@@ -1,5 +1,5 @@
-#ifndef MAINWINDOW_H\r
-#define MAINWINDOW_H\r
+#ifndef MAINBASE_H\r
+#define MAINBASE_H\r
 \r
 #include <QMainWindow>\r
 \r
@@ -8,12 +8,12 @@ class QToolBar;
 /**\r
  * Main window with a toolbar.\r
  */\r
-class MainWindow: public QMainWindow\r
+class MainBase: public QMainWindow\r
 {\r
     Q_OBJECT\r
 \r
 public:\r
-    explicit MainWindow(QWidget *parent = 0);\r
+    explicit MainBase(QWidget *parent = 0);\r
 \r
     /**\r
      * Add action that is visible on the tool bar.\r
@@ -32,9 +32,8 @@ public:
     /** Add spacing to tool bar. */\r
     void addToolBarSpace();\r
 \r
-signals:\r
-\r
 public slots:\r
+    void show();\r
 \r
 protected:\r
     /** Handle resize event: Manage tool bar visibility. */\r
@@ -43,19 +42,23 @@ protected:
     /** Handle show event: Manage tool bar visibility. */\r
     void showEvent(QShowEvent *event);\r
 \r
-#ifdef Q_OS_SYMBIAN\r
-    /** Update toolbar visibility. */\r
+    /**\r
+     * Update toolb ar visibility.\r
+     * On Symbian, the tool bar is not visible in landscape mode.\r
+     */\r
     void updateToolBar();\r
 \r
-    /** Return true in portrait mode. */\r
-    bool portrait();\r
-#endif // Q_OS_SYMBIAN\r
-\r
     /** Hide tool bar if visible. */\r
     void hideToolBar();\r
 \r
+    /** Return true if the tool bar is present and hidden. */\r
+    bool isToolBarHidden();\r
+\r
+    /** Return the height of the tool bar (or 0 if there is no tool bar). */\r
+    int toolBarHeight();\r
+\r
 private:\r
     QToolBar *toolBar;      /**< Tool bar. */\r
 };\r
 \r
-#endif // MAINWINDOW_H\r
+#endif // MAINBASE_H\r