author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kglobalsettings.cpp | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
Diffstat (limited to 'microkde/kglobalsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kglobalsettings.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp new file mode 100644 index 0000000..2fff8fc --- a/dev/null +++ b/microkde/kglobalsettings.cpp | |||
@@ -0,0 +1,41 @@ | |||
1 | #include "kglobalsettings.h" | ||
2 | #include "kconfig.h" | ||
3 | #include "kglobal.h" | ||
4 | #include "kconfigbase.h" | ||
5 | |||
6 | #include <qapplication.h> | ||
7 | |||
8 | QFont KGlobalSettings::generalFont() | ||
9 | { | ||
10 | int size = 12; | ||
11 | if (QApplication::desktop()->width() < 480 ) | ||
12 | size = 10; | ||
13 | return QFont("helvetica",size); | ||
14 | } | ||
15 | QFont KGlobalSettings::toolBarFont() | ||
16 | { | ||
17 | return QFont("helevetica",12); | ||
18 | } | ||
19 | |||
20 | QColor KGlobalSettings::toolBarHighlightColor() | ||
21 | { | ||
22 | return QColor("black"); | ||
23 | } | ||
24 | |||
25 | QRect KGlobalSettings::desktopGeometry( QWidget * ) | ||
26 | { | ||
27 | return QApplication::desktop()->rect(); | ||
28 | } | ||
29 | |||
30 | /** | ||
31 | * Returns whether KDE runs in single (default) or double click | ||
32 | * mode. | ||
33 | * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html | ||
34 | * @return true if single click mode, or false if double click mode. | ||
35 | **/ | ||
36 | bool KGlobalSettings::singleClick() | ||
37 | { | ||
38 | KConfig *c = KGlobal::config(); | ||
39 | KConfigGroupSaver cgs( c, "KDE" ); | ||
40 | return c->readBoolEntry("SingleClick", KDE_DEFAULT_SINGLECLICK); | ||
41 | } | ||