KGlobalSettings Class Reference
Access the KDE global configuration. More...
#include <kglobalsettings.h>
Collaboration diagram for KGlobalSettings:

Public Types | |
enum | TearOffHandle { Disable = 0, ApplicationLevel, Enable } |
This enum describes the return type for insertTearOffHandle() wether to insert a handle or not. More... | |
enum | Completion { CompletionNone = 1, CompletionAuto, CompletionMan, CompletionShell, CompletionPopup, CompletionPopupAuto } |
This enum describes the completion mode used for by the KCompletion class. More... | |
Static Public Member Functions | |
int | dndEventDelay () |
Returns a threshold in pixels for drag & drop operations. | |
bool | singleClick () |
Returns whether KDE runs in single (default) or double click mode. | |
TearOffHandle | insertTearOffHandle () |
Returns whether tear-off handles are inserted in KPopupMenus. | |
bool | changeCursorOverIcon () |
Checks whether the cursor changes over icons. | |
bool | visualActivate () |
Checks whether to show feedback when in item (specifically an icon) is activated. | |
unsigned int | visualActivateSpeed () |
Returns the speed of the visual activation feedback. | |
int | autoSelectDelay () |
Returns the KDE setting for the auto-select option. | |
int | contextMenuKey () |
Returns the KDE setting for the shortcut key to open context menus. | |
bool | showContextMenusOnPress () |
Returns the KDE setting for context menus. | |
Completion | completionMode () |
Returns the preferred completion mode setting. | |
KMouseSettings & | mouseSettings () |
This returns the current mouse settings. | |
QString | desktopPath () |
The path to the desktop directory of the current user. | |
QString | autostartPath () |
The path to the autostart directory of the current user. | |
QString | trashPath () |
The path to the trash directory of the current user. | |
QString | documentPath () |
The path where documents are stored of the current user. | |
QColor | toolBarHighlightColor () |
The default color to use when highlighting toolbar buttons. | |
QColor | inactiveTitleColor () |
The default color to use for inactive titles. | |
QColor | inactiveTextColor () |
The default color to use for inactive texts. | |
QColor | activeTitleColor () |
The default color to use for active titles. | |
QColor | activeTextColor () |
The default color to use for active texts. | |
int | contrast () |
Returns the contrast for borders. | |
QColor | baseColor () |
Returns the default base (background) color. | |
QColor | textColor () |
Returns the default text color. | |
QColor | linkColor () |
Returns the default link color. | |
QColor | visitedLinkColor () |
Returns the default color for visited links. | |
QColor | highlightedTextColor () |
Returns the default color for highlighted text. | |
QColor | highlightColor () |
Returns the default color for text highlights. | |
QColor | alternateBackgroundColor () |
Returns the alternate background color used by KListView with KListViewItem. | |
QColor | calculateAlternateBackgroundColor (const QColor &base) |
Calculates a color based on base to be used as alternating color for e.g. | |
QFont | generalFont () |
Returns the default general font. | |
QFont | fixedFont () |
Returns the default fixed font. | |
QFont | toolBarFont () |
Returns the default toolbar font. | |
QFont | menuFont () |
Returns the default menu font. | |
QFont | windowTitleFont () |
Returns the default window title font. | |
QFont | taskbarFont () |
Returns the default taskbar font. | |
QFont | largeFont (const QString &text=QString::null) |
Returns a font of approx. | |
bool | isMultiHead () |
Returns if the user specified multihead. | |
bool | wheelMouseZooms () |
Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wheel-scrolling. | |
Friends | |
class | KApplication |
Detailed Description
Access the KDE global configuration.
- Author:
- David Faure <faure@kde.org>
- Version:
- Id
- kglobalsettings.h,v 1.42 2002/09/28 12:28:47 tjansen Exp
Definition at line 40 of file kglobalsettings.h.
Member Enumeration Documentation
|
This enum describes the return type for insertTearOffHandle() wether to insert a handle or not. Applications who independently want to use handles in their popup menus should test for Application level before calling the appropriate function in KPopupMenu.
Definition at line 103 of file kglobalsettings.h. Referenced by insertTearOffHandle(). |
|
This enum describes the completion mode used for by the KCompletion class. See the styleguide.
Definition at line 164 of file kglobalsettings.h. Referenced by completionMode(), KCompletionBase::completionMode(), and KCompletion::completionMode(). |
Member Function Documentation
|
Returns a threshold in pixels for drag & drop operations. As long as the mouse movement has not exceeded this number of pixels in either X or Y direction no drag operation may be started. This prevents spurious drags when the user intended to click on something but moved the mouse a bit while doing so. For this to work you must save the position of the mouse (oldPos) in the QWidget::mousePressEvent(). When the position of the mouse (newPos) in a QWidget::mouseMoveEvent() exceeds this threshold you may start a drag which should originate from oldPos. Example code:
Definition at line 62 of file kglobalsettings.cpp. References KGlobal::config(), KConfigBase::readNumEntry(), and QApplication::startDragDistance(). |
|
Returns whether KDE runs in single (default) or double click mode. see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
Definition at line 69 of file kglobalsettings.cpp. References KGlobal::config(), and KConfigBase::readBoolEntry(). |
|
Returns whether tear-off handles are inserted in KPopupMenus.
Definition at line 76 of file kglobalsettings.cpp. References KGlobal::config(), KConfigBase::readNumEntry(), and TearOffHandle. |
|
Checks whether the cursor changes over icons.
Definition at line 85 of file kglobalsettings.cpp. References KGlobal::config(), and KConfigBase::readBoolEntry(). |
|
Checks whether to show feedback when in item (specifically an icon) is activated.
Definition at line 92 of file kglobalsettings.cpp. References KGlobal::config(), and KConfigBase::readBoolEntry(). Referenced by KIconEffect::visualActivate(). |
|
Returns the speed of the visual activation feedback.
Definition at line 99 of file kglobalsettings.cpp. References KGlobal::config(), and KConfigBase::readNumEntry(). Referenced by KIconEffect::visualActivate(). |
|
Returns the KDE setting for the auto-select option.
Definition at line 112 of file kglobalsettings.cpp. References KGlobal::config(), and KConfigBase::readNumEntry(). |
|
Returns the KDE setting for the shortcut key to open context menus.
Definition at line 141 of file kglobalsettings.cpp. References KConfigGroupSaver::config(), KGlobal::config(), KStdAction::cut(), and KConfigBase::readEntry(). |
|
Returns the KDE setting for context menus.
Definition at line 133 of file kglobalsettings.cpp. References KConfigGroupSaver::config(), KGlobal::config(), and KConfigBase::readBoolEntry(). |
|
Returns the preferred completion mode setting.
Definition at line 119 of file kglobalsettings.cpp. References KStdAccel::completion(), Completion, CompletionNone, CompletionPopup, CompletionPopupAuto, KGlobal::config(), and KConfigBase::readNumEntry(). Referenced by KCompletion::KCompletion(), and KCompletionBase::KCompletionBase(). |
|
This returns the current mouse settings.
Definition at line 538 of file kglobalsettings.cpp. References KGlobal::config(), KGlobalSettings::KMouseSettings::handed, and KConfigBase::readEntry(). |
|
The path to the desktop directory of the current user.
Definition at line 218 of file kglobalsettings.h. |
|
The path to the autostart directory of the current user.
Definition at line 224 of file kglobalsettings.h. |
|
The path to the trash directory of the current user.
Definition at line 230 of file kglobalsettings.h. |
|
The path where documents are stored of the current user.
Definition at line 236 of file kglobalsettings.h. |
|
The default color to use when highlighting toolbar buttons.
Definition at line 150 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
The default color to use for inactive titles.
Definition at line 158 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
The default color to use for inactive texts.
Definition at line 167 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
The default color to use for active titles.
Definition at line 174 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
The default color to use for active texts.
Definition at line 182 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the contrast for borders.
Definition at line 189 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readNumEntry(). Referenced by KApplication::createApplicationPalette(). |
|
Returns the default base (background) color.
Definition at line 199 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). Referenced by alternateBackgroundColor(). |
|
Returns the default text color.
Definition at line 209 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the default link color.
Definition at line 263 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the default color for visited links.
Definition at line 271 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the default color for highlighted text.
Definition at line 219 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the default color for text highlights.
Definition at line 229 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Returns the alternate background color used by KListView with KListViewItem. Any other list that uses alternating background colors should use this too, to obey to the user's preferences. Returns an invalid color if the user doesn't want alternating backgrounds.
Definition at line 237 of file kglobalsettings.cpp. References baseColor(), calculateAlternateBackgroundColor(), KGlobal::config(), QString::fromLatin1(), and KConfigBase::readColorEntry(). |
|
Calculates a color based on listviews.
Definition at line 246 of file kglobalsettings.cpp. References QColor::dark(), and QColor::light(). Referenced by alternateBackgroundColor(). |
|
Returns the default general font.
Definition at line 278 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). Referenced by largeFont(). |
|
Returns the default fixed font.
Definition at line 294 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). |
|
Returns the default toolbar font.
Definition at line 310 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). |
|
Returns the default menu font.
Definition at line 326 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). |
|
Returns the default window title font.
Definition at line 342 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). |
|
Returns the default taskbar font.
Definition at line 358 of file kglobalsettings.cpp. References KGlobal::config(), QString::fromLatin1(), KConfigBase::readFontEntry(), QFont::setPixelSize(), and QFont::setStyleHint(). |
|
Returns a font of approx.
48 pt. capable of showing
Definition at line 375 of file kglobalsettings.cpp. References QFontDatabase::families(), QFont::family(), generalFont(), QFontMetrics::height(), QFontMetrics::inFont(), QFontDatabase::isFixedPitch(), QFontDatabase::isSmoothlyScalable(), QString::length(), QFont::setPixelSize(), and QFont::setPointSize(). |
|
Returns if the user specified multihead. In case the display has multiple screens, the return value of this function specifies if the user wants KDE to run on all of them or just on the primary
Definition at line 591 of file kglobalsettings.cpp. References QCString::isEmpty(), and QCString::lower(). |
|
Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wheel-scrolling. But QTextEdit and derived classes perform zooming instead of fast scrolling. This value determines whether the user wants to zoom or scroll fast with Ctrl-wheelscroll.
Definition at line 600 of file kglobalsettings.cpp. References KGlobal::config(). |
The documentation for this class was generated from the following files: