class KGlobalSettings


Definition#include <kglobalsettings.h>
Annotated List
Files
Globals
Hierarchy
Index
Main

Public Types

Public Static Methods


Detailed Description

Access the KDE global configuration.

int  dndEventDelay ()

[static]

Returns a treshold 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 treshold you may start a drag which should originate from oldPos.

Example code:


 void KColorCells::mousePressEvent( QMouseEvent *e )
 {
    mOldPos = e->pos();
 }

 void KColorCells::mouseMoveEvent( QMouseEvent *e )
 {
    if( !(e->state() && LeftButton)) return;

    int delay = KGlobalSettings::dndEventDelay();
    QPoint newPos = e->pos();
    if(newPos->x() > mOldPos.x()+delay || newPos->x() < mOldPos.x()-delay ||
       newPos->y() > mOldPos.y()+delay || newPos->y() < mOldPos.y()-delay)
    {
       // Drag color object
       int cell = posToCell(mOldPos); // Find color at mOldPos
       if ((cell != -1) && colors[cell].isValid())
       {
          KColorDrag *d = KColorDrag::makeDrag( colors[cell], this);
          d->dragCopy();
       }
    }
 }

bool  singleClick ()

[static]

Returns whether KDE runs in single (default) or double click mode.

see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html

Returns: true if single click mode, or false if double click mode.

bool  insertTearOffHandle ()

[static]

Returns whether tear-off handles are inserted in KPopupMenus.

bool  changeCursorOverIcon ()

[static]

Returns: the KDE setting for "change cursor over icon"

bool  visualActivate ()

[static]

Returns: whether to show some feedback when an item (specifically an icon) is activated.

unsigned int  visualActivateSpeed ()

[static]

int  autoSelectDelay ()

[static]

Returns the KDE setting for the auto-select option

Returns: the auto-select delay or -1 if auto-select is disabled.

int  contextMenuKey ()

[static]

Returns the KDE setting for the shortcut key to open context menus.

Returns: the key that pops up context menus.

bool  showContextMenusOnPress ()

[static]

Returns the KDE setting for context menus.

Returns: whether context menus should be shown on button press or button release (click).

enum Completion {CompletionNone=1, CompletionAuto, CompletionMan, CompletionShell }

Retrieve the configured completion mode.

see http://developer.kde.org/documentation/standards/kde/style/keys/completion.html

Returns: CompletionNone: Completion should be disabled CompletionAuto: Automatic completion CompletionMan: Like automatic completion except the user initiates the completion using the completion key as in CompletionEOL CompletionShell: Attempts to mimic the completion feature found in typical *nix shell enviornments.

Completion  completionMode ()

[static]

bool  honorGnome ()

[static]

This returns whether or not KDE should use certain GNOME resources. The resources, in this case, are things like pixmap directories, applnk paths, etc.

Returns: Whether or not KDE should use certain GNOME resources

QString  desktopPath ()

[static]

The path to the desktop directory of the current user.

QString  autostartPath ()

[static]

The path to the autostart directory of the current user.

QString  trashPath ()

[static]

The path to the trash directory of the current user.

QColor  toolBarHighlightColor ()

[static]

The default color to use when highlighting toolbar buttons

QColor  inactiveTitleColor ()

[static]

QColor  inactiveTextColor ()

[static]

QColor  activeTitleColor ()

[static]

QColor  activeTextColor ()

[static]

int  contrast ()

[static]

QColor  baseColor ()

[static]

The default colors to use for text and links.

QColor  textColor ()

[static]

QColor  linkColor ()

[static]

QColor  visitedLinkColor ()

[static]

QColor  highlightedTextColor ()

[static]

QColor  highlightColor ()

[static]

QFont  generalFont ()

[static]

QFont  fixedFont ()

[static]

QFont  toolBarFont ()

[static]

QFont  menuFont ()

[static]

private: /** * reads in all paths from kdeglobals */ void  initStatic ()

[static]

void  initColors ()

[static]

initialise kde2Blue

void  rereadFontSettings ()

[static]

drop cached values (called by KApplication)

void  rereadPathSettings ()

[static]

drop cached values (called by KApplication)