Mercurial > octave-nkf
comparison gui/src/resource-manager.h @ 14707:674740c44c09 gui
Changed various files to matche file naming conventions.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Thu, 31 May 2012 22:19:53 +0200 |
parents | gui/src/resourcemanager.h@f86884be20fc |
children | f50591409306 |
comparison
equal
deleted
inserted
replaced
14703:f86884be20fc | 14707:674740c44c09 |
---|---|
1 /* OctaveGUI - A graphical user interface for Octave | |
2 * Copyright (C) 2011 Jacob Dawid (jacob.dawid@googlemail.com) | |
3 * | |
4 * This program is free software: you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as | |
6 * published by the Free Software Foundation, either version 3 of the | |
7 * License, or (at your option) any later version. | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | |
18 #ifndef RESOURCEMANAGER_H | |
19 #define RESOURCEMANAGER_H | |
20 | |
21 #include <QSettings> | |
22 #include <QDesktopServices> | |
23 #include <QMap> | |
24 #include <QIcon> | |
25 | |
26 class ResourceManager | |
27 { | |
28 public: | |
29 enum Icon | |
30 { | |
31 Octave, | |
32 Terminal, | |
33 Documentation, | |
34 Chat, | |
35 ChatNewMessage | |
36 }; | |
37 | |
38 ~ResourceManager (); | |
39 | |
40 static ResourceManager * | |
41 instance () | |
42 { | |
43 return &m_singleton; | |
44 } | |
45 | |
46 QSettings *settings (); | |
47 QString homePath (); | |
48 void reloadSettings (); | |
49 void setSettings (QString file); | |
50 QString findTranslatorFile (QString language); | |
51 void updateNetworkSettings (); | |
52 void loadIcons (); | |
53 QIcon icon (Icon icon); | |
54 bool isFirstRun (); | |
55 | |
56 const char *octaveKeywords (); | |
57 private: | |
58 ResourceManager (); | |
59 | |
60 QSettings *m_settings; | |
61 QString m_homePath; | |
62 QMap <Icon, QIcon> m_icons; | |
63 static ResourceManager m_singleton; | |
64 bool m_firstRun; | |
65 }; | |
66 | |
67 #endif // RESOURCEMANAGER_H |