• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • kernel
kglobalsettings.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000,2006 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 <kdeui_export.h>
22 #include <ksharedconfig.h>
23 #include <QtCore/QObject>
24 #include <QtCore/QString>
25 #include <QtGui/QPalette>
26 
27 #define KDE_DEFAULT_SINGLECLICK true
28 #define KDE_DEFAULT_SMOOTHSCROLL true
29 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
30 #define KDE_DEFAULT_AUTOSELECTDELAY -1
31 #define KDE_DEFAULT_CHANGECURSOR true
32 #define KDE_DEFAULT_LARGE_CURSOR false
33 #define KDE_DEFAULT_WHEEL_ZOOM false
34 #ifdef Q_WS_MAEMO_5
35 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON false
36 #else
37 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON true
38 #endif
39 #define KDE_DEFAULT_OPAQUE_RESIZE true
40 #define KDE_DEFAULT_BUTTON_LAYOUT 0
41 #define KDE_DEFAULT_SHADE_SORT_COLUMN true
42 #define KDE_DEFAULT_ALLOW_DEFAULT_BACKGROUND_IMAGES true
43 #define KDE_DEFAULT_NATURAL_SORTING true
44 
45 class KUrl;
46 
47 class QColor;
48 class QFont;
49 class QPoint;
50 class QRect;
51 class QWidget;
52 
58 class KDEUI_EXPORT KGlobalSettings : public QObject
59 {
60  Q_OBJECT
61 
62 public:
63  ~KGlobalSettings();
64 
108  static int dndEventDelay();
109 
116  static bool singleClick();
117 
123  static bool smoothScroll();
124 
130  enum TearOffHandle {
131  Disable = 0,
132  ApplicationLevel,
133  Enable
134  };
135 
140  static TearOffHandle insertTearOffHandle();
141 
146  static bool changeCursorOverIcon();
147 
153  static int autoSelectDelay();
154 
162 #ifndef KDE_NO_DEPRECATED
163  static KDE_DEPRECATED int contextMenuKey ();
164 #endif
165 
172  static bool showContextMenusOnPress ();
173 
179  enum Completion {
183  CompletionNone=1,
187  CompletionAuto,
191  CompletionMan,
195  CompletionShell,
199  CompletionPopup,
204  CompletionPopupAuto
205  };
206 
212  static Completion completionMode();
213 
217  struct KMouseSettings
218  {
219  enum { RightHanded = 0, LeftHanded = 1 };
220  int handed; // left or right
221  };
222 
228  static KMouseSettings & mouseSettings();
229 
234  static QString desktopPath();
235 
240  static QString autostartPath();
241 
246  static QString documentPath();
247 
252  static QString musicPath();
253 
258  static QString videosPath();
259 
264  static QString downloadPath();
265 
270  static QString picturesPath();
271 
276  static QColor inactiveTitleColor();
277 
282  static QColor inactiveTextColor();
283 
288  static QColor activeTitleColor();
289 
294  static QColor activeTextColor();
295 
301  static int contrast();
302 
310  static qreal contrastF(const KSharedConfigPtr &config = KSharedConfigPtr());
311 
317  static bool shadeSortColumn();
318 
325  static bool allowDefaultBackgroundImages();
326 
331  static QFont generalFont();
332 
337  static QFont fixedFont();
338 
343  static QFont toolBarFont();
344 
349  static QFont menuFont();
350 
355  static QFont windowTitleFont();
356 
361  static QFont taskbarFont();
362 
368  static QFont largeFont(const QString &text = QString());
369 
374  static QFont smallestReadableFont();
375 
383  static bool isMultiHead();
384 
396  static bool wheelMouseZooms();
397 
407  static QRect splashScreenDesktopGeometry();
408 
424  static QRect desktopGeometry(const QPoint& point);
425 
438  static QRect desktopGeometry(const QWidget* w);
439 
446  static bool showIconsOnPushButtons();
447 
462  static bool naturalSorting();
463 
464  enum GraphicEffect {
465  NoEffects = 0x0000,
466  GradientEffects = 0x0001,
467  SimpleAnimationEffects = 0x0002,
468  ComplexAnimationEffects = 0x0006
469  };
471 
472  Q_DECLARE_FLAGS(GraphicEffects, GraphicEffect)
473 
474 
479  static GraphicEffects graphicEffectsLevel();
480 
487  static GraphicEffects graphicEffectsLevelDefault();
488 
495  static bool showFilePreview(const KUrl &);
496 
503  static bool opaqueResize();
504 
510  static int buttonLayout();
511 
522  static QPalette createApplicationPalette(const KSharedConfigPtr &config = KSharedConfigPtr());
523 
537  static QPalette createNewApplicationPalette(const KSharedConfigPtr &config = KSharedConfigPtr());
538 
543  enum ChangeType { PaletteChanged = 0, FontChanged, StyleChanged,
544  SettingsChanged, IconChanged, CursorChanged,
545  ToolbarStyleChanged, ClipboardConfigChanged,
546  BlockShortcuts, NaturalSortingChanged };
547 
554  static void emitChange(ChangeType changeType, int arg = 0);
555 
560  static KGlobalSettings* self();
561 
567  enum ActivateOption {
568  ApplySettings = 0x1,
569  ListenForChanges = 0x2
570  };
571  Q_DECLARE_FLAGS(ActivateOptions, ActivateOption)
572 
573 
581  void activate(); //KDE5: Merge with the overloaded method below
582 
588  void activate(ActivateOptions options);
589 
593  enum SettingsCategory { SETTINGS_MOUSE, SETTINGS_COMPLETION, SETTINGS_PATHS,
594  SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS,
595  SETTINGS_LOCALE, SETTINGS_STYLE };
596 
597 Q_SIGNALS:
608  void kdisplayPaletteChanged();
609 
621  void kdisplayStyleChanged();
622 
634  void kdisplayFontChanged();
635 
642  void appearanceChanged();
643 
647  void toolbarAppearanceChanged(int);
648 
655  void settingsChanged(int category);
656 
661  void iconChanged(int group);
662 
666  void cursorChanged();
667 
671  void blockShortcuts(int data);
672 
677  void naturalSortingChanged();
678 
679 private:
680  friend class KApplication;
681 
682  KGlobalSettings();
683 
684  class Private;
685  Private* const d;
686 
687  Q_PRIVATE_SLOT(d, void _k_slotNotifyChange(int, int))
688 };
689 
690 Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::GraphicEffects)
691 Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::ActivateOptions)
692 
693 #endif
KSharedPtr< KSharedConfig >
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:82
QWidget
KGlobalSettings::ApplicationLevel
enable on application level
Definition: kglobalsettings.h:132
QFont
KGlobalSettings::ChangeType
ChangeType
An identifier for change signals.
Definition: kglobalsettings.h:543
KGlobalSettings::ToolbarStyleChanged
Definition: kglobalsettings.h:545
KGlobalSettings::SettingsChanged
Definition: kglobalsettings.h:544
QPoint
KGlobalSettings::StyleChanged
Definition: kglobalsettings.h:543
KUrl
QRect
QObject
KGlobalSettings::KMouseSettings
Describes the mouse settings.
Definition: kglobalsettings.h:217
KGlobalSettings::CompletionAuto
Text is automatically filled in whenever possible.
Definition: kglobalsettings.h:187
KGlobalSettings::TearOffHandle
TearOffHandle
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not...
Definition: kglobalsettings.h:130
KGlobalSettings::SettingsCategory
SettingsCategory
Valid values for the settingsChanged signal.
Definition: kglobalsettings.h:593
ksharedconfig.h
QString
QColor
KGlobalSettings
Access the KDE global configuration.
Definition: kglobalsettings.h:58
KGlobalSettings::CompletionPopup
Lists all possible matches in a popup list-box to choose from.
Definition: kglobalsettings.h:199
KGlobalSettings::CompletionMan
Same as automatic except shortest match is used for completion.
Definition: kglobalsettings.h:191
KGlobalSettings::Completion
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition: kglobalsettings.h:179
KGlobalSettings::SETTINGS_SHORTCUTS
Definition: kglobalsettings.h:594
kdeui_export.h
KGlobalSettings::ActivateOption
ActivateOption
Specifies options passed to activate().
Definition: kglobalsettings.h:567
KGlobalSettings::CompletionShell
Complete text much in the same way as a typical *nix shell would.
Definition: kglobalsettings.h:195
KGlobalSettings::KMouseSettings::handed
int handed
Definition: kglobalsettings.h:220
KGlobalSettings::GraphicEffect
GraphicEffect
Definition: kglobalsettings.h:464
QPalette
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal