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

kdecore

  • kdecore
kglobalsettings.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 David Faure <faure@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _KGLOBALSETTINGS_H
19 #define _KGLOBALSETTINGS_H
20 
21 #include <tqstring.h>
22 #include <tqcolor.h>
23 #include <tqfont.h>
24 #include "kdelibs_export.h"
25 
26 #define KDE_DEFAULT_SINGLECLICK false
27 #define KDE_DEFAULT_ICONTEXTROUNDED true
28 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
29 #define KDE_DEFAULT_AUTOSELECTDELAY -1
30 #define KDE_DEFAULT_CHANGECURSOR true
31 #define KDE_DEFAULT_LARGE_CURSOR false
32 #define KDE_DEFAULT_VISUAL_ACTIVATE true
33 #define KDE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
34 #define KDE_DEFAULT_WHEEL_ZOOM false
35 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON true
36 #define KDE_DEFAULT_OPAQUE_RESIZE true
37 #define KDE_DEFAULT_BUTTON_LAYOUT 0
38 #define KDE_DEFAULT_SHADE_SORT_COLUMN true
39 #define KDE_DEFAULT_KONQ_ACTIVATION_EFFECT true
40 
41 class KURL;
42 
48 class KDECORE_EXPORT KGlobalSettings
49 {
50  public:
51 
95  static int dndEventDelay();
96 
103  static bool singleClick();
104 
109  static bool iconUseRoundedRect();
110 
117  enum TearOffHandle {
118  Disable = 0,
119  ApplicationLevel,
120  Enable
121  };
122 
128  static TearOffHandle insertTearOffHandle();
129 
134  static bool changeCursorOverIcon();
135 
141  static bool visualActivate();
142 
148  static unsigned int visualActivateSpeed();
149 
155  static int autoSelectDelay();
156 
163  static int contextMenuKey ();
164 
171  static bool showContextMenusOnPress ();
172 
178  enum Completion {
182  CompletionNone=1,
186  CompletionAuto,
190  CompletionMan,
194  CompletionShell,
198  CompletionPopup,
203  CompletionPopupAuto
204  };
205 
211  static Completion completionMode();
212 
216  struct KMouseSettings
217  {
218  enum { RightHanded = 0, LeftHanded = 1 };
219  int handed; // left or right
220  };
221 
227  static KMouseSettings & mouseSettings();
228 
233  static TQString autostartPath() { initPaths(); return *s_autostartPath; }
234 
240  static TQString trashPath() { initPaths(); return *s_trashPath; }
241  // KDE4: if you want to remove the above, move it to kdesktop/init.cc, which needs
242  // to know the old location of the trash
243 
248  static TQString desktopPath() { initPaths(); return *s_desktopPath; }
249 
254  static TQString documentPath() { initPaths(); return *s_documentPath; }
255 
260  static TQString downloadPath() { initPaths(); return *s_downloadPath; }
261 
266  static TQString musicPath() { initPaths(); return *s_musicPath; }
267 
272  static TQString picturesPath() { initPaths(); return *s_picturesPath; }
273 
278  static TQString publicSharePath() { initPaths(); return *s_publicSharePath; }
279 
284  static TQString templatesPath() { initPaths(); return *s_templatesPath; }
285 
290  static TQString videosPath() { initPaths(); return *s_videosPath; }
291 
296  static TQColor toolBarHighlightColor();
297 
302  static TQColor inactiveTitleColor();
303 
308  static TQColor inactiveTextColor();
309 
314  static TQColor activeTitleColor();
315 
320  static TQColor activeTextColor();
321 
327  static int contrast();
328 
334  static TQColor buttonBackground();
335 
341  static TQColor buttonTextColor();
342 
348  static TQColor baseColor();
349 
355  static TQColor textColor();
356 
361  static TQColor linkColor();
362 
367  static TQColor visitedLinkColor();
368 
374  static TQColor highlightedTextColor();
375 
381  static TQColor highlightColor();
382 
391  static TQColor alternateBackgroundColor();
392 
400  static TQColor calculateAlternateBackgroundColor(const TQColor& base);
401 
408  static bool shadeSortColumn();
409 
414  static TQFont generalFont();
415 
420  static TQFont fixedFont();
421 
426  static TQFont toolBarFont();
427 
432  static TQFont menuFont();
433 
438  static TQFont windowTitleFont();
439 
444  static TQFont taskbarFont();
445 
452  static TQFont largeFont(const TQString &text = TQString::null);
453 
461  static bool isMultiHead();
462 
475  static bool wheelMouseZooms();
476 
487  static TQRect splashScreenDesktopGeometry();
488 
505  static TQRect desktopGeometry(const TQPoint& point);
506 
520  static TQRect desktopGeometry(TQWidget* w);
521 
530  static bool showIconsOnPushButtons();
531 
540  static bool showFilePreview(const KURL &);
541 
550  static bool showKonqIconActivationEffect();
551 
560  static bool opaqueResize();
561 
569  static int buttonLayout();
570 
571 private:
577  static void initStatic();
581  static void initPaths();
585  static void initColors();
589  static void rereadFontSettings();
593  static void rereadPathSettings();
597  static void rereadMouseSettings();
598 
599 
600  static TQString *s_desktopPath;
601  static TQString *s_autostartPath;
602  static TQString *s_trashPath;
603  static TQString *s_documentPath;
604  static TQString *s_picturesPath;
605  static TQString *s_templatesPath;
606  static TQString *s_publicSharePath;
607  static TQString *s_downloadPath;
608  static TQString *s_musicPath;
609  static TQString *s_videosPath;
610  static TQFont *_generalFont;
611  static TQFont *_fixedFont;
612  static TQFont *_toolBarFont;
613  static TQFont *_menuFont;
614  static TQFont *_windowTitleFont;
615  static TQFont *_taskbarFont;
616  static TQFont *_largeFont;
617  static TQColor *_trinity4Blue;
618  static TQColor *_inactiveBackground;
619  static TQColor *_inactiveForeground;
620  static TQColor *_activeBackground;
621  static TQColor *_buttonBackground;
622  static TQColor *_selectBackground;
623  static TQColor *_linkColor;
624  static TQColor *_visitedLinkColor;
625  static TQColor *alternateColor;
626  static KMouseSettings *s_mouseSettings;
627 
628  friend class KApplication;
629 };
630 
631 #endif
KURL
Represents and parses a URL.
Definition: kurl.h:127
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:96
KGlobalSettings::musicPath
static TQString musicPath()
The path where documents are stored of the current user.
Definition: kglobalsettings.h:266
KGlobalSettings::ApplicationLevel
enable on application level
Definition: kglobalsettings.h:119
KGlobalSettings::downloadPath
static TQString downloadPath()
The path where documents are stored of the current user.
Definition: kglobalsettings.h:260
KGlobalSettings::picturesPath
static TQString picturesPath()
The path where documents are stored of the current user.
Definition: kglobalsettings.h:272
KGlobalSettings::autostartPath
static TQString autostartPath()
The path to the autostart directory of the current user.
Definition: kglobalsettings.h:233
KGlobalSettings::KMouseSettings
Describes the mouse settings.
Definition: kglobalsettings.h:216
KGlobalSettings::CompletionAuto
Text is automatically filled in whenever possible.
Definition: kglobalsettings.h:186
KGlobalSettings::desktopPath
static TQString desktopPath()
The path to the desktop directory of the current user.
Definition: kglobalsettings.h:248
KGlobalSettings::TearOffHandle
TearOffHandle
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not...
Definition: kglobalsettings.h:117
KGlobalSettings::publicSharePath
static TQString publicSharePath()
The path of the public share of the current user.
Definition: kglobalsettings.h:278
KGlobalSettings::documentPath
static TQString documentPath()
The path where documents are stored of the current user.
Definition: kglobalsettings.h:254
KGlobalSettings
Access the KDE global configuration.
Definition: kglobalsettings.h:48
KGlobalSettings::CompletionPopup
Lists all possible matches in a popup list-box to choose from.
Definition: kglobalsettings.h:198
KGlobalSettings::videosPath
static TQString videosPath()
The path where documents are stored of the current user.
Definition: kglobalsettings.h:290
KGlobalSettings::CompletionMan
Same as automatic except shortest match is used for completion.
Definition: kglobalsettings.h:190
KGlobalSettings::trashPath
static TQString trashPath()
DEPRECATED (starting from kde-3.4).
Definition: kglobalsettings.h:240
KGlobalSettings::Completion
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition: kglobalsettings.h:178
KGlobalSettings::templatesPath
static TQString templatesPath()
The path where templates are stored of the current user.
Definition: kglobalsettings.h:284
KGlobalSettings::CompletionShell
Complete text much in the same way as a typical *nix shell would.
Definition: kglobalsettings.h:194

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.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |