tdeglobalsettings.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., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 #ifndef _TDEGLOBALSETTINGS_H 00019 #define _TDEGLOBALSETTINGS_H 00020 00021 #include <tqstring.h> 00022 #include <tqcolor.h> 00023 #include <tqfont.h> 00024 #include "tdelibs_export.h" 00025 00026 #define KDE_DEFAULT_SINGLECLICK false 00027 #define KDE_DEFAULT_ICONTEXTROUNDED true 00028 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0 00029 #define KDE_DEFAULT_AUTOSELECTDELAY -1 00030 #define KDE_DEFAULT_CHANGECURSOR true 00031 #define KDE_DEFAULT_LARGE_CURSOR false 00032 #define KDE_DEFAULT_VISUAL_ACTIVATE true 00033 #define KDE_DEFAULT_VISUAL_ACTIVATE_SPEED 50 00034 #define KDE_DEFAULT_WHEEL_ZOOM false 00035 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON true 00036 #define KDE_DEFAULT_OPAQUE_RESIZE true 00037 #define KDE_DEFAULT_BUTTON_LAYOUT 0 00038 #define KDE_DEFAULT_SHADE_SORT_COLUMN true 00039 #define KDE_DEFAULT_KONQ_ACTIVATION_EFFECT true 00040 00041 class KURL; 00042 00048 class TDECORE_EXPORT TDEGlobalSettings 00049 { 00050 public: 00051 00095 static int dndEventDelay(); 00096 00103 static bool singleClick(); 00104 00109 static bool iconUseRoundedRect(); 00110 00117 enum TearOffHandle { 00118 Disable = 0, 00119 ApplicationLevel, 00120 Enable 00121 }; 00122 00128 static TearOffHandle insertTearOffHandle(); 00129 00134 static bool changeCursorOverIcon(); 00135 00141 static bool visualActivate(); 00142 00148 static unsigned int visualActivateSpeed(); 00149 00155 static int autoSelectDelay(); 00156 00163 static int contextMenuKey (); 00164 00171 static bool showContextMenusOnPress (); 00172 00178 enum Completion { 00182 CompletionNone=1, 00186 CompletionAuto, 00190 CompletionMan, 00194 CompletionShell, 00198 CompletionPopup, 00203 CompletionPopupAuto 00204 }; 00205 00211 static Completion completionMode(); 00212 00216 struct KMouseSettings 00217 { 00218 enum { RightHanded = 0, LeftHanded = 1 }; 00219 int handed; // left or right 00220 }; 00221 00227 static KMouseSettings & mouseSettings(); 00228 00233 static TQString desktopPath() { initStatic(); return *s_desktopPath; } 00234 00239 static TQString autostartPath() { initStatic(); return *s_autostartPath; } 00240 00246 static TQString trashPath() { initStatic(); return *s_trashPath; } 00247 // KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs 00248 // to know the old location of the trash 00249 00254 static TQString documentPath() { initStatic(); return *s_documentPath; } 00255 00260 static TQString videosPath() { initStatic(); return *s_videosPath; } 00261 00266 static TQString musicPath() { initStatic(); return *s_musicPath; } 00267 00272 static TQString downloadPath() { initStatic(); return *s_downloadPath; } 00273 00278 static TQString picturesPath() { initStatic(); return *s_picturesPath; } 00279 00284 static TQColor toolBarHighlightColor(); 00285 00290 static TQColor inactiveTitleColor(); 00291 00296 static TQColor inactiveTextColor(); 00297 00302 static TQColor activeTitleColor(); 00303 00308 static TQColor activeTextColor(); 00309 00315 static int contrast(); 00316 00322 static TQColor buttonBackground(); 00323 00329 static TQColor buttonTextColor(); 00330 00336 static TQColor baseColor(); 00337 00343 static TQColor textColor(); 00344 00349 static TQColor linkColor(); 00350 00355 static TQColor visitedLinkColor(); 00356 00362 static TQColor highlightedTextColor(); 00363 00369 static TQColor highlightColor(); 00370 00379 static TQColor alternateBackgroundColor(); 00380 00388 static TQColor calculateAlternateBackgroundColor(const TQColor& base); 00389 00396 static bool shadeSortColumn(); 00397 00402 static TQFont generalFont(); 00403 00408 static TQFont fixedFont(); 00409 00414 static TQFont toolBarFont(); 00415 00420 static TQFont menuFont(); 00421 00426 static TQFont windowTitleFont(); 00427 00432 static TQFont taskbarFont(); 00433 00440 static TQFont largeFont(const TQString &text = TQString::null); 00441 00449 static bool isMultiHead(); 00450 00463 static bool wheelMouseZooms(); 00464 00475 static TQRect splashScreenDesktopGeometry(); 00476 00493 static TQRect desktopGeometry(const TQPoint& point); 00494 00508 static TQRect desktopGeometry(TQWidget* w); 00509 00518 static bool showIconsOnPushButtons(); 00519 00528 static bool showFilePreview(const KURL &); 00529 00538 static bool showKonqIconActivationEffect(); 00539 00548 static bool opaqueResize(); 00549 00557 static int buttonLayout(); 00558 00559 private: 00563 static void initStatic(); 00567 static void initColors(); 00571 static void rereadFontSettings(); 00575 static void rereadPathSettings(); 00579 static void rereadMouseSettings(); 00580 00581 00582 static TQString* s_desktopPath; 00583 static TQString* s_autostartPath; 00584 static TQString* s_trashPath; 00585 static TQString* s_documentPath; 00586 static TQString* s_picturesPath; 00587 static TQString* s_downloadPath; 00588 static TQString* s_musicPath; 00589 static TQString* s_videosPath; 00590 static TQFont *_generalFont; 00591 static TQFont *_fixedFont; 00592 static TQFont *_toolBarFont; 00593 static TQFont *_menuFont; 00594 static TQFont *_windowTitleFont; 00595 static TQFont *_taskbarFont; 00596 static TQFont *_largeFont; 00597 static TQColor * _trinity4Blue; 00598 static TQColor * _inactiveBackground; 00599 static TQColor * _inactiveForeground; 00600 static TQColor * _activeBackground; 00601 static TQColor * _buttonBackground; 00602 static TQColor * _selectBackground; 00603 static TQColor * _linkColor; 00604 static TQColor * _visitedLinkColor; 00605 static TQColor * alternateColor; 00606 static KMouseSettings *s_mouseSettings; 00607 00608 friend class TDEApplication; 00609 }; 00610 00611 #endif
Trinity API Reference