equal
deleted
inserted
replaced
17 |
17 |
18 #ifndef HSDATABASE_H |
18 #ifndef HSDATABASE_H |
19 #define HSDATABASE_H |
19 #define HSDATABASE_H |
20 |
20 |
21 #include <QObject> |
21 #include <QObject> |
22 #include <QScopedPointer> |
|
23 #include <QVariantHash> |
22 #include <QVariantHash> |
24 |
23 |
25 #include "hsdomainmodel_global.h" |
24 #include "hsdomainmodel_global.h" |
26 |
|
27 #include <HbFeedback> |
|
28 |
25 |
29 class HsSceneData; |
26 class HsSceneData; |
30 class HsPageData; |
27 class HsPageData; |
31 class HsWidgetData; |
28 class HsWidgetData; |
32 class HsWidgetPresentationData; |
29 class HsWidgetPresentationData; |
33 class HsGeneralConfiguration; |
|
34 class HsFeedbackConfiguration; |
|
35 class HsSnapConfiguration; |
|
36 |
30 |
37 class HSDOMAINMODEL_EXPORT HsDatabase : public QObject |
31 class HSDOMAINMODEL_EXPORT HsDatabase : public QObject |
38 { |
32 { |
39 Q_OBJECT |
33 Q_OBJECT |
40 Q_PROPERTY(QString connectionName READ connectionName WRITE setConnectionName) |
34 Q_PROPERTY(QString connectionName READ connectionName WRITE setConnectionName) |
55 bool transaction(); |
49 bool transaction(); |
56 bool rollback(); |
50 bool rollback(); |
57 bool commit(); |
51 bool commit(); |
58 |
52 |
59 bool scene(HsSceneData &data); |
53 bool scene(HsSceneData &data); |
60 bool updateScene(const HsSceneData &data); |
54 |
61 |
|
62 bool pages(QList<HsPageData> &data); |
55 bool pages(QList<HsPageData> &data); |
63 bool page(HsPageData &data); |
56 bool page(HsPageData &data); |
64 bool insertPage(HsPageData &data); |
57 bool insertPage(HsPageData &data); |
65 bool updatePage(const HsPageData &data); |
58 bool updatePage(const HsPageData &data); |
66 bool deletePage(int id); |
59 bool deletePage(int id); |
79 |
72 |
80 bool widgetPreferences(int widgetId, QVariantHash &data); |
73 bool widgetPreferences(int widgetId, QVariantHash &data); |
81 bool widgetPreference(int widgetId, const QString &key, QVariant &value); |
74 bool widgetPreference(int widgetId, const QString &key, QVariant &value); |
82 bool setWidgetPreferences(int widgetId, const QVariantHash &data); |
75 bool setWidgetPreferences(int widgetId, const QVariantHash &data); |
83 |
76 |
84 bool generalConfiguration(HsGeneralConfiguration &data); |
77 bool configuration(QVariantHash &configuration); |
85 bool feedbackConfiguration(HsFeedbackConfiguration &data); |
78 |
86 bool snapConfiguration(HsSnapConfiguration &data); |
|
87 |
|
88 public: |
79 public: |
89 static void setInstance(HsDatabase *instance); |
80 static void setInstance(HsDatabase *instance); |
90 static HsDatabase *instance(); |
81 static HsDatabase *instance(); |
91 static HsDatabase *takeInstance(); |
82 static HsDatabase *takeInstance(); |
92 |
83 |