--- /dev/null
+#ifndef MAINWINDOW_H\r
+#define MAINWINDOW_H\r
+\r
+#include <QMainWindow>\r
+\r
+class QToolBar;\r
+\r
+/**\r
+ * Main window with a toolbar.\r
+ */\r
+class MainWindow: public QMainWindow\r
+{\r
+ Q_OBJECT\r
+\r
+public:\r
+ explicit MainWindow(QWidget *parent = 0);\r
+\r
+ /**\r
+ * Add action that is visible on the tool bar.\r
+ * @param receiver Object receiving "activated" signal.\r
+ * @param slot Slot receiving "activated" signal.\r
+ * @param iconName Base name of tool bar icon in resource file.\r
+ * @param text Tool bar item text.\r
+ * @param important On Symbian, only "important" actions are added to\r
+ * the tool bar. All actions are added to the Options\r
+ * menu though.\r
+ */\r
+ QAction *addToolBarAction(QObject *receiver, const char *slot,\r
+ const QString &iconName, const QString &text,\r
+ bool important = false);\r
+\r
+ /** Add spacing to tool bar. */\r
+ void addToolBarSpace();\r
+\r
+signals:\r
+\r
+public slots:\r
+\r
+protected:\r
+ /** Handle resize event: Manage tool bar visibility. */\r
+ void resizeEvent(QResizeEvent *event);\r
+\r
+ /** Handle show event: Manage tool bar visibility. */\r
+ void showEvent(QShowEvent *event);\r
+\r
+#ifdef Q_OS_SYMBIAN\r
+ /** Update toolbar visibility. */\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
+private:\r
+ QToolBar *toolBar; /**< Tool bar. */\r
+};\r
+\r
+#endif // MAINWINDOW_H\r