Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kglobalsettings.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index 2e483e9..1f08255 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp | |||
@@ -1,70 +1,71 @@ | |||
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 | #include <QDesktopWidget> | ||
7 | 8 | ||
8 | #ifdef DESKTOP_VERSION | 9 | #ifdef DESKTOP_VERSION |
9 | QColor KGlobalSettings::mAlternate = QColor( 235, 235, 235 ); | 10 | QColor KGlobalSettings::mAlternate = QColor( 235, 235, 235 ); |
10 | #else | 11 | #else |
11 | QColor KGlobalSettings::mAlternate = QColor( 210, 210, 210 ); | 12 | QColor KGlobalSettings::mAlternate = QColor( 210, 210, 210 ); |
12 | #endif | 13 | #endif |
13 | 14 | ||
14 | 15 | ||
15 | QFont KGlobalSettings::generalFont() | 16 | QFont KGlobalSettings::generalFont() |
16 | { | 17 | { |
17 | int size = 12; | 18 | int size = 12; |
18 | if (QApplication::desktop()->width() < 480 ) { | 19 | if (QApplication::desktop()->width() < 480 ) { |
19 | size = 10; | 20 | size = 10; |
20 | } | 21 | } |
21 | #ifndef DESKTOP_VERSION | 22 | #ifndef DESKTOP_VERSION |
22 | else | 23 | else |
23 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 24 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
24 | size = 18; | 25 | size = 18; |
25 | #endif | 26 | #endif |
26 | QFont f = QApplication::font(); | 27 | QFont f = QApplication::font(); |
27 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); | 28 | //qDebug("pointsize %d %s", f.pointSize(),f.family().latin1()); |
28 | f.setPointSize( size ); | 29 | f.setPointSize( size ); |
29 | return f; | 30 | return f; |
30 | } | 31 | } |
31 | QFont KGlobalSettings::generalMaxFont() | 32 | QFont KGlobalSettings::generalMaxFont() |
32 | { | 33 | { |
33 | int size = 12; | 34 | int size = 12; |
34 | if (QApplication::desktop()->width() < 480 ) { | 35 | if (QApplication::desktop()->width() < 480 ) { |
35 | size = 10; | 36 | size = 10; |
36 | } | 37 | } |
37 | #ifndef DESKTOP_VERSION | 38 | #ifndef DESKTOP_VERSION |
38 | else | 39 | else |
39 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) | 40 | if (QApplication::desktop()->width() >= 480 && QApplication::desktop()->width() <= 640 ) |
40 | size = 18; | 41 | size = 18; |
41 | #endif | 42 | #endif |
42 | QFont f = QApplication::font(); | 43 | QFont f = QApplication::font(); |
43 | if ( f.pointSize() > size ) | 44 | if ( f.pointSize() > size ) |
44 | f.setPointSize( size ); | 45 | f.setPointSize( size ); |
45 | return f; | 46 | return f; |
46 | } | 47 | } |
47 | 48 | ||
48 | QString KGlobalSettings::timeTrackerDir() | 49 | QString KGlobalSettings::timeTrackerDir() |
49 | { | 50 | { |
50 | static QString dir; | 51 | static QString dir; |
51 | if ( dir.isEmpty() ) { | 52 | if ( dir.isEmpty() ) { |
52 | dir = locateLocal( "data", "timetrackerdir/d.ttl" ); | 53 | dir = locateLocal( "data", "timetrackerdir/d.ttl" ); |
53 | dir = dir.left ( dir.length() - 5); | 54 | dir = dir.left ( dir.length() - 5); |
54 | } | 55 | } |
55 | return dir; | 56 | return dir; |
56 | } | 57 | } |
57 | QString KGlobalSettings::backupDataDir() | 58 | QString KGlobalSettings::backupDataDir() |
58 | { | 59 | { |
59 | static QString dir; | 60 | static QString dir; |
60 | if ( dir.isEmpty() ) { | 61 | if ( dir.isEmpty() ) { |
61 | dir = locateLocal( "data", "backupdir/d.ttl" ); | 62 | dir = locateLocal( "data", "backupdir/d.ttl" ); |
62 | dir = dir.left ( dir.length() - 5); | 63 | dir = dir.left ( dir.length() - 5); |
63 | } | 64 | } |
64 | return dir; | 65 | return dir; |
65 | } | 66 | } |
66 | QString KGlobalSettings::calendarDir() | 67 | QString KGlobalSettings::calendarDir() |
67 | { | 68 | { |
68 | static QString dir; | 69 | static QString dir; |
69 | if ( dir.isEmpty() ) { | 70 | if ( dir.isEmpty() ) { |
70 | dir = locateLocal( "data", "korganizer/d.ttl" ); | 71 | dir = locateLocal( "data", "korganizer/d.ttl" ); |