README
[n9profile] / profil.h
1 #ifndef PROFIL_H
2 #define PROFIL_H
3 /*! \file profildow.h
4     \brief File .H for Class Profile
5 \author Jakub Šplíchal <jakub.bzouk@gmail.com>
6     Header file
7 */
8 #include <QtCore/QList>
9 #include <QtCore/QString>
10 #include <QtCore/QVariant>
11
12
13 struct ProfileValue
14 {
15     QString key;
16     QVariant value;
17     QString type;
18 };
19
20 /*!
21   \class Profil
22   \brief Class is used only for data storage as they are in the profiles and their transfer between objects.
23 */
24 class Profil
25 {
26 public:
27     //! Profil(QString name).
28     /*!
29       The constructor receives the name of the profile
30       \param name Profile Name
31     */
32     Profil(QString name);
33     ~Profil();
34     QList<ProfileValue*>* ListOfValues(); /**< returns a list of links to data in the profile */
35     bool SetValue(QString key, QString value);
36     QString GetName();
37
38     QVariant  GetCalendarAlarmEnabled();
39     QVariant  GetClockAlarmEnabled();
40     QVariant  GetEmailAlertTone();
41     QVariant  GetEmailAlertVolume();
42     QVariant  GetImAlertTone();
43     QVariant  GetImAlertVolume();
44     QVariant  GetKeypadSoundLevel();
45     QVariant  GetRingingAlertTone();
46     QVariant  GetRingingAlertType();
47     QVariant  GetRingingAlertVolume();
48     QVariant  GetSmsAlertTone();
49     QVariant  GetSmsAlertVolume();
50     QVariant  GetSystemSoundLevel();
51     QVariant  GetTouchscreenSoundLevel();
52     QVariant  GetVibratingAlertEnabled();
53
54     void  SetName(QString);
55     void  SetCalendarAlarmEnabled(QVariant);
56     void  SetClockAlarmEnabled(QVariant);
57     void  SetEmailAlertTone(QVariant);
58     void  SetEmailAlertVolume(QVariant);
59     void  SetImAlertTone(QVariant);
60     void  SetImAlertVolume(QVariant);
61     void  SetKeypadSoundLevel(QVariant);
62     void  SetRingingAlertTone(QVariant);
63     void  SetRingingAlertType(QVariant);
64     void  SetRingingAlertVolume(QVariant);
65     void  SetSmsAlertTone(QVariant);
66     void  SetSmsAlertVolume(QVariant);
67     void  SetSystemSoundLevel(QVariant);
68     void  SetTouchscreenSoundLevel(QVariant);
69     void  SetVibratingAlertEnabled(QVariant);
70
71 private:
72     QString m_name_of_profile;
73     struct  ProfileValue calendar_alarm_enabled;
74     struct  ProfileValue clock_alarm_enabled;
75     struct  ProfileValue email_alert_tone;
76     struct  ProfileValue email_alert_volume;
77     struct  ProfileValue im_alert_tone;
78     struct  ProfileValue im_alert_volume;
79     struct  ProfileValue keypad_sound_level;
80     struct  ProfileValue ringing_alert_tone;
81     struct  ProfileValue ringing_alert_type;
82     struct  ProfileValue ringing_alert_volume;
83     struct  ProfileValue sms_alert_tone;
84     struct  ProfileValue sms_alert_volume;
85     struct  ProfileValue system_sound_level;
86     struct  ProfileValue touchscreen_sound_level;
87     struct  ProfileValue vibrating_alert_enabled;
88
89     QList<ProfileValue *> list_of_profile_values;
90 };
91
92 #endif // PROFIL_H