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

tdecore

  • tdecore
tdeglobalsettings.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 _TDEGLOBALSETTINGS_H
19 #define _TDEGLOBALSETTINGS_H
20 
21 #include <tqstring.h>
22 #include <tqcolor.h>
23 #include <tqfont.h>
24 #include "tdelibs_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 TDECORE_EXPORT TDEGlobalSettings
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.cpp, 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 TDEApplication;
629 };
630 
631 #endif
KURL
Represents and parses a URL.
Definition: kurl.h:128
TDEApplication
Controls and provides information to all KDE applications.
Definition: tdeapplication.h:95
TDEGlobalSettings
Access the KDE global configuration.
Definition: tdeglobalsettings.h:49
TDEGlobalSettings::musicPath
static TQString musicPath()
The path where documents are stored of the current user.
Definition: tdeglobalsettings.h:266
TDEGlobalSettings::Completion
Completion
This enum describes the completion mode used for by the TDECompletion class.
Definition: tdeglobalsettings.h:178
TDEGlobalSettings::CompletionShell
@ CompletionShell
Complete text much in the same way as a typical *nix shell would.
Definition: tdeglobalsettings.h:194
TDEGlobalSettings::CompletionAuto
@ CompletionAuto
Text is automatically filled in whenever possible.
Definition: tdeglobalsettings.h:186
TDEGlobalSettings::CompletionPopup
@ CompletionPopup
Lists all possible matches in a popup list-box to choose from.
Definition: tdeglobalsettings.h:198
TDEGlobalSettings::CompletionMan
@ CompletionMan
Same as automatic except shortest match is used for completion.
Definition: tdeglobalsettings.h:190
TDEGlobalSettings::downloadPath
static TQString downloadPath()
The path where documents are stored of the current user.
Definition: tdeglobalsettings.h:260
TDEGlobalSettings::videosPath
static TQString videosPath()
The path where documents are stored of the current user.
Definition: tdeglobalsettings.h:290
TDEGlobalSettings::templatesPath
static TQString templatesPath()
The path where templates are stored of the current user.
Definition: tdeglobalsettings.h:284
TDEGlobalSettings::desktopPath
static TQString desktopPath()
The path to the desktop directory of the current user.
Definition: tdeglobalsettings.h:248
TDEGlobalSettings::documentPath
static TQString documentPath()
The path where documents are stored of the current user.
Definition: tdeglobalsettings.h:254
TDEGlobalSettings::trashPath
static TQString trashPath()
DEPRECATED (starting from kde-3.4).
Definition: tdeglobalsettings.h:240
TDEGlobalSettings::TearOffHandle
TearOffHandle
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not.
Definition: tdeglobalsettings.h:117
TDEGlobalSettings::ApplicationLevel
@ ApplicationLevel
enable on application level
Definition: tdeglobalsettings.h:119
TDEGlobalSettings::picturesPath
static TQString picturesPath()
The path where documents are stored of the current user.
Definition: tdeglobalsettings.h:272
TDEGlobalSettings::autostartPath
static TQString autostartPath()
The path to the autostart directory of the current user.
Definition: tdeglobalsettings.h:233
TDEGlobalSettings::publicSharePath
static TQString publicSharePath()
The path of the public share of the current user.
Definition: tdeglobalsettings.h:278
TDEGlobalSettings::KMouseSettings
Describes the mouse settings.
Definition: tdeglobalsettings.h:217

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.1
This website is maintained by Timothy Pearson.