5 #include <QDialogButtonBox>
11 class QAbstractItemModel;
15 /** A window with a list and menu actions (Maemo) or buttons (non-Maemo). */
16 class ListWindow: public QMainWindow
23 * @param model Model for the list widget contents.
24 * @param parent Parent widget.
26 explicit ListWindow(QWidget *parent = 0);
29 * Set the model for the list.
31 void setModel(QAbstractItemModel *model);
34 * Add an action button to the beginning of the list.
36 void addButton(const QString &title, QObject *receiver, const char *slot,
37 const QString &iconPath = QString());
40 * Add an action to the menu.
42 QAction *addMenuAction(const QString &title, QObject *receiver,
51 void onItemActivated(const QModelIndex &);
56 QAbstractItemModel *model;
57 QList<QPushButton *> buttons;
63 #endif // LISTWINDOW_H