# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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
    00040 class KGlobalSettings
    00041 {
    00042   public:
    00043
    00087     static int dndEventDelay();
    00088
    00095     static bool singleClick();
    00096
    00103     enum TearOffHandle {
    00104       Disable = 0,
    00105       ApplicationLevel,
    00106       Enable
    00107     };
    00108
    00114     static TearOffHandle insertTearOffHandle();
    00115
    00120     static bool changeCursorOverIcon();
    00121
    00127     static bool visualActivate();
    00128
    00134     static unsigned int visualActivateSpeed();
    00135
    00141     static int autoSelectDelay();
    00142
    00149     static int contextMenuKey ();
    00150
    00157     static bool showContextMenusOnPress ();
    00158
    00164    enum Completion {
    00168        CompletionNone=1,
    00172        CompletionAuto,
    00176        CompletionMan,
    00180        CompletionShell,
    00184        CompletionPopup,
    00189        CompletionPopupAuto
    00190    };
    00191
    00197     static Completion completionMode();
    00198
    00202     struct KMouseSettings
    00203     {
    00204         enum { RightHanded = 0, LeftHanded = 1 };
    00205         int handed; // left or right
    00206     };
    00207
    00212     static KMouseSettings & mouseSettings();
    00213
    00218     static QString desktopPath() { initStatic(); return *s_desktopPath; }
    00219
    00224     static QString autostartPath() { initStatic(); return *s_autostartPath; }
    00225
    00230     static QString trashPath() { initStatic(); return *s_trashPath; }
    00231
    00236     static QString documentPath() { initStatic(); return *s_documentPath; }
    00237
    00238
    00243     static QColor toolBarHighlightColor();
    00244
    00249     static QColor inactiveTitleColor();
    00250
    00255     static QColor inactiveTextColor();
    00256
    00261     static QColor activeTitleColor();
    00262
    00267     static QColor activeTextColor();
    00268
    00274     static int contrast();
    00275
    00281     static QColor baseColor();
    00282
    00288     static QColor textColor();
    00289
    00294     static QColor linkColor();
    00295
    00300     static QColor visitedLinkColor();
    00301
    00307     static QColor highlightedTextColor();
    00308
    00314     static QColor highlightColor();
    00315
    00324     static QColor alternateBackgroundColor();
    00325
    00333     static QColor calculateAlternateBackgroundColor(const QColor& base);
    00334
    00335
    00340     static QFont generalFont();
    00341
    00346     static QFont fixedFont();
    00347
    00352     static QFont toolBarFont();
    00353
    00358     static QFont menuFont();
    00359
    00364     static QFont windowTitleFont();
    00365
    00370     static QFont taskbarFont();
    00371
    00378     static QFont largeFont(const QString &text = QString::null);
    00379
    00386     static bool isMultiHead();
    00387
    00400     static bool wheelMouseZooms();
    00401
    00402 private:
    00406     static void initStatic();
    00410     static void initColors();
    00414     static void rereadFontSettings();
    00418     static void rereadPathSettings();
    00422     static void rereadMouseSettings();
    00423
    00424
    00425     static QString* s_desktopPath;
    00426     static QString* s_autostartPath;
    00427     static QString* s_trashPath;
    00428     static QString* s_documentPath;
    00429     static QFont *_generalFont;
    00430     static QFont *_fixedFont;
    00431     static QFont *_toolBarFont;
    00432     static QFont *_menuFont;
    00433     static QFont *_windowTitleFont;
    00434     static QFont *_taskbarFont;
    00435     static QFont *_largeFont;
    00436     static QColor * kde2Gray;
    00437     static QColor * kde2Blue;
    00438     static QColor * kde2AlternateColor;
    00439     static KMouseSettings *s_mouseSettings;
    00440
    00441     friend class KApplication;
    00442 };
    00443
    00444 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:32 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001