File indexing completed on 2024-04-14 14:20:20

0001 /* This file is part of the KDE libraries
0002    Copyright (C) 2000,2006 David Faure <faure@kde.org>
0003 
0004    This library is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License version 2 as published by the Free Software Foundation.
0007 
0008    This library is distributed in the hope that it will be useful,
0009    but WITHOUT ANY WARRANTY; without even the implied warranty of
0010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011    Library General Public License for more details.
0012 
0013    You should have received a copy of the GNU Library General Public License
0014    along with this library; see the file COPYING.LIB.  If not, write to
0015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016    Boston, MA 02110-1301, USA.
0017 */
0018 #ifndef _KGLOBALSETTINGS_H
0019 #define _KGLOBALSETTINGS_H
0020 
0021 #include <kdelibs4support_export.h>
0022 #include <ksharedconfig.h>
0023 #include <QObject>
0024 #include <QString>
0025 #include <QPalette>
0026 
0027 #define KDE_DEFAULT_SINGLECLICK true
0028 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
0029 #define KDE_DEFAULT_AUTOSELECTDELAY -1
0030 #define KDE_DEFAULT_CHANGECURSOR true
0031 #define KDE_DEFAULT_LARGE_CURSOR false
0032 #define KDE_DEFAULT_WHEEL_ZOOM false
0033 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON true
0034 #define KDE_DEFAULT_OPAQUE_RESIZE true
0035 #define KDE_DEFAULT_BUTTON_LAYOUT 0
0036 #define KDE_DEFAULT_SHADE_SORT_COLUMN true
0037 #define KDE_DEFAULT_ALLOW_DEFAULT_BACKGROUND_IMAGES true
0038 #define KDE_DEFAULT_NATURAL_SORTING true
0039 
0040 class QColor;
0041 class QFont;
0042 class QPoint;
0043 class QRect;
0044 class QWidget;
0045 
0046 /**
0047  * Access the KDE global configuration.
0048  *
0049  * @author David Faure \<faure@kde.org\>
0050  */
0051 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KGlobalSettings : public QObject
0052 {
0053     Q_OBJECT
0054 
0055 public:
0056     ~KGlobalSettings() override;
0057 
0058     /**
0059      * Returns a threshold in pixels for drag & drop operations.
0060      * As long as the mouse movement has not exceeded this number
0061      * of pixels in either X or Y direction no drag operation may
0062      * be started. This prevents spurious drags when the user intended
0063      * to click on something but moved the mouse a bit while doing so.
0064      *
0065      * For this to work you must save the position of the mouse (oldPos)
0066      * in the QWidget::mousePressEvent().
0067      * When the position of the mouse (newPos)
0068      * in a QWidget::mouseMoveEvent() exceeds this threshold
0069      * you may start a drag
0070      * which should originate from oldPos.
0071      *
0072      * Example code:
0073      * \code
0074      * void KColorCells::mousePressEvent( QMouseEvent *e )
0075      * {
0076      *    mOldPos = e->pos();
0077      * }
0078      *
0079      * void KColorCells::mouseMoveEvent( QMouseEvent *e )
0080      * {
0081      *    if( !(e->state() && LeftButton)) return;
0082      *
0083      *    int delay = QApplication::startDragDistance();
0084      *    QPoint newPos = e->pos();
0085      *    if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
0086      *       newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
0087      *    {
0088      *       // Drag color object
0089      *       int cell = posToCell(mOldPos); // Find color at mOldPos
0090      *       if ((cell != -1) && colors[cell].isValid())
0091      *       {
0092      *          KColorDrag *d = KColorDrag::makeDrag( colors[cell], this);
0093      *          d->dragCopy();
0094      *       }
0095      *    }
0096      * }
0097      * \endcode
0098      * @return the threshold for drag & drop in pixels
0099      * @deprecated since 5.0, use QApplication::startDragDistance() instead.
0100      */
0101 #ifndef KDELIBS4SUPPORT_NO_DEPRECATED
0102     static KDELIBS4SUPPORT_DEPRECATED int dndEventDelay();
0103 #endif
0104 
0105     /**
0106      * Returns whether KDE runs in single (default) or double click
0107      * mode.
0108      * see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
0109      * @return true if single click mode, or false if double click mode.
0110      * @deprecated since 5.0, use style->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick, 0, widget)
0111      **/
0112 #ifndef KDELIBS4SUPPORT_NO_DEPRECATED
0113     static KDELIBS4SUPPORT_DEPRECATED bool singleClick();
0114 #endif
0115 
0116     /**
0117      * Checks whether the cursor changes over icons.
0118      * @return the KDE setting for "change cursor over icon"
0119      */
0120     static bool changeCursorOverIcon();
0121 
0122     /**
0123      * Returns the KDE setting for the auto-select option.
0124      *
0125      * @return the auto-select delay or -1 if auto-select is disabled.
0126      */
0127     static int autoSelectDelay();
0128 
0129     /**
0130      * Returns the KDE setting for context menus.
0131      *
0132      * @return whether context menus should be shown on button press
0133      * or button release (click).
0134      */
0135     static bool showContextMenusOnPress();
0136 
0137     /**
0138      * This enum describes the completion mode used for by the KCompletion class.
0139      * See <a href="http://developer.kde.org/documentation/standards/kde/style/keys/completion.html">
0140      * the styleguide</a>.
0141      *
0142      * @deprecated Use KCompletion
0143      **/
0144     enum Completion {
0145         /**
0146          * No completion is used.
0147          */
0148         CompletionNone = 1,
0149         /**
0150          * Text is automatically filled in whenever possible.
0151          */
0152         CompletionAuto,
0153         /**
0154          * Same as automatic except shortest match is used for completion.
0155          */
0156         CompletionMan,
0157         /**
0158          * Complete text much in the same way as a typical *nix shell would.
0159          */
0160         CompletionShell,
0161         /**
0162          * Lists all possible matches in a popup list-box to choose from.
0163          */
0164         CompletionPopup,
0165         /**
0166          * Lists all possible matches in a popup list-box to choose from, and automatically
0167          * fill the result whenever possible.
0168          */
0169         CompletionPopupAuto
0170     };
0171 
0172     /**
0173      * Returns the preferred completion mode setting.
0174      *
0175      * @return Completion.  Default is @p CompletionPopup.
0176      */
0177     static Completion completionMode();
0178 
0179     /**
0180      * Describes the mouse settings.
0181      */
0182     struct KMouseSettings {
0183         enum { RightHanded = 0, LeftHanded = 1 };
0184         int handed; // left or right
0185     };
0186 
0187     /**
0188      * This returns the current mouse settings.
0189      * On Windows, settings are retrieved from the system.
0190      * @return the current mouse settings
0191      */
0192     static KMouseSettings &mouseSettings();
0193 
0194     /**
0195      * The path to the desktop directory of the current user.
0196      * @return the user's desktop directory
0197      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).
0198      */
0199     static KDELIBS4SUPPORT_DEPRECATED QString desktopPath();
0200 
0201     /**
0202      * The path to the autostart directory of the current user.
0203      * @return the path of the autostart directory
0204      */
0205     //static QString autostartPath(); // Removed in KDE5, use XDG autostart paths
0206 
0207     /**
0208      * The path where documents are stored of the current user.
0209      * @return the path of the document directory
0210      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation).
0211      */
0212     static KDELIBS4SUPPORT_DEPRECATED QString documentPath();
0213 
0214     /**
0215      * The path where music are stored of the current user.
0216      * @return the path of the music directory
0217      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::MusicLocation).
0218      */
0219     static KDELIBS4SUPPORT_DEPRECATED QString musicPath();
0220 
0221     /**
0222      * The path where videos are stored of the current user.
0223      * @return the path of the video directory
0224      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::MoviesLocation).
0225      */
0226     static KDELIBS4SUPPORT_DEPRECATED QString videosPath();
0227 
0228     /**
0229      * The path where download are stored of the current user.
0230      * @return the path of the download directory
0231      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::DownloadLocation).
0232      */
0233     static KDELIBS4SUPPORT_DEPRECATED QString downloadPath();
0234 
0235     /**
0236      * The path where pictures are stored of the current user.
0237      * @return the path of the pictures directory
0238      * @deprecated since 5.0, use QStandardPaths::writableLocation(QStandardPaths::PicturesLocation).
0239      */
0240     static KDELIBS4SUPPORT_DEPRECATED QString picturesPath();
0241 
0242     /**
0243      * The default color to use for inactive titles.
0244      * @return the inactive title color
0245      * @deprecated since 5.0, This used to export the color of the titlebar.
0246      * If you wanted to query the color of the inactive window background, use
0247      * KColorScheme(QPalette::Inactive, KColorScheme::Window).background().color(),
0248      * otherwise please read the setting from kdeglobals/WM/inactiveBackground directly
0249      */
0250     static KDELIBS4SUPPORT_DEPRECATED QColor inactiveTitleColor();
0251 
0252     /**
0253      * The default color to use for inactive texts.
0254      * @return the inactive text color
0255      * @deprecated since 5.0, This used to export the color of the titlebar.
0256      * If you wanted to query the color of the inactive window foreground, use
0257      * KColorScheme(QPalette::Inactive, KColorScheme::Window).foreground().color()
0258      * otherwise please read the setting from kdeglobals/WM/inactiveForeground directly
0259      */
0260     static KDELIBS4SUPPORT_DEPRECATED QColor inactiveTextColor();
0261 
0262     /**
0263      * The default color to use for active titles.
0264      * @return the active title color
0265      * @deprecated since 5.0, This used to export the color of the titlebar.
0266      * If you wanted to query the color of the active window background, use
0267      * KColorScheme(QPalette::Active, KColorScheme::Window).background(KColorScheme::ActiveBackground).color(),
0268      * otherwise please read the setting from kdeglobals/WM/activeBackground directly
0269      */
0270     static KDELIBS4SUPPORT_DEPRECATED QColor activeTitleColor();
0271 
0272     /**
0273      * The default color to use for active texts.
0274      * @return the active text color
0275      * @deprecated since 5.0, This used to export the color of the titlebar.
0276      * If you wanted to query the color of the active window foreground, use
0277      * KColorScheme(QPalette::Active, KColorScheme::Window).foreground(KColorScheme::ActiveText).color(),
0278      * otherwise please read the setting from kdeglobals/WM/activeForeground directly
0279      */
0280     static KDELIBS4SUPPORT_DEPRECATED QColor activeTextColor();
0281 
0282     /**
0283      * Returns the contrast for borders.
0284      * @return the contrast (between 0 for minimum and 10 for maximum
0285      *         contrast)
0286      * @deprecated since 5.0, use KColorScheme::contrast()
0287      */
0288     static KDELIBS4SUPPORT_DEPRECATED int contrast();
0289 
0290     /**
0291      * Returns the contrast for borders as a floating point value.
0292      * @param config pointer to the config from which to read the contrast
0293      * setting (the default is to use KSharedConfig::openConfig())
0294      * @return the contrast (between 0.0 for minimum and 1.0 for maximum
0295      *         contrast)
0296      * @deprecated since 5.0, use KColorScheme::contrastF(config)
0297      */
0298     static KDELIBS4SUPPORT_DEPRECATED qreal contrastF(const KSharedConfigPtr &config = KSharedConfigPtr());
0299 
0300     /**
0301      * Returns if the sorted column in a K3ListView shall be drawn with a
0302      * shaded background color.
0303      * @return true if the sorted column shall be shaded
0304      */
0305     static bool shadeSortColumn();
0306 
0307     /**
0308      * Returns if default background images are allowed by the color scheme.
0309      * A "default" background image is just that, i.e. the user has not
0310      * actively selected a background image to use.
0311      * @return true if default background images may be used
0312      */
0313     static bool allowDefaultBackgroundImages();
0314 
0315     /**
0316      * Returns the default general font.
0317      * @return the default general font.
0318      */
0319     static QFont generalFont();
0320 
0321     /**
0322      * Returns the default fixed font.
0323      * @return the default fixed font.
0324      * @deprecated since 5.0, use QFontDatabase::systemFont(QFontDatabase::FixedFont)
0325      */
0326     static KDELIBS4SUPPORT_DEPRECATED QFont fixedFont();
0327 
0328     /**
0329      * Returns the default toolbar font.
0330      * @return the default toolbar font.
0331      */
0332     static QFont toolBarFont();
0333 
0334     /**
0335      * Returns the default menu font.
0336      * @return the default menu font.
0337      */
0338     static QFont menuFont();
0339 
0340     /**
0341      * Returns the default window title font.
0342      * @return the default window title font.
0343      */
0344     static QFont windowTitleFont();
0345 
0346     /**
0347      * Returns the default taskbar font.
0348      * @return the default taskbar font.
0349      */
0350     static QFont taskbarFont();
0351 
0352     /**
0353      * Returns a font of approx. 48 pt. capable of showing @p text.
0354      * @param text the text to test
0355      * @return the font that is capable to show the text with 48 pt
0356      */
0357     static QFont largeFont(const QString &text = QString());
0358 
0359     /**
0360      * Returns the smallest readable font. This can be used in dockers,
0361      * rulers and other places where space is at a premium.
0362      */
0363     static QFont smallestReadableFont();
0364 
0365     /**
0366      * Returns if the user specified multihead. In case the display
0367      * has multiple screens, the return value of this function specifies
0368      * if the user wants KDE to run on all of them or just on the primary
0369      * On Windows, settings are retrieved from the system.
0370      * @return true if the user chose multi head
0371      */
0372     static bool isMultiHead();
0373 
0374     /**
0375      * Typically, QScrollView derived classes can be scrolled fast by
0376      * holding down the Ctrl-button during wheel-scrolling.
0377      * But QTextEdit and derived classes perform zooming instead of fast
0378      * scrolling.
0379      *
0380      * This value determines whether the user wants to zoom or scroll fast
0381      * with Ctrl-wheelscroll.
0382      * @return true if the user wishes to zoom with the mouse wheel,
0383      *         false for scrolling
0384      */
0385     static bool wheelMouseZooms();
0386 
0387     /**
0388      * This function returns the desktop geometry for an application's splash
0389      * screen.  It takes into account the user's display settings (number of
0390      * screens, Xinerama, etc), and the user's preferences (if KDE should be
0391      * Xinerama aware).
0392      *
0393      * @return the geometry to use for the desktop.  Note that it might not
0394      *         start at (0,0).
0395      * @deprecated use QApplication::desktop()->screenGeometry(QCursor::pos())
0396      */
0397     static KDELIBS4SUPPORT_DEPRECATED QRect splashScreenDesktopGeometry();
0398 
0399     /**
0400      * This function returns the desktop geometry for an application that needs
0401      * to set the geometry of a widget on the screen manually.  It takes into
0402      * account the user's display settings (number of screens, Xinerama, etc),
0403      * and the user's preferences (if KDE should be Xinerama aware).
0404      *
0405      * Note that this can break in multi-head (not Xinerama) mode because this
0406      * point could be on multiple screens.  Use with care.
0407      *
0408      * @param point a reference point for the widget, for instance one that the
0409      *              widget should be adjacent or on top of.
0410      *
0411      * @return the geometry to use for the desktop.  Note that it might not
0412      *         start at (0,0).
0413      * @deprecated use QApplication::desktop()->screenGeometry(point)
0414      */
0415     static KDELIBS4SUPPORT_DEPRECATED QRect desktopGeometry(const QPoint &point);
0416 
0417     /**
0418      * This function returns the desktop geometry for an application that needs
0419      * to set the geometry of a widget on the screen manually.  It takes into
0420      * account the user's display settings (number of screens, Xinerama, etc),
0421      * and the user's preferences (if KDE should be Xinerama aware).
0422      *
0423      * @param w the widget in question.  This is used to determine which screen
0424      *          to use in Xinerama or multi-head mode.
0425      *
0426      * @return the geometry to use for the desktop.  Note that it might not
0427      *         start at (0,0).
0428      * @deprecated use QApplication::desktop()->screenGeometry(w)
0429      */
0430     static KDELIBS4SUPPORT_DEPRECATED QRect desktopGeometry(const QWidget *w);
0431 
0432     /**
0433      * This function determines if the user wishes to see icons on the
0434      * push buttons.
0435      *
0436      * @return Returns true if user wants to show icons.
0437      * @deprecated since 5.0, use style->styleHint(QStyle::SH_DialogButtonBox_ButtonsHaveIcons, 0, widget);
0438      */
0439     static KDELIBS4SUPPORT_DEPRECATED bool showIconsOnPushButtons();
0440 
0441     /**
0442      * Returns true, if user visible strings should be sorted in a natural way:
0443      * image 1.jpg
0444      * image 2.jpg
0445      * image 10.jpg
0446      * image 11.jpg
0447      * If false is returned, the strings are sorted by their unicode values:
0448      * image 1.jpg
0449      * image 10.jpg
0450      * image 11.jpg
0451      * image 2.jpg
0452      *
0453      * @since 4.4
0454      */
0455     static bool naturalSorting();
0456 
0457     enum GraphicEffect {
0458         NoEffects               = 0x0000, ///< GUI with no effects at all.
0459         GradientEffects         = 0x0001, ///< GUI with only gradients enabled.
0460         SimpleAnimationEffects  = 0x0002, ///< GUI with simple animations enabled.
0461         ComplexAnimationEffects = 0x0006  ///< GUI with complex animations enabled.
0462                                   ///< Note that ComplexAnimationsEffects implies SimpleAnimationEffects.
0463     };
0464 
0465     Q_DECLARE_FLAGS(GraphicEffects, GraphicEffect)
0466 
0467     /**
0468      * This function determines the desired level of effects on the GUI.
0469      *
0470      * @since 4.1
0471      */
0472     static GraphicEffects graphicEffectsLevel();
0473 
0474     /**
0475      * This function determines the default level of effects on the GUI
0476      * depending on the system capabilities.
0477      *
0478      * @since 4.1
0479      */
0480     static GraphicEffects graphicEffectsLevelDefault();
0481 
0482     /**
0483      * This function determines if the user wishes to see previews
0484      * for the selected url
0485      *
0486      * @return Returns true if user wants to show previews.
0487      * @deprecated since 5.0, use KProtocolInfo::showFilePreview
0488      */
0489 #ifndef KDELIBS4SUPPORT_NO_DEPRECATED
0490     static KDELIBS4SUPPORT_DEPRECATED bool showFilePreview(const QUrl &);
0491 #endif
0492 
0493     /**
0494      * Whether the user wishes to use opaque resizing. Primarily
0495      * intended for QSplitter::setOpaqueResize()
0496      *
0497      * @return Returns true if user wants to use opaque resizing.
0498      */
0499     static bool opaqueResize();
0500 
0501     /**
0502      * The layout scheme to use for dialog buttons
0503      *
0504      * @return Returns the number of the scheme to use.
0505      */
0506     static int buttonLayout();
0507 
0508     /**
0509      * Used to obtain the QPalette that will be used to set the application palette.
0510      *
0511      * This is only useful for configuration modules such as krdb and should not be
0512      * used in normal circumstances.
0513      * @param config KConfig from which to load the colors (passed as-is to
0514      * ::KColorScheme).
0515      *
0516      * @return the QPalette
0517      *
0518      * @deprecated since 5.0, use KColorScheme::createApplicationPalette()
0519      */
0520     static KDELIBS4SUPPORT_DEPRECATED QPalette createApplicationPalette(const KSharedConfigPtr &config = KSharedConfigPtr());
0521 
0522     /**
0523      * Used to obtain the QPalette that will be used to set the application palette.
0524      *
0525      * This is only useful for configuration modules such as krdb and should not be
0526      * used in normal circumstances.
0527      * @param config KConfig from which to load the colors (passed as-is to
0528      * ::KColorScheme).
0529      *
0530      * @note The difference between this and the previous is that this never caches.
0531      * @since 4.6.3
0532      *
0533      * @return the QPalette
0534      *
0535      * @deprecated since 5.0, use KColorScheme::createApplicationPalette()
0536      */
0537     static KDELIBS4SUPPORT_DEPRECATED QPalette createNewApplicationPalette(const KSharedConfigPtr &config = KSharedConfigPtr());
0538 
0539     /**
0540      * An identifier for change signals.
0541      * \see emitChange
0542      */
0543     enum ChangeType { PaletteChanged = 0, FontChanged, StyleChanged,
0544                       SettingsChanged, IconChanged, CursorChanged,
0545                       ToolbarStyleChanged,
0546                       BlockShortcuts, NaturalSortingChanged
0547                     };
0548 
0549     /**
0550      * Notifies all KDE applications on the current display of a change.
0551      *
0552      * This is typically called by kcontrol modules after changing the corresponding
0553      * config file. Do not call this from a normal KDE application.
0554      *
0555      * @deprecated since 5.0 :
0556      * @li emitChange(ToolbarStyleChanged) is now KToolBar::emitToolbarStyleChanged()
0557      * @li emitChange(IconChanged, group) is now KIconLoader::emitChange(group)
0558      * TODO: complete this list
0559      */
0560     static KDELIBS4SUPPORT_DEPRECATED void emitChange(ChangeType changeType, int arg = 0);
0561 
0562     /**
0563      * Return the KGlobalSettings singleton.
0564      * This is used to connect to its signals, to be notified of changes.
0565      */
0566     static KGlobalSettings *self();
0567 
0568     /**
0569      * Specifies options passed to activate().
0570      *
0571      * @since 4.6
0572      */
0573     enum ActivateOption {
0574         ApplySettings = 0x1, ///< Make all globally applicable settings take effect.
0575         ListenForChanges = 0x2 ///< Listen for changes to the settings.
0576     };
0577     Q_DECLARE_FLAGS(ActivateOptions, ActivateOption)
0578 
0579     /**
0580      * Makes all globally applicable settings take effect
0581      * and starts listening for changes to these settings.
0582      *
0583      * This is usually called only by the KApplication constructor.
0584      *
0585      * @since 4.3.3
0586      */
0587     void activate(); //KDE5: Merge with the overloaded method below
0588 
0589     /**
0590      * @overload
0591      *
0592      * @since 4.6
0593      */
0594     void activate(ActivateOptions options);
0595 
0596     /**
0597      * Valid values for the settingsChanged signal
0598      */
0599     enum SettingsCategory { SETTINGS_MOUSE, SETTINGS_COMPLETION, SETTINGS_PATHS,
0600                             SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS,
0601                             SETTINGS_LOCALE, SETTINGS_STYLE
0602                           };
0603 
0604 Q_SIGNALS:
0605     /**
0606      * Emitted when the application has changed its palette due to a KControl request.
0607      *
0608      * Normally, widgets will update their palette automatically, but you
0609      * should connect to this to program special behavior.
0610      *
0611      * Note: If you derive from a QWidget-based class, a faster method is to
0612      *       reimplement QWidget::changeEvent() and catch QEvent::PaletteChange.
0613      *       This is the preferred way to get informed about palette updates.
0614      */
0615     void kdisplayPaletteChanged();
0616 
0617     /**
0618      * Emitted when the application has changed its GUI style in response to a KControl request.
0619      *
0620      * Normally, widgets will update their styles automatically (as they would
0621      * respond to an explicit setGUIStyle() call), but you should connect to
0622      * this to program special behavior.
0623      *
0624      * Note: If you derive from a QWidget-based class, a faster method is to
0625      *       reimplement QWidget::changeEvent() and catch QEvent::StyleChange.
0626      *       This is the preferred way to get informed about style updates.
0627      */
0628     void kdisplayStyleChanged();
0629 
0630     /**
0631      * Emitted when the application has changed its font in response to a KControl request.
0632      *
0633      * Normally widgets will update their fonts automatically, but you should
0634      * connect to this to monitor global font changes, especially if you are
0635      * using explicit fonts.
0636      *
0637      * Note: If you derive from a QWidget-based class, a faster method is to
0638      *       reimplement QWidget::changeEvent() and catch QEvent::FontChange.
0639      *       This is the preferred way to get informed about font updates.
0640      */
0641     void kdisplayFontChanged();
0642 
0643     /**
0644      * Emitted when the application has changed either its GUI style, its font or its palette
0645      * in response to a kdisplay request. Normally, widgets will update their styles
0646      * automatically, but you should connect to this to program special
0647      * behavior.
0648      */
0649     void appearanceChanged();
0650 
0651     /**
0652      * Emitted when the settings for toolbars have been changed. KToolBar will know what to do.
0653      */
0654     void toolbarAppearanceChanged(int);
0655 
0656     /**
0657      * Emitted when the global settings have been changed.
0658      * KGlobalSettings takes care of calling reparseConfiguration on KSharedConfig::openConfig()
0659      * so that applications/classes using this only have to re-read the configuration
0660      * @param category the category among the SettingsCategory enum.
0661      */
0662     void settingsChanged(int category);
0663 
0664     /**
0665      * Emitted when the global icon settings have been changed.
0666      * @param group the new group
0667      *
0668      * @deprecated since 5.0, use KIconLoader::iconChanged(int)
0669      */
0670 #ifndef KDELIBS4SUPPORT_NO_DEPRECATED
0671     QT_MOC_COMPAT void iconChanged(int group);
0672 #endif
0673 
0674     /**
0675      * Emitted when the cursor theme has been changed.
0676      */
0677     void cursorChanged();
0678 
0679     /**
0680      * Emitted by BlockShortcuts
0681      */
0682     void blockShortcuts(int data);
0683 
0684     /**
0685      * Emitted when the natural sorting has been changed.
0686      * @since 4.4
0687      */
0688     void naturalSortingChanged();
0689 
0690 private:
0691     friend class KApplication;
0692     friend class KGlobalSettingsSingleton;
0693 
0694     KGlobalSettings();
0695 
0696     class Private;
0697     Private *const d;
0698 
0699     Q_PRIVATE_SLOT(d, void _k_slotNotifyChange(int, int))
0700     Q_PRIVATE_SLOT(d, void _k_slotIconChange(int))
0701 };
0702 
0703 Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::GraphicEffects)
0704 Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::ActivateOptions)
0705 
0706 #endif