README
[n9profile] / profildialog.h
1 #ifndef PROFILDIALOG_H
2 #define PROFILDIALOG_H
3 /*! \file profildialog.h
4     \brief File .H for Class profile dialog
5 \author Jakub Šplíchal <jakub.bzouk@gmail.com>
6     Header file
7 */
8 #include <QDialog>
9
10 class QMaemo5ValueButton;
11 class Profil;
12 class QStandardItemModel;
13 class QStringList;
14 class QModelIndex;
15 class QListView;
16 class QItemSelectionModel;
17 class QMaemo5ListPickSelector;
18 class QFileInfo;
19 namespace Ui {
20     class ProfilDialog;
21 }
22
23 /*!
24   \class ProfilDialog
25   \brief Class for the dialog to create or edit profiles
26 */
27 class ProfilDialog : public QDialog {
28     Q_OBJECT
29 public:
30     ProfilDialog(QStringList  list_of_profiles_n, QWidget *parent = 0, Profil *profil = NULL,  QStandardItemModel *model = NULL);
31     ~ProfilDialog();
32
33 protected:
34     void changeEvent(QEvent *e);
35     void accept();
36
37 private:
38     Ui::ProfilDialog *ui;
39     QMaemo5ValueButton *v1;
40     QMaemo5ValueButton *v2;
41     QMaemo5ValueButton *v3;
42     QMaemo5ValueButton *v4;
43     bool update;
44
45     void createMeamoButtons();
46     void createRadioID();
47
48     int id_ButtonGroup_system;
49     int id_ButtonGroup_keyboard;
50     int id_ButtonGroup_screen;
51
52     QStandardItemModel *model_of_files;
53     bool checkFileInModelAndExist(QFileInfo inf);
54     QStringList  list_of_profiles_names;
55     Profil * profile;
56     QItemSelectionModel* selModelMobil;
57     QItemSelectionModel* selModelSMS;
58     QItemSelectionModel* selModelIM;
59     QItemSelectionModel* selModelEmail;
60
61     QListView * createListView(QItemSelectionModel * select_model);
62     QMaemo5ListPickSelector * createMeamoListPick(QListView * list_view);
63     void setSelectedItem(QMaemo5ListPickSelector * listpicker, QItemSelectionModel * selModel, QString find );
64
65 private slots:
66     void on_slider_email_volume_valueChanged(int value);
67     void on_slider_im_volume_valueChanged(int value);
68     void on_slider_sms_volume_valueChanged(int value);
69     void on_slider_ringing_volume_valueChanged(int value);
70     void on_ButtonLoadSound_clicked();
71     //    void buttonGroup_system_clicked(int);
72     //    void buttonGroup_keyboard_clicked(int);
73     //    void buttonGroup_screen_clicked(int);
74     //    void pokus_clicked(QModelIndex& );
75
76 };
77 #endif // PROFILDIALOG_H