34#include <QtGui/QColor>
35#include <QtGui/QCursor>
36#include <QtGui/QDesktopWidget>
39#include <QtGui/QFontDatabase>
40#include <QtGui/QFontInfo>
41#include <QtGui/QKeySequence>
42#include <QtGui/QPixmap>
43#include <QtGui/QPixmapCache>
44#include <QApplication>
45#include <QtDBus/QtDBus>
46#include <QtGui/QStyleFactory>
47#include <QDesktopServices>
48#include "qplatformdefs.h"
51#include <QtGui/QToolTip>
52#include <QtGui/QWhatsThis>
60 return qRgb(GetRValue(col),GetGValue(col),GetBValue(col));
66#include <X11/Xcursor/Xcursor.h>
84class KGlobalSettingsData
101 KGlobalSettingsData();
102 ~KGlobalSettingsData();
105 static KGlobalSettingsData* self();
108 QFont font( FontTypes fontType );
109 QFont largeFont(
const QString& text );
113 void dropFontSettingsCache();
114 void dropMouseSettingsCache();
117 QFont* mFonts[FontTypesCount];
122KGlobalSettingsData::KGlobalSettingsData()
126 for(
int i=0; i<FontTypesCount; ++i )
130KGlobalSettingsData::~KGlobalSettingsData()
132 for(
int i=0; i<FontTypesCount; ++i )
136 delete mMouseSettings;
141inline KGlobalSettingsData* KGlobalSettingsData::self()
143 return globalSettingsDataSingleton;
147class KGlobalSettings::Private
151 : q(q), activated(false), paletteCreated(false)
153 kdeFullSession = !qgetenv(
"KDE_FULL_SESSION").isEmpty();
158 void _k_slotNotifyChange(
int,
int);
160 void propagateQtSettings();
161 void kdisplaySetPalette();
162 void kdisplaySetStyle();
163 void kdisplaySetFont();
164 void applyGUIStyle();
177 void applyCursorTheme();
179 static void reloadStyleSettings();
185 QPalette applicationPalette;
194KGlobalSettings::KGlobalSettings()
195 :
QObject(0), d(new Private(this))
215 QDBusConnection::sessionBus().connect( QString(),
"/KGlobalSettings",
"org.kde.KGlobalSettings",
216 "notifyChange",
this, SLOT(_k_slotNotifyChange(
int,
int)) );
220 d->kdisplaySetStyle();
221 d->kdisplaySetFont();
222 d->propagateQtSettings();
230 return g.
readEntry(
"StartDragDist", QApplication::startDragDistance());
250 effectsenabled = g.
readEntry(
"EffectsEnabled",
false);
271 completion = g.
readEntry(
"completionMode", -1);
286#ifndef KDE_NO_DEPRECATED
290 QString s = g.
readEntry (
"PopupMenuContext",
"Menu");
296 if (s == QLatin1String(
"none")) {
297 return QKeySequence()[0];
300 const QStringList shortCuts = s.split(
';');
302 if (shortCuts.count() < 1) {
303 return QKeySequence()[0];
308 if ( s.startsWith( QLatin1String(
"default(") ) ) {
309 s = s.mid( 8, s.length() - 9 );
312 return QKeySequence::fromString(s)[0];
323 return g.
readEntry(
"inactiveBackground", QColor(224,223,222) );
334 return g.
readEntry(
"inactiveForeground", QColor(75,71,67) );
345 return g.
readEntry(
"activeBackground", QColor(48,174,232));
356 return g.
readEntry(
"activeForeground", QColor(255,255,255) );
370 return 0.1 * g.
readEntry(
"contrast", 7 );
389 const char* ConfigGroupKey;
390 const char* ConfigKey;
391 const char* FontName;
394 QFont::StyleHint StyleHint;
408 {
GeneralId,
"fixed",
"Monaco", 10, -1, QFont::TypeWriter },
411#elif defined(Q_WS_MAEMO_5) || defined(MEEGO_EDITION_HARMATTAN)
413 {
GeneralId,
"fixed",
"Monospace", 16, -1, QFont::TypeWriter },
418 {
GeneralId,
"fixed",
"Monospace", 9, -1, QFont::TypeWriter },
422 {
"WM",
"activeFont",
DefaultFont, 8, -1, QFont::SansSerif },
427QFont KGlobalSettingsData::font( FontTypes fontType )
429 QFont* cachedFont = mFonts[fontType];
434 cachedFont =
new QFont( fontData.FontName, fontData.Size, fontData.Weight );
435 cachedFont->setStyleHint( fontData.StyleHint );
438 *cachedFont = configGroup.readEntry( fontData.ConfigKey, *cachedFont );
440 mFonts[fontType] = cachedFont;
448 return KGlobalSettingsData::self()->font( KGlobalSettingsData::GeneralFont );
452 return KGlobalSettingsData::self()->font( KGlobalSettingsData::FixedFont );
456 return KGlobalSettingsData::self()->font( KGlobalSettingsData::ToolbarFont );
460 return KGlobalSettingsData::self()->font( KGlobalSettingsData::MenuFont );
464 return KGlobalSettingsData::self()->font( KGlobalSettingsData::WindowTitleFont );
468 return KGlobalSettingsData::self()->font( KGlobalSettingsData::TaskbarFont );
472 return KGlobalSettingsData::self()->font( KGlobalSettingsData::SmallestReadableFont );
476QFont KGlobalSettingsData::largeFont(
const QString& text )
479 QStringList fam = db.families();
483 static const char*
const PreferredFontNames[] =
494 static const unsigned int PreferredFontNamesCount =
sizeof(PreferredFontNames)/
sizeof(
const char*);
495 for(
unsigned int i=0; i<PreferredFontNamesCount; ++i )
497 const QString fontName (PreferredFontNames[i]);
498 if (fam.removeAll(fontName)>0)
499 fam.prepend(fontName);
503 fam.prepend(mLargeFont->family());
507 for(QStringList::ConstIterator it = fam.constBegin();
508 it != fam.constEnd(); ++it)
510 if (db.isSmoothlyScalable(*it) && !db.isFixedPitch(*it))
513 font.setPixelSize(75);
514 QFontMetrics metrics(font);
515 int h = metrics.height();
516 if ((h < 60) || ( h > 90))
520 for(
int i = 0; i < text.length(); i++)
522 if (!metrics.inFont(text[i]))
531 font.setPointSize(48);
532 mLargeFont =
new QFont(font);
536 mLargeFont =
new QFont( font(GeneralFont) );
537 mLargeFont->setPointSize(48);
542 return KGlobalSettingsData::self()->largeFont( text );
545void KGlobalSettingsData::dropFontSettingsCache()
547 for(
int i=0; i<FontTypesCount; ++i )
565 QString setting = g.readEntry(
"MouseButtonMapping");
566 if (setting ==
"RightHanded")
568 else if (setting ==
"LeftHanded")
577 unsigned char map[20];
578 int num_buttons = XGetPointerMapping(QX11Info::display(), map, 20);
579 if( num_buttons == 2 )
581 if ( (
int)map[0] == 1 && (
int)map[1] == 2 )
583 else if ( (
int)map[0] == 2 && (
int)map[1] == 1 )
586 else if( num_buttons >= 3 )
588 if ( (
int)map[0] == 1 && (
int)map[2] == 3 )
590 else if ( (
int)map[0] == 3 && (
int)map[2] == 1 )
602 mMouseSettings->handed = (GetSystemMetrics(SM_SWAPBUTTON) ?
610 return *mMouseSettings;
615 return KGlobalSettingsData::self()->mouseSettings();
618void KGlobalSettingsData::dropMouseSettingsCache()
621 delete mMouseSettings;
628 QString path = QDesktopServices::storageLocation( QDesktopServices::DesktopLocation );
629 return path.isEmpty() ? QDir::homePath() : path;
635 QString s_autostartPath;
638 s_autostartPath = g.
readPathEntry(
"Autostart" , s_autostartPath );
639 s_autostartPath = QDir::cleanPath( s_autostartPath );
640 if ( !s_autostartPath.endsWith(
'/' ) ) {
641 s_autostartPath.append( QLatin1Char(
'/' ) );
643 return s_autostartPath;
648 QString path = QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation );
649 return path.isEmpty() ? QDir::homePath() : path;
655 QString defaultDownloadPath = QDir::homePath() +
"/Downloads";
659 if( QFile::exists( xdgUserDirs ) ) {
662 downloadPath = g.
readPathEntry(
"XDG_DOWNLOAD_DIR", downloadPath ).remove(
'"' );
663 if ( downloadPath.isEmpty() ) {
664 downloadPath = defaultDownloadPath;
668 downloadPath = QDir::cleanPath( downloadPath );
669 QDir().mkpath(downloadPath);
670 if ( !downloadPath.endsWith(
'/' ) ) {
671 downloadPath.append( QLatin1Char(
'/' ) );
678 QString path = QDesktopServices::storageLocation( QDesktopServices::MoviesLocation );
679 return path.isEmpty() ? QDir::homePath() : path;
684 QString path = QDesktopServices::storageLocation( QDesktopServices::PicturesLocation );
685 return path.isEmpty() ? QDir::homePath() :path;
690 QString path = QDesktopServices::storageLocation( QDesktopServices::MusicLocation );
691 return path.isEmpty() ? QDir::homePath() : path;
697 return GetSystemMetrics(SM_CMONITORS) > 1;
699 QByteArray multiHead = qgetenv(
"KDE_MULTIHEAD");
700 if (!multiHead.isEmpty()) {
701 return (multiHead.toLower() ==
"true");
715 QDesktopWidget *dw = QApplication::desktop();
717 if (dw->isVirtualDesktop()) {
719 int scr =
group.readEntry(
"Unmanaged", -3);
720 if (
group.readEntry(
"XineramaEnabled",
true) && scr != -2) {
722 scr = dw->screenNumber(QCursor::pos());
723 return dw->screenGeometry(scr);
725 return dw->geometry();
728 return dw->geometry();
734 QDesktopWidget *dw = QApplication::desktop();
736 if (dw->isVirtualDesktop()) {
738 if (
group.readEntry(
"XineramaEnabled",
true) &&
739 group.readEntry(
"XineramaPlacementEnabled",
true)) {
740 return dw->screenGeometry(dw->screenNumber(point));
742 return dw->geometry();
745 return dw->geometry();
751 QDesktopWidget *dw = QApplication::desktop();
753 if (dw->isVirtualDesktop()) {
755 if (
group.readEntry(
"XineramaEnabled",
true) &&
756 group.readEntry(
"XineramaPlacementEnabled",
true)) {
758 return dw->screenGeometry(dw->screenNumber(w));
759 else return dw->screenGeometry(-1);
761 return dw->geometry();
764 return dw->geometry();
771 return g.
readEntry(
"ShowIconsOnPushButtons",
787 static bool _graphicEffectsInitialized =
false;
789 if (!_graphicEffectsInitialized) {
790 _graphicEffectsInitialized =
true;
791 Private::reloadStyleSettings();
809 bool defaultSetting = KProtocolInfo::showFilePreview( protocol );
810 return g.
readEntry(protocol, defaultSetting );
827 QDBusMessage
message = QDBusMessage::createSignal(
"/KGlobalSettings",
"org.kde.KGlobalSettings",
"notifyChange" );
829 args.append(
static_cast<int>(changeType));
832 QDBusConnection::sessionBus().send(
message);
834 if (qApp && qApp->type() != QApplication::Tty) {
836 extern void qt_x11_apply_settings_in_all_apps();
837 qt_x11_apply_settings_in_all_apps();
842void KGlobalSettings::Private::_k_slotNotifyChange(
int changeType,
int arg)
852 case ToolbarStyleChanged:
854 emit q->toolbarAppearanceChanged(arg);
860 paletteCreated =
false;
861 kdisplaySetPalette();
867 KGlobalSettingsData::self()->dropFontSettingsCache();
873 case SettingsChanged: {
875 SettingsCategory category =
static_cast<SettingsCategory
>(arg);
876 if (category == SETTINGS_QT) {
878 propagateQtSettings();
883 reloadStyleSettings();
886 KGlobalSettingsData::self()->dropMouseSettingsCache();
888 case SETTINGS_LOCALE:
894 emit q->settingsChanged(category);
899 QPixmapCache::clear();
901 emit q->iconChanged(arg);
911 emit q->blockShortcuts(arg);
914 case NaturalSortingChanged:
915 emit q->naturalSortingChanged();
919 kWarning(240) <<
"Unknown type of change in KGlobalSettings::slotNotifyChange: " << changeType;
926void KGlobalSettings::Private::applyGUIStyle()
931 const QLatin1String currentStyleName(qApp->style()->metaObject()->className());
933 0 != (QString(
kde_overrideStyle + QLatin1String(
"Style"))).compare(currentStyleName, Qt::CaseInsensitive)) {
937 emit q->kdisplayStyleChanged();
940 const QLatin1String currentStyleName(qApp->style()->metaObject()->className());
945 const QString &styleStr = pConfig.
readEntry(
"widgetStyle4", pConfig.
readEntry(
"widgetStyle", defaultStyle));
947 if (styleStr.isEmpty() ||
950 0 == (QString(styleStr + QLatin1String(
"Style"))).compare(currentStyleName, Qt::CaseInsensitive) ||
951 0 == styleStr.compare(currentStyleName, Qt::CaseInsensitive)) {
955 QStyle* sp = QStyleFactory::create( styleStr );
956 if (sp && currentStyleName == sp->metaObject()->className()) {
962 if ( !sp && styleStr != defaultStyle)
963 sp = QStyleFactory::create( defaultStyle );
965 sp = QStyleFactory::create( QStyleFactory::keys().first() );
967 }
else if (0 !=
kde_overrideStyle.compare(currentStyleName, Qt::CaseInsensitive) &&
968 0 != (QString(
kde_overrideStyle + QLatin1String(
"Style"))).compare(currentStyleName, Qt::CaseInsensitive)) {
971 emit q->kdisplayStyleChanged();
977 return self()->d->createApplicationPalette(
config);
982 return self()->d->createNewApplicationPalette(
config);
985QPalette KGlobalSettings::Private::createApplicationPalette(
const KSharedConfigPtr &config)
990 return applicationPalette;
992 return createNewApplicationPalette(config);
995QPalette KGlobalSettings::Private::createNewApplicationPalette(
const KSharedConfigPtr &config)
999 QPalette::ColorGroup states[3] = { QPalette::Active, QPalette::Inactive,
1000 QPalette::Disabled };
1005 for (
int i = 0; i < 3 ; i++ ) {
1006 QPalette::ColorGroup state = states[i];
1012 palette.setBrush( state, QPalette::WindowText, schemeWindow.foreground() );
1013 palette.setBrush( state, QPalette::Window, schemeWindow.background() );
1014 palette.setBrush( state, QPalette::Base, schemeView.background() );
1015 palette.setBrush( state, QPalette::Text, schemeView.foreground() );
1016 palette.setBrush( state, QPalette::Button, schemeButton.background() );
1017 palette.setBrush( state, QPalette::ButtonText, schemeButton.foreground() );
1018 palette.setBrush( state, QPalette::Highlight, schemeSelection.background() );
1019 palette.setBrush( state, QPalette::HighlightedText, schemeSelection.foreground() );
1020 palette.setBrush( state, QPalette::ToolTipBase, schemeTooltip.background() );
1021 palette.setBrush( state, QPalette::ToolTipText, schemeTooltip.foreground() );
1035 paletteCreated =
true;
1036 applicationPalette = palette;
1042void KGlobalSettings::Private::kdisplaySetPalette()
1044#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_WINCE) && !defined(MEEGO_EDITION_HARMATTAN)
1045 if (!kdeFullSession) {
1049 if (qApp->type() == QApplication::GuiClient) {
1050 QApplication::setPalette( q->createApplicationPalette() );
1052 emit q->kdisplayPaletteChanged();
1053 emit q->appearanceChanged();
1058void KGlobalSettings::Private::kdisplaySetFont()
1060#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_WINCE) && !defined(MEEGO_EDITION_HARMATTAN)
1061 if (!kdeFullSession) {
1065 if (qApp->type() == QApplication::GuiClient) {
1066 KGlobalSettingsData* data = KGlobalSettingsData::self();
1068 QApplication::setFont( data->font(KGlobalSettingsData::GeneralFont) );
1069 const QFont menuFont = data->font( KGlobalSettingsData::MenuFont );
1070 QApplication::setFont( menuFont,
"QMenuBar" );
1071 QApplication::setFont( menuFont,
"QMenu" );
1072 QApplication::setFont( menuFont,
"KPopupTitle" );
1073 QApplication::setFont( data->font(KGlobalSettingsData::ToolbarFont),
"QToolBar" );
1075 emit q->kdisplayFontChanged();
1076 emit q->appearanceChanged();
1081void KGlobalSettings::Private::kdisplaySetStyle()
1083 if (qApp->type() == QApplication::GuiClient) {
1087 kdisplaySetPalette();
1092void KGlobalSettings::Private::reloadStyleSettings()
1099 if (g.hasKey(
"GraphicEffectsLevel")) {
1100 _graphicEffects = ((GraphicEffects) g.readEntry(
"GraphicEffectsLevel", QVariant((
int) NoEffects)).toInt());
1109void KGlobalSettings::Private::applyCursorTheme()
1111#if defined(Q_WS_X11) && defined(HAVE_XCURSOR)
1115 QString theme = g.readEntry(
"cursorTheme", QString());
1116 int size = g.readEntry(
"cursorSize", -1);
1122 size = app->desktop()->screen(0)->logicalDpiY() * 16 / 72;
1129 XcursorSetTheme(QX11Info::display(), theme.isNull() ?
1130 "default" : QFile::encodeName(theme));
1131 XcursorSetDefaultSize(QX11Info::display(), size);
1133 emit q->cursorChanged();
1138void KGlobalSettings::Private::propagateQtSettings()
1142 int num = cg.readEntry(
"CursorBlinkRate", QApplication::cursorFlashTime());
1143 if ((num != 0) && (num < 200))
1147 QApplication::setCursorFlashTime(num);
1151 num = cg.readEntry(
"DoubleClickInterval", QApplication::doubleClickInterval());
1152 QApplication::setDoubleClickInterval(num);
1153 num = cg.readEntry(
"StartDragTime", QApplication::startDragTime());
1154 QApplication::setStartDragTime(num);
1155 num = cg.readEntry(
"StartDragDist", QApplication::startDragDistance());
1156 QApplication::setStartDragDistance(num);
1157 num = cg.readEntry(
"WheelScrollLines", QApplication::wheelScrollLines());
1158 QApplication::setWheelScrollLines(num);
1159 bool showIcons = cg.readEntry(
"ShowIconsInMenuItems", !QApplication::testAttribute(Qt::AA_DontShowIconsInMenus));
1160 QApplication::setAttribute(Qt::AA_DontShowIconsInMenus, !showIcons);
1163 emit q->settingsChanged(SETTINGS_QT);
1166#include "kglobalsettings.moc"
A set of methods used to work with colors.
@ VisitedText
Fifth color; used for (visited) links.
@ LinkText
Fourth color; use for (unvisited) links.
@ MidlightShade
The midlight color is in between base() and light().
@ DarkShade
The dark color is in between mid() and shadow().
@ LightShade
The light color is lighter than dark() or shadow() and contrasts with the base color.
@ ShadowShade
The shadow color is darker than light() or midlight() and contrasts the base color.
@ MidShade
The mid color is in between base() and dark().
@ AlternateBackground
Alternate background; for example, for use in lists.
@ View
Views; for example, frames, input fields, etc.
@ Window
Non-editable window elements; for example, menus.
@ Selection
Selected items in views.
@ Button
Buttons and button-like controls.
QString readPathEntry(const char *key, const QString &aDefault) const
QString readEntry(const char *key, const char *aDefault=0) const
Access the KDE global configuration.
static bool wheelMouseZooms()
Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wh...
static bool shadeSortColumn()
Returns if the sorted column in a K3ListView shall be drawn with a shaded background color.
static QColor inactiveTitleColor()
The default color to use for inactive titles.
static QString desktopPath()
The path to the desktop directory of the current user.
@ ComplexAnimationEffects
GUI with complex animations enabled.
@ NoEffects
GUI with no effects at all.
static QFont smallestReadableFont()
Returns the smallest readable font.
ChangeType
An identifier for change signals.
static bool singleClick()
Returns whether KDE runs in single (default) or double click mode.
static int autoSelectDelay()
Returns the KDE setting for the auto-select option.
static Completion completionMode()
Returns the preferred completion mode setting.
static QString videosPath()
The path where videos are stored of the current user.
static int dndEventDelay()
Returns a threshold in pixels for drag & drop operations.
static int contrast()
Returns the contrast for borders.
static QFont toolBarFont()
Returns the default toolbar font.
static GraphicEffects graphicEffectsLevelDefault()
This function determines the default level of effects on the GUI depending on the system capabilities...
static qreal contrastF(const KSharedConfigPtr &config=KSharedConfigPtr())
Returns the contrast for borders as a floating point value.
@ ListenForChanges
Listen for changes to the settings.
@ ApplySettings
Make all globally applicable settings take effect.
static QColor activeTextColor()
The default color to use for active texts.
static int buttonLayout()
The layout scheme to use for dialog buttons.
static QString musicPath()
The path where music are stored of the current user.
Completion
This enum describes the completion mode used for by the KCompletion class.
@ CompletionPopup
Lists all possible matches in a popup list-box to choose from.
@ CompletionNone
No completion is used.
@ CompletionPopupAuto
Lists all possible matches in a popup list-box to choose from, and automatically fill the result when...
static QFont largeFont(const QString &text=QString())
Returns a font of approx.
static KGlobalSettings * self()
Return the KGlobalSettings singleton.
static QFont taskbarFont()
Returns the default taskbar font.
static bool allowDefaultBackgroundImages()
Returns if default background images are allowed by the color scheme.
static QRect desktopGeometry(const QPoint &point)
This function returns the desktop geometry for an application that needs to set the geometry of a wid...
static bool smoothScroll()
Returns if item views should force smooth scrolling.
static TearOffHandle insertTearOffHandle()
Returns whether tear-off handles are inserted in KMenus.
static QFont menuFont()
Returns the default menu font.
static int contextMenuKey()
Returns the KDE setting for the shortcut key to open context menus.
static bool opaqueResize()
Whether the user wishes to use opaque resizing.
static QString documentPath()
The path where documents are stored of the current user.
static bool changeCursorOverIcon()
Checks whether the cursor changes over icons.
static KMouseSettings & mouseSettings()
This returns the current mouse settings.
static bool showContextMenusOnPress()
Returns the KDE setting for context menus.
static bool showIconsOnPushButtons()
This function determines if the user wishes to see icons on the push buttons.
static QPalette createApplicationPalette(const KSharedConfigPtr &config=KSharedConfigPtr())
Used to obtain the QPalette that will be used to set the application palette.
static QColor inactiveTextColor()
The default color to use for inactive texts.
static bool showFilePreview(const KUrl &)
This function determines if the user wishes to see previews for the selected url.
static bool naturalSorting()
Returns true, if user visible strings should be sorted in a natural way: image 1.jpg image 2....
static bool isMultiHead()
Returns if the user specified multihead.
static void emitChange(ChangeType changeType, int arg=0)
Notifies all KDE applications on the current display of a change.
void activate()
Makes all globally applicable settings take effect and starts listening for changes to these settings...
static GraphicEffects graphicEffectsLevel()
This function determines the desired level of effects on the GUI.
static QString autostartPath()
The path to the autostart directory of the current user.
static QColor activeTitleColor()
The default color to use for active titles.
TearOffHandle
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not.
@ Disable
disable tear-off handles
static QPalette createNewApplicationPalette(const KSharedConfigPtr &config=KSharedConfigPtr())
Used to obtain the QPalette that will be used to set the application palette.
static QFont generalFont()
Returns the default general font.
static QFont fixedFont()
Returns the default fixed font.
static QRect splashScreenDesktopGeometry()
This function returns the desktop geometry for an application's splash screen.
static QString picturesPath()
The path where pictures are stored of the current user.
static QFont windowTitleFont()
Returns the default window title font.
static QString downloadPath()
The path where download are stored of the current user.
void reparseConfiguration()
QString localkdedir() const
QString localxdgconfdir() const
static QString defaultStyle()
Returns the default widget style.
#define K_GLOBAL_STATIC(TYPE, NAME)
static const char DefaultFont[]
static KGlobalSettings::GraphicEffects _graphicEffects
static const KFontData DefaultFontData[KGlobalSettingsData::FontTypesCount]
QString kde_overrideStyle
static const char GeneralId[]
static QRgb qt_colorref2qrgb(COLORREF col)
static const char DefaultMacFont[]
#define KDE_DEFAULT_ALLOW_DEFAULT_BACKGROUND_IMAGES
#define KDE_DEFAULT_WHEEL_ZOOM
#define KDE_DEFAULT_BUTTON_LAYOUT
#define KDE_DEFAULT_INSERTTEAROFFHANDLES
#define KDE_DEFAULT_CHANGECURSOR
#define KDE_DEFAULT_SHADE_SORT_COLUMN
#define KDE_DEFAULT_OPAQUE_RESIZE
#define KDE_DEFAULT_SMOOTHSCROLL
#define KDE_DEFAULT_AUTOSELECTDELAY
#define KDE_DEFAULT_ICON_ON_PUSHBUTTON
#define KDE_DEFAULT_NATURAL_SORTING
#define KDE_DEFAULT_SINGLECLICK
KSharedConfigPtr config()
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
KGuiItem ok()
Returns the 'Ok' gui item.
Describes the mouse settings.