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 #define KDE_DEFAULT_BUTTON_LAYOUT 0 00036 00037 class KURL; 00038 00045 class KGlobalSettings 00046 { 00047 public: 00048 00092 static int dndEventDelay(); 00093 00100 static bool singleClick(); 00101 00108 enum TearOffHandle { 00109 Disable = 0, 00110 ApplicationLevel, 00111 Enable 00112 }; 00113 00119 static TearOffHandle insertTearOffHandle(); 00120 00125 static bool changeCursorOverIcon(); 00126 00132 static bool visualActivate(); 00133 00139 static unsigned int visualActivateSpeed(); 00140 00146 static int autoSelectDelay(); 00147 00154 static int contextMenuKey (); 00155 00162 static bool showContextMenusOnPress (); 00163 00169 enum Completion { 00173 CompletionNone=1, 00177 CompletionAuto, 00181 CompletionMan, 00185 CompletionShell, 00189 CompletionPopup, 00194 CompletionPopupAuto 00195 }; 00196 00202 static Completion completionMode(); 00203 00207 struct KMouseSettings 00208 { 00209 enum { RightHanded = 0, LeftHanded = 1 }; 00210 int handed; // left or right 00211 }; 00212 00217 static KMouseSettings & mouseSettings(); 00218 00223 static QString desktopPath() { initStatic(); return *s_desktopPath; } 00224 00229 static QString autostartPath() { initStatic(); return *s_autostartPath; } 00230 00235 static QString trashPath() { initStatic(); return *s_trashPath; } 00236 00241 static QString documentPath() { initStatic(); return *s_documentPath; } 00242 00243 00248 static QColor toolBarHighlightColor(); 00249 00254 static QColor inactiveTitleColor(); 00255 00260 static QColor inactiveTextColor(); 00261 00266 static QColor activeTitleColor(); 00267 00272 static QColor activeTextColor(); 00273 00279 static int contrast(); 00280 00286 static QColor baseColor(); 00287 00293 static QColor textColor(); 00294 00299 static QColor linkColor(); 00300 00305 static QColor visitedLinkColor(); 00306 00312 static QColor highlightedTextColor(); 00313 00319 static QColor highlightColor(); 00320 00329 static QColor alternateBackgroundColor(); 00330 00338 static QColor calculateAlternateBackgroundColor(const QColor& base); 00339 00340 00345 static QFont generalFont(); 00346 00351 static QFont fixedFont(); 00352 00357 static QFont toolBarFont(); 00358 00363 static QFont menuFont(); 00364 00369 static QFont windowTitleFont(); 00370 00375 static QFont taskbarFont(); 00376 00383 static QFont largeFont(const QString &text = QString::null); 00384 00391 static bool isMultiHead(); 00392 00405 static bool wheelMouseZooms(); 00406 00417 static QRect splashScreenDesktopGeometry(); 00418 00435 static QRect desktopGeometry(const QPoint& point); 00436 00450 static QRect desktopGeometry(QWidget* w); 00451 00460 static bool showIconsOnPushButtons(); 00461 00470 static bool showFilePreview(const KURL &); 00471 00480 static bool opaqueResize(); 00481 00489 static int buttonLayout(); 00490 00491 private: 00495 static void initStatic(); 00499 static void initColors(); 00503 static void rereadFontSettings(); 00507 static void rereadPathSettings(); 00511 static void rereadMouseSettings(); 00512 00513 00514 static QString* s_desktopPath; 00515 static QString* s_autostartPath; 00516 static QString* s_trashPath; 00517 static QString* s_documentPath; 00518 static QFont *_generalFont; 00519 static QFont *_fixedFont; 00520 static QFont *_toolBarFont; 00521 static QFont *_menuFont; 00522 static QFont *_windowTitleFont; 00523 static QFont *_taskbarFont; 00524 static QFont *_largeFont; 00525 static QColor * kde2Gray; 00526 static QColor * kde2Blue; 00527 static QColor * kde2AlternateColor; 00528 static KMouseSettings *s_mouseSettings; 00529 00530 friend class KApplication; 00531 }; 00532 00533 #endif
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:10 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003