KDECore
kglobalsettings.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _KGLOBALSETTINGS_H
00019 #define _KGLOBALSETTINGS_H
00020
00021 #include <qstring.h>
00022 #include <qcolor.h>
00023 #include <qfont.h>
00024 #include "kdelibs_export.h"
00025
00026 #define KDE_DEFAULT_SINGLECLICK true
00027 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
00028 #define KDE_DEFAULT_AUTOSELECTDELAY -1
00029 #define KDE_DEFAULT_CHANGECURSOR true
00030 #define KDE_DEFAULT_LARGE_CURSOR false
00031 #define KDE_DEFAULT_VISUAL_ACTIVATE true
00032 #define KDE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
00033 #define KDE_DEFAULT_WHEEL_ZOOM false
00034 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON false
00035 #define KDE_DEFAULT_OPAQUE_RESIZE true
00036 #define KDE_DEFAULT_BUTTON_LAYOUT 0
00037 #define KDE_DEFAULT_SHADE_SORT_COLUMN true
00038
00039 class KURL;
00040
00046 class KDECORE_EXPORT KGlobalSettings
00047 {
00048 public:
00049
00093 static int dndEventDelay();
00094
00101 static bool singleClick();
00102
00109 enum TearOffHandle {
00110 Disable = 0,
00111 ApplicationLevel,
00112 Enable
00113 };
00114
00120 static TearOffHandle insertTearOffHandle();
00121
00126 static bool changeCursorOverIcon();
00127
00133 static bool visualActivate();
00134
00140 static unsigned int visualActivateSpeed();
00141
00147 static int autoSelectDelay();
00148
00155 static int contextMenuKey ();
00156
00163 static bool showContextMenusOnPress ();
00164
00170 enum Completion {
00174 CompletionNone=1,
00178 CompletionAuto,
00182 CompletionMan,
00186 CompletionShell,
00190 CompletionPopup,
00195 CompletionPopupAuto
00196 };
00197
00203 static Completion completionMode();
00204
00208 struct KMouseSettings
00209 {
00210 enum { RightHanded = 0, LeftHanded = 1 };
00211 int handed;
00212 };
00213
00219 static KMouseSettings & mouseSettings();
00220
00225 static QString desktopPath() { initStatic(); return *s_desktopPath; }
00226
00231 static QString autostartPath() { initStatic(); return *s_autostartPath; }
00232
00238 static QString trashPath() { initStatic(); return *s_trashPath; }
00239
00240
00241
00246 static QString documentPath() { initStatic(); return *s_documentPath; }
00247
00248
00253 static QColor toolBarHighlightColor();
00254
00259 static QColor inactiveTitleColor();
00260
00265 static QColor inactiveTextColor();
00266
00271 static QColor activeTitleColor();
00272
00277 static QColor activeTextColor();
00278
00284 static int contrast();
00285
00291 static QColor buttonBackground();
00292
00298 static QColor buttonTextColor();
00299
00305 static QColor baseColor();
00306
00312 static QColor textColor();
00313
00318 static QColor linkColor();
00319
00324 static QColor visitedLinkColor();
00325
00331 static QColor highlightedTextColor();
00332
00338 static QColor highlightColor();
00339
00348 static QColor alternateBackgroundColor();
00349
00357 static QColor calculateAlternateBackgroundColor(const QColor& base);
00358
00365 static bool shadeSortColumn();
00366
00371 static QFont generalFont();
00372
00377 static QFont fixedFont();
00378
00383 static QFont toolBarFont();
00384
00389 static QFont menuFont();
00390
00395 static QFont windowTitleFont();
00396
00401 static QFont taskbarFont();
00402
00409 static QFont largeFont(const QString &text = QString::null);
00410
00418 static bool isMultiHead();
00419
00432 static bool wheelMouseZooms();
00433
00444 static QRect splashScreenDesktopGeometry();
00445
00462 static QRect desktopGeometry(const QPoint& point);
00463
00477 static QRect desktopGeometry(QWidget* w);
00478
00487 static bool showIconsOnPushButtons();
00488
00497 static bool showFilePreview(const KURL &);
00498
00507 static bool opaqueResize();
00508
00516 static int buttonLayout();
00517
00518 private:
00522 static void initStatic();
00526 static void initColors();
00530 static void rereadFontSettings();
00534 static void rereadPathSettings();
00538 static void rereadMouseSettings();
00539
00540
00541 static QString* s_desktopPath;
00542 static QString* s_autostartPath;
00543 static QString* s_trashPath;
00544 static QString* s_documentPath;
00545 static QFont *_generalFont;
00546 static QFont *_fixedFont;
00547 static QFont *_toolBarFont;
00548 static QFont *_menuFont;
00549 static QFont *_windowTitleFont;
00550 static QFont *_taskbarFont;
00551 static QFont *_largeFont;
00552 static QColor * _kde34Blue;
00553 static QColor * _inactiveBackground;
00554 static QColor * _inactiveForeground;
00555 static QColor * _activeBackground;
00556 static QColor * _buttonBackground;
00557 static QColor * _selectBackground;
00558 static QColor * _linkColor;
00559 static QColor * _visitedLinkColor;
00560 static QColor * alternateColor;
00561 static KMouseSettings *s_mouseSettings;
00562
00563 friend class KApplication;
00564 };
00565
00566 #endif