summaryrefslogtreecommitdiffabout
path: root/microkde
Unidiff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobalsettings.cpp10
-rw-r--r--microkde/kglobalsettings.h1
2 files changed, 11 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
@@ -16,48 +16,58 @@ QFont KGlobalSettings::generalFont()
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}
24QFont KGlobalSettings::generalMaxFont() 24QFont 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
41QString KGlobalSettings::timeTrackerDir()
42{
43 static QString dir;
44 if ( dir.isEmpty() ) {
45 dir = locateLocal( "data", "timetracker" );
46 }
47 return dir;
48}
49
40QFont KGlobalSettings::toolBarFont() 50QFont KGlobalSettings::toolBarFont()
41{ 51{
42 return QApplication::font(); 52 return QApplication::font();
43} 53}
44 54
45QColor KGlobalSettings::toolBarHighlightColor() 55QColor KGlobalSettings::toolBarHighlightColor()
46{ 56{
47 return QColor( "black" ); 57 return QColor( "black" );
48} 58}
49 59
50QRect KGlobalSettings::desktopGeometry( QWidget * ) 60QRect 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 **/
61bool KGlobalSettings::singleClick() 71bool KGlobalSettings::singleClick()
62{ 72{
63 KConfig *c = KGlobal::config(); 73 KConfig *c = KGlobal::config();
diff --git a/microkde/kglobalsettings.h b/microkde/kglobalsettings.h
index 075bb1c..3eeda35 100644
--- a/microkde/kglobalsettings.h
+++ b/microkde/kglobalsettings.h
@@ -1,31 +1,32 @@
1#ifndef MICROKDE_KGLOBALSETTINGS_H 1#ifndef MICROKDE_KGLOBALSETTINGS_H
2#define MICROKDE_KGLOBALSETTINGS_H 2#define MICROKDE_KGLOBALSETTINGS_H
3 3
4#include <qfont.h> 4#include <qfont.h>
5#include <qrect.h> 5#include <qrect.h>
6 6
7 7
8#define KDE_DEFAULT_SINGLECLICK true 8#define KDE_DEFAULT_SINGLECLICK true
9 9
10 10
11class KGlobalSettings 11class KGlobalSettings
12{ 12{
13 public: 13 public:
14 static QFont generalFont(); 14 static QFont generalFont();
15 static QFont generalMaxFont(); 15 static QFont generalMaxFont();
16 static QFont toolBarFont(); 16 static QFont toolBarFont();
17 17
18 static QColor toolBarHighlightColor(); 18 static QColor toolBarHighlightColor();
19 static QRect desktopGeometry( QWidget * ); 19 static QRect desktopGeometry( QWidget * );
20 static QString timeTrackerDir();
20 21
21 /** 22 /**
22 * Returns whether KDE runs in single (default) or double click 23 * Returns whether KDE runs in single (default) or double click
23 * mode. 24 * mode.
24 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 25 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
25 * @return true if single click mode, or false if double click mode. 26 * @return true if single click mode, or false if double click mode.
26 **/ 27 **/
27 static bool singleClick(); 28 static bool singleClick();
28 29
29}; 30};
30 31
31#endif 32#endif