Increase heap size on Symbian.
[dorian] / widgets / dyalog.h
1 #ifndef DYALOG_H
2 #define DYALOG_H
3
4 #include <QDialog>
5 #include <QDialogButtonBox>
6
7 class QWidget;
8 class QPushButton;
9 class QScrollArea;
10 class QVBoxLayout;
11 class QMenuBar;
12 class QAction;
13
14 /** Maemo- and Mac-friendly dialog box. */
15 class Dyalog:
16         public QDialog
17 {
18     Q_OBJECT
19
20 public:
21     explicit Dyalog(QWidget *parent, bool showButtons = true);
22
23     /** Add widget to the scrollable content pane. */
24     void addWidget(QWidget *widget);
25
26     /** Add stretch to the scrollable content pane. */
27     void addStretch(int stretch = 0);
28
29     /** Add button to the dialog button box. */
30     void addButton(const QString &label, QObject *receiver, const char *slot,
31         QDialogButtonBox::ButtonRole role = QDialogButtonBox::AcceptRole);
32
33 public slots:
34 #ifdef Q_OS_SYMBIAN
35     void show();
36     int exec();
37 #endif
38
39 private:
40     QScrollArea *scroller;
41     QWidget *content;
42     QVBoxLayout *contentLayout;
43     QDialogButtonBox *buttonBox;
44     bool showButtons;
45 #ifdef Q_OS_SYMBIAN
46     QAction *leftSoftKey;
47     QMenuBar *menuBar;
48 #endif
49 };
50
51 #endif // DYALOG_H