kdecore Library API Documentation

kglobalsettings.h

00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2000 David Faure <faure@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00016    Boston, MA 02111-1307, USA.
00017 */
00018 #ifndef _KGLOBALSETTINGS_H
00019 #define _KGLOBALSETTINGS_H
00020 
00021 #include <qstring.h>
00022 #include <qcolor.h>
00023 #include <qfont.h>
00024 
00025 #define KDE_DEFAULT_SINGLECLICK true
00026 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
00027 #define KDE_DEFAULT_AUTOSELECTDELAY -1
00028 #define KDE_DEFAULT_CHANGECURSOR true
00029 #define KDE_DEFAULT_LARGE_CURSOR false
00030 #define KDE_DEFAULT_VISUAL_ACTIVATE true
00031 #define KDE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
00032 #define KDE_DEFAULT_WHEEL_ZOOM false
00033 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON false
00034 #define KDE_DEFAULT_OPAQUE_RESIZE true
00035 
00036 class KURL;
00037 
00044 class KGlobalSettings
00045 {
00046   public:
00047 
00091     static int dndEventDelay();
00092 
00099     static bool singleClick();
00100 
00107     enum TearOffHandle {
00108       Disable = 0, 
00109       ApplicationLevel, 
00110       Enable 
00111     };
00112 
00118     static TearOffHandle insertTearOffHandle();
00119 
00124     static bool changeCursorOverIcon();
00125 
00131     static bool visualActivate();
00132 
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    };
00195 
00201     static Completion completionMode();
00202 
00206     struct KMouseSettings
00207     {
00208         enum { RightHanded = 0, LeftHanded = 1 };
00209         int handed; // left or right
00210     };
00211 
00216     static KMouseSettings & mouseSettings();
00217 
00222     static QString desktopPath() { initStatic(); return *s_desktopPath; }
00223 
00228     static QString autostartPath() { initStatic(); return *s_autostartPath; }
00229 
00234     static QString trashPath() { initStatic(); return *s_trashPath; }
00235 
00240     static QString documentPath() { initStatic(); return *s_documentPath; }
00241 
00242 
00247     static QColor toolBarHighlightColor();
00248 
00253     static QColor inactiveTitleColor();
00254 
00259     static QColor inactiveTextColor();
00260 
00265     static QColor activeTitleColor();
00266 
00271     static QColor activeTextColor();
00272 
00278     static int contrast();
00279 
00285     static QColor baseColor();
00286 
00292     static QColor textColor();
00293 
00298     static QColor linkColor();
00299 
00304     static QColor visitedLinkColor();
00305 
00311     static QColor highlightedTextColor();
00312 
00318     static QColor highlightColor();
00319 
00328     static QColor alternateBackgroundColor();
00329 
00337     static QColor calculateAlternateBackgroundColor(const QColor& base);
00338 
00339 
00344     static QFont generalFont();
00345 
00350     static QFont fixedFont();
00351 
00356     static QFont toolBarFont();
00357 
00362     static QFont menuFont();
00363 
00368     static QFont windowTitleFont();
00369 
00374     static QFont taskbarFont();
00375 
00382     static QFont largeFont(const QString &text = QString::null);
00383 
00390     static bool isMultiHead();
00391 
00404     static bool wheelMouseZooms();
00405 
00416     static QRect splashScreenDesktopGeometry();
00417 
00434     static QRect desktopGeometry(const QPoint& point);
00435 
00449     static QRect desktopGeometry(QWidget* w);
00450 
00459     static bool showIconsOnPushButtons();
00460 
00469     static bool showFilePreview(const KURL &);
00470 
00479     static bool opaqueResize();
00480 
00481 private:
00485     static void initStatic();
00489     static void initColors();
00493     static void rereadFontSettings();
00497     static void rereadPathSettings();
00501     static void rereadMouseSettings();
00502 
00503 
00504     static QString* s_desktopPath;
00505     static QString* s_autostartPath;
00506     static QString* s_trashPath;
00507     static QString* s_documentPath;
00508     static QFont *_generalFont;
00509     static QFont *_fixedFont;
00510     static QFont *_toolBarFont;
00511     static QFont *_menuFont;
00512     static QFont *_windowTitleFont;
00513     static QFont *_taskbarFont;
00514     static QFont *_largeFont;
00515     static QColor * kde2Gray;
00516     static QColor * kde2Blue;
00517     static QColor * kde2AlternateColor;
00518     static KMouseSettings *s_mouseSettings;
00519 
00520     friend class KApplication;
00521 };
00522 
00523 #endif
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:33:49 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003