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

KDEUI

kglobalsettings.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 2000,2006 David Faure <faure@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 #ifndef _KGLOBALSETTINGS_H
00019 #define _KGLOBALSETTINGS_H
00020 
00021 #include <kdeui_export.h>
00022 #include <ksharedconfig.h>
00023 #include <QtCore/QObject>
00024 #include <QtCore/QString>
00025 #include <QtGui/QPalette>
00026 
00027 #define KDE_DEFAULT_SINGLECLICK true
00028 #define KDE_DEFAULT_SMOOTHSCROLL true
00029 #define KDE_DEFAULT_INSERTTEAROFFHANDLES 0
00030 #define KDE_DEFAULT_AUTOSELECTDELAY -1
00031 #define KDE_DEFAULT_CHANGECURSOR true
00032 #define KDE_DEFAULT_LARGE_CURSOR false
00033 #define KDE_DEFAULT_WHEEL_ZOOM false
00034 #define KDE_DEFAULT_ICON_ON_PUSHBUTTON true
00035 #define KDE_DEFAULT_OPAQUE_RESIZE true
00036 #define KDE_DEFAULT_BUTTON_LAYOUT 0
00037 #define KDE_DEFAULT_SHADE_SORT_COLUMN true
00038 #define KDE_DEFAULT_ALLOW_DEFAULT_BACKGROUND_IMAGES true
00039 
00040 class KUrl;
00041 
00042 class QColor;
00043 class QFont;
00044 class QPoint;
00045 class QRect;
00046 class QWidget;
00047 
00053 class KDEUI_EXPORT KGlobalSettings : public QObject
00054 {
00055     Q_OBJECT
00056 
00057 public:
00058     ~KGlobalSettings();
00059 
00103     static int dndEventDelay();
00104 
00111     static bool singleClick();
00112 
00118     static bool smoothScroll();
00119 
00125     enum TearOffHandle {
00126         Disable = 0, 
00127         ApplicationLevel, 
00128         Enable 
00129     };
00130 
00135     static TearOffHandle insertTearOffHandle();
00136 
00141     static bool changeCursorOverIcon();
00142 
00148     static int autoSelectDelay();
00149 
00157     static KDE_DEPRECATED int contextMenuKey ();
00158 
00165     static bool showContextMenusOnPress ();
00166 
00172     enum Completion {
00176         CompletionNone=1,
00180         CompletionAuto,
00184         CompletionMan,
00188         CompletionShell,
00192         CompletionPopup,
00197         CompletionPopupAuto
00198     };
00199 
00205     static Completion completionMode();
00206 
00210     struct KMouseSettings
00211     {
00212         enum { RightHanded = 0, LeftHanded = 1 };
00213         int handed; // left or right
00214     };
00215 
00221     static KMouseSettings & mouseSettings();
00222 
00227     static QString desktopPath();
00228 
00233     static QString autostartPath();
00234 
00239     static QString documentPath();
00240 
00245     static QString musicPath();
00246 
00251     static QString videosPath();
00252 
00257     static QString downloadPath();
00258 
00263     static QString picturesPath();
00264 
00269     static QColor inactiveTitleColor();
00270 
00275     static QColor inactiveTextColor();
00276 
00281     static QColor activeTitleColor();
00282 
00287     static QColor activeTextColor();
00288 
00294     static int contrast();
00295 
00303     static qreal contrastF(const KSharedConfigPtr &config = KSharedConfigPtr());
00304 
00310     static bool shadeSortColumn();
00311 
00318     static bool allowDefaultBackgroundImages();
00319 
00324     static QFont generalFont();
00325 
00330     static QFont fixedFont();
00331 
00336     static QFont toolBarFont();
00337 
00342     static QFont menuFont();
00343 
00348     static QFont windowTitleFont();
00349 
00354     static QFont taskbarFont();
00355 
00361     static QFont largeFont(const QString &text = QString());
00362 
00367     static QFont smallestReadableFont();
00368 
00376     static bool isMultiHead();
00377 
00389     static bool wheelMouseZooms();
00390 
00400     static QRect splashScreenDesktopGeometry();
00401 
00417     static QRect desktopGeometry(const QPoint& point);
00418 
00431     static QRect desktopGeometry(const QWidget* w);
00432 
00439     static bool showIconsOnPushButtons();
00440 
00441     enum GraphicEffect {
00442         NoEffects               = 0x0000, 
00443         GradientEffects         = 0x0001, 
00444         SimpleAnimationEffects  = 0x0002, 
00445         ComplexAnimationEffects = 0x0006  
00446 
00447     };
00448 
00449     Q_DECLARE_FLAGS(GraphicEffects, GraphicEffect)
00450 
00451     
00456     static GraphicEffects graphicEffectsLevel();
00457 
00464     static GraphicEffects graphicEffectsLevelDefault();
00465 
00472     static bool showFilePreview(const KUrl &);
00473 
00480     static bool opaqueResize();
00481 
00487     static int buttonLayout();
00488 
00499     static QPalette createApplicationPalette(const KSharedConfigPtr &config = KSharedConfigPtr());
00500 
00505     enum ChangeType { PaletteChanged = 0, FontChanged, StyleChanged,
00506                       SettingsChanged, IconChanged, CursorChanged,
00507                       ToolbarStyleChanged, ClipboardConfigChanged,
00508                       BlockShortcuts };
00509 
00516     static void emitChange(ChangeType changeType, int arg = 0);
00517 
00522     static KGlobalSettings* self();
00523 
00532     void activate();
00533 
00537     enum SettingsCategory { SETTINGS_MOUSE, SETTINGS_COMPLETION, SETTINGS_PATHS,
00538                             SETTINGS_POPUPMENU, SETTINGS_QT, SETTINGS_SHORTCUTS };
00539 
00540 Q_SIGNALS:
00551     void kdisplayPaletteChanged();
00552 
00564     void kdisplayStyleChanged();
00565 
00577     void kdisplayFontChanged();
00578 
00585     void appearanceChanged();
00586 
00590     void toolbarAppearanceChanged(int);
00591 
00598     void settingsChanged(int category);
00599 
00604     void iconChanged(int group);
00605 
00609     void cursorChanged();
00610 
00614     void blockShortcuts(int data);
00615 
00616 private:
00617     friend class KApplication;
00618 
00619     KGlobalSettings();
00620 
00621     class Private;
00622     Private* const d;
00623 
00624     Q_PRIVATE_SLOT(d, void _k_slotNotifyChange(int, int))
00625 };
00626 
00627 Q_DECLARE_OPERATORS_FOR_FLAGS(KGlobalSettings::GraphicEffects)
00628 
00629 #endif

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal