Schim
global.h
Go to the documentation of this file.
1 #ifndef GLOBAL_H
3 #define GLOBAL_H
4 
5 #include "symbols.h"
6 
7 #include <QVariant>
8 #include <QColor>
9 
10 // This header should not include other headers, because all other headers should
11 // in principle include this header
12 class ProjectManager;
13 class Database;
14 
15 namespace Schim
16 {
17 
18 static QString currentProjectPath = "", userSymbolPath = "~/.local/share/schim/symb";
19 
20 static QString systemSymbolPath = "../share/schim/symb", systemMacroPath = "macros";
21 
26 void changeSetting(const QString &key, const QVariant &value, bool sync = true);
31 QVariant getSetting(const QString &key, const QVariant &defaultValue);
32 
33 ProjectManager *getProjectManager();
34 Database *getGlobalDatabase();
35 
41 QString resolvePath(const QString &path);
42 QString resolveAbsPath(const QString &path);
43 
47 float dpiInvariant(float pxInput);
48 
49 } // namespace Schim
50 
51 using namespace Schim; // TODO temporary perhaps
52 
53 #endif // GLOBAL_H
QVariant getSetting(const QString &key, const QVariant &defaultValue)
A model that manages open projects.
Definition: projectmanager.h:18
A database of symbols.
Definition: database.h:77
Definition: global.h:15
void changeSetting(const QString &key, const QVariant &value, bool sync=true)
QString resolvePath(const QString &path)
float dpiInvariant(float pxInput)
Take an input in pixels and return a value that is independent of screen DPI.