Merge branch 'master' of /opt/src/sb1/qt/scorecard
[scorecard] / src / settings-dialog.h
1 /*
2  * Copyright (C) 2009 Sakari Poussa
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, version 2.
7  */
8 #ifndef SETTINGS_DIALOG_H
9 #define SETTINGS_DIALOG_H
10
11 #include <QDialog>
12 #include <QList>
13 #include <QStandardItemModel>
14 #ifdef Q_WS_MAEMO_5
15 #include <QMaemo5ValueButton>
16 #endif
17
18 #include "data.h"
19 #include "score-common.h"
20
21 class SettingsDialog: public QDialog
22 {
23     Q_OBJECT
24
25 public:
26     SettingsDialog(QWidget *parent = 0);
27     void init(AppSettings &conf, QList<Club *> &list);
28     void results(AppSettings &conf);
29
30 private slots:
31     void okClicked();
32
33 private:
34     void createLayout(QWidget *parent);
35     QStandardItemModel *hcpModel;
36     QStandardItemModel *homeClubModel;
37     QStandardItemModel *sortModel;
38     QStandardItemModel *defaultCoursesModel;
39     QStandardItemModel *userModeModel;
40
41     QList<Club *> clubList;
42 #ifdef Q_WS_MAEMO_5
43     QMaemo5ValueButton * hcpButton;
44     QMaemo5ValueButton * homeClubButton;
45     QMaemo5ValueButton * sortButton;
46     QMaemo5ValueButton * defaultCoursesButton;
47     QMaemo5ValueButton * userModeButton;
48 #endif
49 };
50
51 #endif