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

KDEUI

  • 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
45class KUrl;
46
47class QColor;
48class QFont;
49class QPoint;
50class QRect;
51class QWidget;
52
58class KDEUI_EXPORT KGlobalSettings : public QObject
59{
60 Q_OBJECT
61
62public:
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
470 };
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
597Q_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
679private:
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
690Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::GraphicEffects)
691Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::ActivateOptions)
692
693#endif
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:83
KGlobalSettings
Access the KDE global configuration.
Definition: kglobalsettings.h:59
KGlobalSettings::GraphicEffect
GraphicEffect
Definition: kglobalsettings.h:464
KGlobalSettings::blockShortcuts
void blockShortcuts(int data)
Emitted by BlockShortcuts.
KGlobalSettings::ChangeType
ChangeType
An identifier for change signals.
Definition: kglobalsettings.h:543
KGlobalSettings::CursorChanged
@ CursorChanged
Definition: kglobalsettings.h:544
KGlobalSettings::ClipboardConfigChanged
@ ClipboardConfigChanged
Definition: kglobalsettings.h:545
KGlobalSettings::BlockShortcuts
@ BlockShortcuts
Definition: kglobalsettings.h:546
KGlobalSettings::ActivateOption
ActivateOption
Specifies options passed to activate().
Definition: kglobalsettings.h:567
KGlobalSettings::naturalSortingChanged
void naturalSortingChanged()
Emitted when the natural sorting has been changed.
KGlobalSettings::kdisplayPaletteChanged
void kdisplayPaletteChanged()
Emitted when the application has changed its palette due to a KControl request.
KGlobalSettings::kdisplayStyleChanged
void kdisplayStyleChanged()
Emitted when the application has changed its GUI style in response to a KControl request.
KGlobalSettings::appearanceChanged
void appearanceChanged()
Emitted when the application has changed either its GUI style, its font or its palette in response to...
KGlobalSettings::Completion
Completion
This enum describes the completion mode used for by the KCompletion class.
Definition: kglobalsettings.h:179
KGlobalSettings::CompletionPopup
@ CompletionPopup
Lists all possible matches in a popup list-box to choose from.
Definition: kglobalsettings.h:199
KGlobalSettings::CompletionShell
@ CompletionShell
Complete text much in the same way as a typical *nix shell would.
Definition: kglobalsettings.h:195
KGlobalSettings::CompletionMan
@ CompletionMan
Same as automatic except shortest match is used for completion.
Definition: kglobalsettings.h:191
KGlobalSettings::CompletionAuto
@ CompletionAuto
Text is automatically filled in whenever possible.
Definition: kglobalsettings.h:187
KGlobalSettings::kdisplayFontChanged
void kdisplayFontChanged()
Emitted when the application has changed its font in response to a KControl request.
KGlobalSettings::iconChanged
void iconChanged(int group)
Emitted when the global icon settings have been changed.
KGlobalSettings::toolbarAppearanceChanged
void toolbarAppearanceChanged(int)
Emitted when the settings for toolbars have been changed.
KGlobalSettings::cursorChanged
void cursorChanged()
Emitted when the cursor theme has been changed.
KGlobalSettings::TearOffHandle
TearOffHandle
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not.
Definition: kglobalsettings.h:130
KGlobalSettings::ApplicationLevel
@ ApplicationLevel
enable on application level
Definition: kglobalsettings.h:132
KGlobalSettings::settingsChanged
void settingsChanged(int category)
Emitted when the global settings have been changed.
KGlobalSettings::SettingsCategory
SettingsCategory
Valid values for the settingsChanged signal.
Definition: kglobalsettings.h:593
KGlobalSettings::SETTINGS_LOCALE
@ SETTINGS_LOCALE
Definition: kglobalsettings.h:595
KGlobalSettings::SETTINGS_POPUPMENU
@ SETTINGS_POPUPMENU
Definition: kglobalsettings.h:594
KGlobalSettings::SETTINGS_COMPLETION
@ SETTINGS_COMPLETION
Definition: kglobalsettings.h:593
KSharedPtr< KSharedConfig >
KUrl
QObject
QWidget
kdeui_export.h
ksharedconfig.h
KGlobalSettings::KMouseSettings
Describes the mouse settings.
Definition: kglobalsettings.h:218
KGlobalSettings::KMouseSettings::handed
int handed
Definition: kglobalsettings.h:220
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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