• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

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., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 #ifndef _KGLOBALSETTINGS_H
00019 #define _KGLOBALSETTINGS_H
00020 
00021 #include <tqstring.h>
00022 #include <tqcolor.h>
00023 #include <tqfont.h>
00024 #include "kdelibs_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 KDECORE_EXPORT KGlobalSettings
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 autostartPath() { initPaths(); return *s_autostartPath; }
00234 
00240     static TQString trashPath() { initPaths(); return *s_trashPath; }
00241     // KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs
00242     // to know the old location of the trash
00243 
00248     static TQString desktopPath() { initPaths(); return *s_desktopPath; }
00249 
00254     static TQString documentPath() { initPaths(); return *s_documentPath; }
00255 
00260     static TQString downloadPath() { initPaths(); return *s_downloadPath; }
00261 
00266     static TQString musicPath() { initPaths(); return *s_musicPath; }
00267 
00272     static TQString picturesPath() { initPaths(); return *s_picturesPath; }
00273 
00278     static TQString publicSharePath() { initPaths(); return *s_publicSharePath; }
00279 
00284     static TQString templatesPath() { initPaths(); return *s_templatesPath; }
00285 
00290     static TQString videosPath() { initPaths(); return *s_videosPath; }
00291 
00296     static TQColor toolBarHighlightColor();
00297 
00302     static TQColor inactiveTitleColor();
00303 
00308     static TQColor inactiveTextColor();
00309 
00314     static TQColor activeTitleColor();
00315 
00320     static TQColor activeTextColor();
00321 
00327     static int contrast();
00328 
00334     static TQColor buttonBackground();
00335 
00341     static TQColor buttonTextColor();
00342 
00348     static TQColor baseColor();
00349 
00355     static TQColor textColor();
00356 
00361     static TQColor linkColor();
00362 
00367     static TQColor visitedLinkColor();
00368 
00374     static TQColor highlightedTextColor();
00375 
00381     static TQColor highlightColor();
00382 
00391     static TQColor alternateBackgroundColor();
00392 
00400     static TQColor calculateAlternateBackgroundColor(const TQColor& base);
00401 
00408     static bool shadeSortColumn();
00409 
00414     static TQFont generalFont();
00415 
00420     static TQFont fixedFont();
00421 
00426     static TQFont toolBarFont();
00427 
00432     static TQFont menuFont();
00433 
00438     static TQFont windowTitleFont();
00439 
00444     static TQFont taskbarFont();
00445 
00452     static TQFont largeFont(const TQString &text = TQString::null);
00453 
00461     static bool isMultiHead();
00462 
00475     static bool wheelMouseZooms();
00476 
00487     static TQRect splashScreenDesktopGeometry();
00488 
00505     static TQRect desktopGeometry(const TQPoint& point);
00506 
00520     static TQRect desktopGeometry(TQWidget* w);
00521 
00530     static bool showIconsOnPushButtons();
00531 
00540     static bool showFilePreview(const KURL &);
00541 
00550     static bool showKonqIconActivationEffect();
00551 
00560     static bool opaqueResize();
00561 
00569     static int buttonLayout();
00570 
00571 private:
00577     static void initStatic();
00581     static void initPaths();
00585     static void initColors();
00589     static void rereadFontSettings();
00593     static void rereadPathSettings();
00597     static void rereadMouseSettings();
00598 
00599 
00600     static TQString *s_desktopPath;
00601     static TQString *s_autostartPath;
00602     static TQString *s_trashPath;
00603     static TQString *s_documentPath;
00604     static TQString *s_picturesPath;
00605     static TQString *s_templatesPath;
00606     static TQString *s_publicSharePath;
00607     static TQString *s_downloadPath;
00608     static TQString *s_musicPath;
00609     static TQString *s_videosPath;
00610     static TQFont *_generalFont;
00611     static TQFont *_fixedFont;
00612     static TQFont *_toolBarFont;
00613     static TQFont *_menuFont;
00614     static TQFont *_windowTitleFont;
00615     static TQFont *_taskbarFont;
00616     static TQFont *_largeFont;
00617     static TQColor *_trinity4Blue;
00618     static TQColor *_inactiveBackground;
00619     static TQColor *_inactiveForeground;
00620     static TQColor *_activeBackground;
00621     static TQColor *_buttonBackground;
00622     static TQColor *_selectBackground;
00623     static TQColor *_linkColor;
00624     static TQColor *_visitedLinkColor;
00625     static TQColor *alternateColor;
00626     static KMouseSettings *s_mouseSettings;
00627 
00628     friend class KApplication;
00629 };
00630 
00631 #endif

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |