Architecture changed to allow easier addition of new phone books. Norwegian phonebook...
[jenirok] / src / common / settings.h
index 92e6e3d..c732299 100644 (file)
@@ -20,7 +20,8 @@
 #define SETTINGS_H
 
 #include <QtCore/QString>
-#include <QCoreApplication>
+#include <QtCore/QList>
+#include <QtGui/QApplication>
 
 class Settings;
 
@@ -32,8 +33,19 @@ public:
 
     enum ConnectionType {ALWAYS_ASK, WLAN, GPRS, ANY};
 
+    struct Language
+    {
+        QString name;
+        QString id;
+    };
+
     static Settings* instance();
+    static void getLanguages(QList<Language>& languages);
+    ~Settings();
     static void close();
+    void startEdit();
+    void endEdit();
+    void loadLanguage(QApplication& app);
     bool set(QString const& name, QString const& value);
     QString get(QString const& name);
     QString getDefaultValue(QString const& name);
@@ -43,6 +55,7 @@ public:
 private:
     Settings();
     static Settings* instance_;
+    bool editing_;
 
 };