00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef OGLOBALSETTINGS_H
00033 #define OGLOBALSETTINGS_H
00034
00035 #include <qstring.h>
00036 #include <qcolor.h>
00037 #include <qfont.h>
00038
00042 #define OPIE_DEFAULT_SINGLECLICK true
00043 #define OPIE_DEFAULT_INSERTTEAROFFHANDLES true
00044 #define OPIE_DEFAULT_AUTOSELECTDELAY -1
00045 #define OPIE_DEFAULT_CHANGECURSOR true
00046 #define OPIE_DEFAULT_LARGE_CURSOR false
00047 #define OPIE_DEFAULT_VISUAL_ACTIVATE true
00048 #define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
00049
00050
00051
00052
00053
00054
00055 namespace Opie {
00056 namespace Core {
00057
00062 class OGlobalSettings
00063 {
00064 public:
00065
00109
00110 static int dndEventDelay();
00111
00120 static bool singleClick();
00121
00125
00126 static bool insertTearOffHandle();
00127
00131 static bool changeCursorOverIcon();
00132
00137 static bool visualActivate();
00138 static unsigned int visualActivateSpeed();
00139
00145 static int autoSelectDelay();
00146
00153 static int contextMenuKey();
00154
00161 static bool showContextMenusOnPress ();
00162
00168 enum Completion {
00172 CompletionNone=1,
00176 CompletionAuto,
00180 CompletionMan,
00184 CompletionShell,
00188 CompletionPopup,
00193 CompletionPopupAuto
00194 };
00200 static Completion completionMode();
00201
00207 enum Debug {
00211 DebugNone=-1,
00215 DebugFiles=0,
00219 DebugMsgBox=1,
00223 DebugStdErr=2,
00227 DebugSysLog=3,
00231 DebugSocket=4
00232 };
00238 static Debug debugMode();
00239
00245 static QString debugOutput();
00249 struct OMouseSettings
00250 {
00251 enum { RightHanded = 0, LeftHanded = 1 };
00252 int handed;
00253 };
00254
00258 static OMouseSettings & mouseSettings();
00259
00263
00264 static QString desktopPath() { initStatic(); return *s_desktopPath; }
00265
00269 static QString autostartPath() { initStatic(); return *s_autostartPath; }
00270
00274
00275 static QString trashPath() { initStatic(); return *s_trashPath; }
00276
00280 static QString documentPath() { initStatic(); return *s_documentPath; }
00281
00282
00286 static QColor toolBarHighlightColor();
00287 static QColor inactiveTitleColor();
00288 static QColor inactiveTextColor();
00289 static QColor activeTitleColor();
00290 static QColor activeTextColor();
00291 static int contrast();
00292
00296 static QColor baseColor();
00297 static QColor textColor();
00298 static QColor linkColor();
00299 static QColor visitedLinkColor();
00300 static QColor highlightedTextColor();
00301 static QColor highlightColor();
00302
00310 static QColor alternateBackgroundColor();
00316 static QColor calculateAlternateBackgroundColor(const QColor& base);
00317
00318
00319 static QFont generalFont();
00320 static QFont fixedFont();
00321 static QFont toolBarFont();
00322 static QFont menuFont();
00323 static QFont windowTitleFont();
00324 static QFont taskbarFont();
00325
00331 static bool isMultiHead();
00332
00333 private:
00337 static void initStatic();
00341 static void initColors();
00345 static void rereadFontSettings();
00349 static void rereadPathSettings();
00353 static void rereadMouseSettings();
00354
00355
00356 static QString* s_desktopPath;
00357 static QString* s_autostartPath;
00358 static QString* s_trashPath;
00359 static QString* s_documentPath;
00360 static QFont *_generalFont;
00361 static QFont *_fixedFont;
00362 static QFont *_toolBarFont;
00363 static QFont *_menuFont;
00364 static QFont *_windowTitleFont;
00365 static QFont *_taskbarFont;
00366 static QColor * kde2Gray;
00367 static QColor * kde2Blue;
00368 static QColor * kde2AlternateColor;
00369 static OMouseSettings *s_mouseSettings;
00370
00371 static QColor * OpieGray;
00372 static QColor * OpieBlue;
00373 static QColor * OpieAlternate;
00374 static QColor * OpieHighlight;
00375
00376 friend class OApplication;
00377 private:
00378 class Private;
00379 Private *d;
00380 };
00381
00382 }
00383 }
00384
00385 #endif