author | zautrix <zautrix> | 2005-04-09 20:54:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-09 20:54:29 (UTC) |
commit | ae58b2fe29fcd8b3690dcbb6d64976674f6294e0 (patch) (unidiff) | |
tree | 7a321b610fa1f7cab980370a44bf78fea88bf481 /microkde/kglobalsettings.cpp | |
parent | 9e43ebbe5867b2da957bb17c35bd357715424cba (diff) | |
download | kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.zip kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.gz kdepimpi-ae58b2fe29fcd8b3690dcbb6d64976674f6294e0.tar.bz2 |
cool
Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kglobalsettings.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index b837b23..e54b0d9 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp | |||
@@ -1,66 +1,76 @@ | |||
1 | #include "kglobalsettings.h" | 1 | #include "kglobalsettings.h" |
2 | #include "kconfig.h" | 2 | #include "kconfig.h" |
3 | #include "kglobal.h" | 3 | #include "kglobal.h" |
4 | #include "kconfigbase.h" | 4 | #include "kconfigbase.h" |
5 | 5 | ||
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | 7 | ||
8 | QFont KGlobalSettings::generalFont() | 8 | QFont KGlobalSettings::generalFont() |
9 | { | 9 | { |
10 | int size = 12; | 10 | int size = 12; |
11 | if (QApplication::desktop()->width() < 480 ) { | 11 | if (QApplication::desktop()->width() < 480 ) { |
12 | size = 10; | 12 | size = 10; |
13 | } | 13 | } |
14 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
15 | else | 15 | else |
16 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 16 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
17 | size = 18; | 17 | size = 18; |
18 | #endif | 18 | #endif |
19 | QFont f = QApplication::font(); | 19 | QFont f = QApplication::font(); |
20 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); | 20 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); |
21 | f.setPointSize( size ); | 21 | f.setPointSize( size ); |
22 | return f; | 22 | return f; |
23 | } | 23 | } |
24 | QFont KGlobalSettings::generalMaxFont() | 24 | QFont KGlobalSettings::generalMaxFont() |
25 | { | 25 | { |
26 | int size = 12; | 26 | int size = 12; |
27 | if (QApplication::desktop()->width() < 480 ) { | 27 | if (QApplication::desktop()->width() < 480 ) { |
28 | size = 10; | 28 | size = 10; |
29 | } | 29 | } |
30 | #ifndef DESKTOP_VERSION | 30 | #ifndef DESKTOP_VERSION |
31 | else | 31 | else |
32 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 32 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
33 | size = 18; | 33 | size = 18; |
34 | #endif | 34 | #endif |
35 | QFont f = QApplication::font(); | 35 | QFont f = QApplication::font(); |
36 | if ( f.pointSize() > size ) | 36 | if ( f.pointSize() > size ) |
37 | f.setPointSize( size ); | 37 | f.setPointSize( size ); |
38 | return f; | 38 | return f; |
39 | } | 39 | } |
40 | |||
41 | QString KGlobalSettings::timeTrackerDir() | ||
42 | { | ||
43 | static QString dir; | ||
44 | if ( dir.isEmpty() ) { | ||
45 | dir = locateLocal( "data", "timetracker" ); | ||
46 | } | ||
47 | return dir; | ||
48 | } | ||
49 | |||
40 | QFont KGlobalSettings::toolBarFont() | 50 | QFont KGlobalSettings::toolBarFont() |
41 | { | 51 | { |
42 | return QApplication::font(); | 52 | return QApplication::font(); |
43 | } | 53 | } |
44 | 54 | ||
45 | QColor KGlobalSettings::toolBarHighlightColor() | 55 | QColor KGlobalSettings::toolBarHighlightColor() |
46 | { | 56 | { |
47 | return QColor( "black" ); | 57 | return QColor( "black" ); |
48 | } | 58 | } |
49 | 59 | ||
50 | QRect KGlobalSettings::desktopGeometry( QWidget * ) | 60 | QRect KGlobalSettings::desktopGeometry( QWidget * ) |
51 | { | 61 | { |
52 | return QApplication::desktop()->rect(); | 62 | return QApplication::desktop()->rect(); |
53 | } | 63 | } |
54 | 64 | ||
55 | /** | 65 | /** |
56 | * Returns whether KDE runs in single (default) or double click | 66 | * Returns whether KDE runs in single (default) or double click |
57 | * mode. | 67 | * mode. |
58 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html | 68 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html |
59 | * @return true if single click mode, or false if double click mode. | 69 | * @return true if single click mode, or false if double click mode. |
60 | **/ | 70 | **/ |
61 | bool KGlobalSettings::singleClick() | 71 | bool KGlobalSettings::singleClick() |
62 | { | 72 | { |
63 | KConfig *c = KGlobal::config(); | 73 | KConfig *c = KGlobal::config(); |
64 | KConfigGroupSaver cgs( c, "KDE" ); | 74 | KConfigGroupSaver cgs( c, "KDE" ); |
65 | return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); | 75 | return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); |
66 | } | 76 | } |