X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=widgets%2Fdyalog.h;h=ffbb2314b6abd6b52137722fcd666e9ca28fc39b;hb=207298bf65c031a7aa144685a2646308ece0c5ab;hp=46ee5c6300fa1e7341d7c0eaacfefdf13653754a;hpb=ce6494ae4866eb8d11d8c2827cce69e0dcc91e02;p=dorian diff --git a/widgets/dyalog.h b/widgets/dyalog.h index 46ee5c6..ffbb231 100644 --- a/widgets/dyalog.h +++ b/widgets/dyalog.h @@ -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