summaryrefslogtreecommitdiffabout
path: root/microkde/kglobalsettings.cpp
Unidiff
Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobalsettings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index e54b0d9..b65ce66 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -1,76 +1,77 @@
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
8QFont KGlobalSettings::generalFont() 8QFont 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}
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 40
41QString KGlobalSettings::timeTrackerDir() 41QString KGlobalSettings::timeTrackerDir()
42{ 42{
43 static QString dir; 43 static QString dir;
44 if ( dir.isEmpty() ) { 44 if ( dir.isEmpty() ) {
45 dir = locateLocal( "data", "timetracker" ); 45 dir = locateLocal( "data", "timetrackerdir/d.ttl" );
46 dir = dir.left ( dir.length() - 5);
46 } 47 }
47 return dir; 48 return dir;
48} 49}
49 50
50QFont KGlobalSettings::toolBarFont() 51QFont KGlobalSettings::toolBarFont()
51{ 52{
52 return QApplication::font(); 53 return QApplication::font();
53} 54}
54 55
55QColor KGlobalSettings::toolBarHighlightColor() 56QColor KGlobalSettings::toolBarHighlightColor()
56{ 57{
57 return QColor( "black" ); 58 return QColor( "black" );
58} 59}
59 60
60QRect KGlobalSettings::desktopGeometry( QWidget * ) 61QRect KGlobalSettings::desktopGeometry( QWidget * )
61{ 62{
62 return QApplication::desktop()->rect(); 63 return QApplication::desktop()->rect();
63} 64}
64 65
65 /** 66 /**
66 * Returns whether KDE runs in single (default) or double click 67 * Returns whether KDE runs in single (default) or double click
67 * mode. 68 * mode.
68 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html 69 * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
69 * @return true if single click mode, or false if double click mode. 70 * @return true if single click mode, or false if double click mode.
70 **/ 71 **/
71bool KGlobalSettings::singleClick() 72bool KGlobalSettings::singleClick()
72{ 73{
73 KConfig *c = KGlobal::config(); 74 KConfig *c = KGlobal::config();
74 KConfigGroupSaver cgs( c, "KDE" ); 75 KConfigGroupSaver cgs( c, "KDE" );
75 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); 76 return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK);
76} 77}