README
[n9profile] / controlclass.h
1 #ifndef CONTROLCLASS_H
2 #define CONTROLCLASS_H
3
4 /*! \file controlclass.h
5     \brief File .h for class ControlClass
6     \author Jakub Šplíchal <jakub.bzouk@gmail.com>
7     Header file
8 */
9
10 #include <QtCore/QObject>
11 #include <QtCore/QString>
12 #include <QWidget>
13 class QSettings;
14 class ProfileDB;
15 class TimeProfile;
16 class CalendarProfile;
17 class NetWorkProfile;
18 class TelephoneNumProfile;
19
20 /*!
21   \class ControlClass
22   \brief The ControlClass for control and setting profiles
23 */
24 class ControlClass : public QWidget{
25     Q_OBJECT
26 public:
27     ControlClass(QWidget *parent = 0);
28     ~ControlClass();
29
30     void Init( QSettings * setting);
31     ProfileDB * GetProfileDB();
32     void SetTimeProfile();
33     void SetCalendar();
34     void SetNetwork();
35     void SetTelNum();
36
37     QString GetDefaultProfile();
38     QString GetTimedProfile();
39     QString GetCalendarProfile();
40
41     void SetDefaultProfile(QString profile);
42
43 private:
44     QSettings * settings;
45     ProfileDB * p_profile_db;
46     TimeProfile * p_time_profile;
47     CalendarProfile * p_calendar_profile;
48     NetWorkProfile * p_network_profile;
49     TelephoneNumProfile * p_telenum_profil;
50
51     //names of profiles that are set
52     QString default_profile;
53     QString timer_profile;
54     QString calendar_profile;
55     QString network_profile;
56     QString telnum_profile;
57     QString actual_set_profile;
58
59     void ChooseProfile();
60
61 public slots:
62     void ChangeInProfile(QString);
63
64
65
66
67 public slots:
68     void ChangeTimedProfile(QString profile_name);
69     void ChangeCalendarProfile(QString profile_name);
70     void ChangeNetworkProfile(QString profile_name);
71     void ChangeTelNumProfile(QString profile_name);
72
73
74 signals:
75     void s_timed_profile_name(QString);
76     void s_calendar_profile_name(QString);
77     void s_network_profile_name(QString);
78
79     void s_profile_now(QString);
80 };
81
82 #endif // CONTROLCLASS_H