New version. Update home page link in About box.
[dorian] / widgets / dyalog.h
index 46ee5c6..ffbb231 100644 (file)
@@ -8,14 +8,17 @@ class QWidget;
 class QPushButton;
 class QScrollArea;
 class QVBoxLayout;
+class QMenuBar;
+class QAction;
 
 /** Maemo- and Mac-friendly dialog box. */
-class Dyalog: public QDialog
+class Dyalog:
+        public QDialog
 {
     Q_OBJECT
 
 public:
-    explicit Dyalog(QWidget *parent = 0);
+    explicit Dyalog(QWidget *parent, bool showButtons = true);
 
     /** Add widget to the scrollable content pane. */
     void addWidget(QWidget *widget);
@@ -24,17 +27,25 @@ public:
     void addStretch(int stretch = 0);
 
     /** Add button to the dialog button box. */
-    void addButton(QPushButton *button,
+    void addButton(const QString &label, QObject *receiver, const char *slot,
         QDialogButtonBox::ButtonRole role = QDialogButtonBox::AcceptRole);
 
-    /** Add standard button to the dialog button box. */
-    QPushButton *addButton(QDialogButtonBox::StandardButton button);
+public slots:
+#ifdef Q_OS_SYMBIAN
+    void show();
+    int exec();
+#endif
 
-protected:
+private:
     QScrollArea *scroller;
     QWidget *content;
     QVBoxLayout *contentLayout;
     QDialogButtonBox *buttonBox;
+    bool showButtons;
+#ifdef Q_OS_SYMBIAN
+    QAction *leftSoftKey;
+    QMenuBar *menuBar;
+#endif
 };
 
 #endif // DYALOG_H