Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

oglobalsettings.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003                              Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de>
00004                              Inspired by KDE OGlobalSettings
00005                              Copyright (C) 2000 David Faure <faure@kde.org>
00006               =.
00007             .=l.
00008            .>+-=
00009  _;:,     .>    :=|.         This program is free software; you can
00010 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00011 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00012 .="- .-=="i,     .._         License as published by the Free Software
00013  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00014      ._= =}       :          or (at your option) any later version.
00015     .%`+i>       _;_.
00016     .i_,=:_.      -<s.       This program is distributed in the hope that
00017      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00018     : ..    .:,     . . .    without even the implied warranty of
00019     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00020   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00021 ..}^=.=       =       ;      Library General Public License for more
00022 ++=   -.     .`     .:       details.
00023  :     =  ...= . :.=-
00024  -.   .:....=;==+<;          You should have received a copy of the GNU
00025   -_. . .   )=.  =           Library General Public License along with
00026     --        :-=`           this library; see the file COPYING.LIB.
00027                              If not, write to the Free Software Foundation,
00028                              Inc., 59 Temple Place - Suite 330,
00029                              Boston, MA 02111-1307, USA.
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 //FIXME: There's still a whole lot of stuff in here which has to be revised
00051 //FIXME: before public usage... lack of time to do it at once - so it will
00052 //FIXME: happen step-by-step. ML.
00053 // we should not habe too much configure options!!!!!! -zecke
00054 
00055 namespace Opie {
00056 namespace Core {
00057 
00062 class OGlobalSettings
00063 {
00064   public:
00065 
00109     // we do not support DND at the momemt -zecke
00110     static int dndEventDelay();
00111 
00120     static bool singleClick();
00121 
00125     // would clutter the small screen -zecke
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; // left or right
00253     };
00254 
00258     static OMouseSettings & mouseSettings();
00259 
00263      // below handled by Global stuff and QPEApplication
00264     static QString desktopPath() { initStatic(); return *s_desktopPath; }
00265 
00269     static QString autostartPath() { initStatic(); return *s_autostartPath; }
00270 
00274      // we do not have that concept -zecke
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(); // Similair to QColorGroup::base()
00297     static QColor textColor(); // Similair to QColorGroup::text()
00298     static QColor linkColor();
00299     static QColor visitedLinkColor();
00300     static QColor highlightedTextColor(); // Similair to QColorGroup::hightlightedText()
00301     static QColor highlightColor(); // Similair to QColorGroup::highlight()
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

Generated on Sat Nov 5 16:16:08 2005 for OPIE by  doxygen 1.4.2