Scribus
Open source desktop publishing at your fingertips
api_prefs.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef API_PREFS_H_
8 #define API_PREFS_H_
9 
10 #include <QObject>
11 #include <QVariant>
12 #include <QtDebug>
13 #include <QApplication>
14 
15 #include "scripterimpl.h"
16 #include "prefsfile.h"
17 #include "prefscontext.h"
18 #include "prefstable.h"
19 #include "prefsmanager.h"
20 
21 class PreferencesAPI : public QObject
22 {
23  Q_OBJECT
24 public:
26  virtual ~PreferencesAPI();
27  PrefsContext *prefs(const QString & context);
28 
29 public slots:
30  bool contains(const QString & context, const QString & key);
31  QString getString(const QString & context, const QString & key);
32  void setString(const QString & context, const QString & , const QString & value);
33  int getInt(const QString & context, const QString & key);
34  void setInt(const QString & context, const QString & key, int value);
35  double getDouble(const QString & context, const QString & key);
36  void setDouble(const QString & context, const QString & key, double value);
37  bool getBool(const QString & context, const QString & key);
38  void setBool(const QString & context, const QString & key, bool value);
39 
40 };
41 
42 #endif /*API_PREFS_H_*/
void setString(const QString &context, const QString &, const QString &value)
Definition: api_prefs.cpp:73
bool getBool(const QString &context, const QString &key)
Definition: api_prefs.cpp:136
void setBool(const QString &context, const QString &key, bool value)
Definition: api_prefs.cpp:148
void setDouble(const QString &context, const QString &key, double value)
Definition: api_prefs.cpp:121
bool contains(const QString &context, const QString &key)
Definition: api_prefs.cpp:47
void setInt(const QString &context, const QString &key, int value)
Definition: api_prefs.cpp:97
int getInt(const QString &context, const QString &key)
Definition: api_prefs.cpp:85
double getDouble(const QString &context, const QString &key)
Definition: api_prefs.cpp:109
QString getString(const QString &context, const QString &key)
Definition: api_prefs.cpp:60
Definition: prefscontext.h:40
Definition: api_prefs.h:21