org.kde.koala

Class KGlobalSettings

public class KGlobalSettings extends Object implements QtSupport

Access the KDE global configuration.

Author: David Faure

UNKNOWN: Access the KDE global configuration.

Field Summary
static intApplicationLevel
static intCompletionAuto
static intCompletionMan
static intCompletionNone
This enum describes the completion mode used for by the KCompletion class.
static intCompletionPopup
static intCompletionPopupAuto
static intCompletionShell
static intDisable
This enum describes the return type for insertTearOffHandle() whether to insert a handle or not.
static intEnable
Constructor Summary
protected KGlobalSettings(Class dummy)
KGlobalSettings()
Method Summary
static QColoractiveTextColor()
The default color to use for active texts.
static QColoractiveTitleColor()
The default color to use for active titles.
static QColoralternateBackgroundColor()
Returns the alternate background color used by KListView with KListViewItem.
static StringautostartPath()
The path to the autostart directory of the current user.
static intautoSelectDelay()
Returns the KDE setting for the auto-select option.
static QColorbaseColor()
Returns the default base (background) color.
static QColorbuttonBackground()
Returns the button background color
static intbuttonLayout()
The layout scheme to use for dialog buttons
static QColorbuttonTextColor()
Returns the button text color
static QColorcalculateAlternateBackgroundColor(QColor base)
Calculates a color based on base to be used as alternating color for e.g. listviews.
static booleanchangeCursorOverIcon()
Checks whether the cursor changes over icons.
static intcompletionMode()
Returns the preferred completion mode setting.
static intcontextMenuKey()
Returns the KDE setting for the shortcut key to open context menus.
static intcontrast()
Returns the contrast for borders.
static QRectdesktopGeometry(QPoint point)
This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually.
static QRectdesktopGeometry(QWidget w)
This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually.
static StringdesktopPath()
The path to the desktop directory of the current user.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
static intdndEventDelay()
Returns a threshold in pixels for drag & drop operations.
static StringdocumentPath()
The path where documents are stored of the current user.
protected voidfinalize()
Deletes the wrapped C++ instance
static QFontfixedFont()
Returns the default fixed font.
static QFontgeneralFont()
Returns the default general font.
static QColorhighlightColor()
Returns the default color for text highlights.
static QColorhighlightedTextColor()
Returns the default color for highlighted text.
static QColorinactiveTextColor()
The default color to use for inactive texts.
static QColorinactiveTitleColor()
The default color to use for inactive titles.
static intinsertTearOffHandle()
Returns whether tear-off handles are inserted in KPopupMenus.
booleanisDisposed()
Has the wrapped C++ instance been deleted?
static booleanisMultiHead()
Returns if the user specified multihead.
static QFontlargeFont(String text)
Returns a font of approx.
static QFontlargeFont()
static QColorlinkColor()
Returns the default link color.
static QFontmenuFont()
Returns the default menu font.
static booleanopaqueResize()
Whether the user wishes to use opaque resizing.
static booleanshadeSortColumn()
Returns if the sorted column in a KListView shall be drawn with a shaded background color.
static booleanshowContextMenusOnPress()
Returns the KDE setting for context menus.
static booleanshowFilePreview(KURL arg1)
This function determines if the user wishes to see previews for the selected url
static booleanshowIconsOnPushButtons()
This function determines if the user wishes to see icons on the push buttons.
static booleansingleClick()
Returns whether KDE runs in single (default) or double click mode. see http://developer.kde.org/documentation/standards/kde/style/mouse/index.html
static QRectsplashScreenDesktopGeometry()
This function returns the desktop geometry for an application's splash screen.
static QFonttaskbarFont()
Returns the default taskbar font.
static QColortextColor()
Returns the default text color.
static QFonttoolBarFont()
Returns the default toolbar font.
static QColortoolBarHighlightColor()
The default color to use when highlighting toolbar buttons.
static StringtrashPath()
DEPRECATED (starting from kde-3.4).
static QColorvisitedLinkColor()
Returns the default color for visited links.
static booleanvisualActivate()
Checks whether to show feedback when in item (specifically an icon) is activated.
static intvisualActivateSpeed()
Returns the speed of the visual activation feedback.
static booleanwheelMouseZooms()
Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wheel-scrolling.
static QFontwindowTitleFont()
Returns the default window title font.

Field Detail

ApplicationLevel

public static final int ApplicationLevel

CompletionAuto

public static final int CompletionAuto

CompletionMan

public static final int CompletionMan

CompletionNone

public static final int CompletionNone
This enum describes the completion mode used for by the KCompletion class. See the styleguide.

UNKNOWN: This enum describes the completion mode used for by the KCompletion class.

CompletionPopup

public static final int CompletionPopup

CompletionPopupAuto

public static final int CompletionPopupAuto

CompletionShell

public static final int CompletionShell

Disable

public static final int Disable
This enum describes the return type for insertTearOffHandle() whether 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.

UNKNOWN: This enum describes the return type for insertTearOffHandle() whether to insert a handle or not.

Enable

public static final int Enable

Constructor Detail

KGlobalSettings

protected KGlobalSettings(Class dummy)

KGlobalSettings

public KGlobalSettings()

Method Detail

activeTextColor

public static QColor activeTextColor()
The default color to use for active texts.

Returns: the active text color

UNKNOWN: The default color to use for active texts.

activeTitleColor

public static QColor activeTitleColor()
The default color to use for active titles.

Returns: the active title color

UNKNOWN: The default color to use for active titles.

alternateBackgroundColor

public static QColor alternateBackgroundColor()
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.

Returns: the alternate background color

See Also: KGlobalSettings

UNKNOWN: Returns the alternate background color used by KListView with KListViewItem.

autostartPath

public static String autostartPath()
The path to the autostart directory of the current user.

Returns: the path of the autostart directory

UNKNOWN: The path to the autostart directory of the current user.

autoSelectDelay

public static int autoSelectDelay()
Returns the KDE setting for the auto-select option.

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

UNKNOWN: Returns the KDE setting for the auto-select option.

baseColor

public static QColor baseColor()
Returns the default base (background) color.

Returns: the default base (background) color

See Also: org.kde.qt.QColorGroup#base

UNKNOWN: Returns the default base (background) color.

buttonBackground

public static QColor buttonBackground()
Returns the button background color

Returns: the button background color

UNKNOWN: Returns the button background color

buttonLayout

public static int buttonLayout()
The layout scheme to use for dialog buttons

Returns: Returns the number of the scheme to use.

See Also: KDialogBase

UNKNOWN: The layout scheme to use for dialog buttons

buttonTextColor

public static QColor buttonTextColor()
Returns the button text color

Returns: the button text color

UNKNOWN: Returns the button text color

calculateAlternateBackgroundColor

public static QColor calculateAlternateBackgroundColor(QColor base)
Calculates a color based on base to be used as alternating color for e.g. listviews.

Parameters: base the base for the calculation

Returns: the calculated color

See Also: KGlobalSettings

UNKNOWN: Calculates a color based on base to be used as alternating color for e.

changeCursorOverIcon

public static boolean changeCursorOverIcon()
Checks whether the cursor changes over icons.

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

UNKNOWN: Checks whether the cursor changes over icons.

completionMode

public static int completionMode()
Returns the preferred completion mode setting.

Returns: Completion. Default is CompletionPopup.

UNKNOWN: Returns the preferred completion mode setting.

contextMenuKey

public static int contextMenuKey()
Returns the KDE setting for the shortcut key to open context menus.

Returns: the key that pops up context menus.

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

contrast

public static int contrast()
Returns the contrast for borders.

Returns: the contrast (between 0 for minimum and 10 for maximum contrast)

UNKNOWN: Returns the contrast for borders.

desktopGeometry

public static QRect desktopGeometry(QPoint point)
This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually. It takes into account the user's display settings (number of screens, Xinerama, etc), and the user's preferences (if KDE should be Xinerama aware). Note that this can break in multi-head (not Xinerama) mode because this point could be on multiple screens. Use with care.

Parameters: point a reference point for the widget, for instance one that the widget should be adjacent or on top of.

Returns: the geometry to use for the desktop. Note that it might not start at (0,0).

UNKNOWN: This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually.

desktopGeometry

public static QRect desktopGeometry(QWidget w)
This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually. It takes into account the user's display settings (number of screens, Xinerama, etc), and the user's preferences (if KDE should be Xinerama aware).

Parameters: w the widget in question. This is used to determine which screen to use in Xinerama or multi-head mode.

Returns: the geometry to use for the desktop. Note that it might not start at (0,0).

UNKNOWN: This function returns the desktop geometry for an application that needs to set the geometry of a widget on the screen manually.

desktopPath

public static String desktopPath()
The path to the desktop directory of the current user.

Returns: the user's desktop directory

UNKNOWN: The path to the desktop directory of the current user.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

dndEventDelay

public static int dndEventDelay()
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:
		 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();
		       }
		    }
		 }
		 

Returns: the threshold for drag & drop in pixels

UNKNOWN: Returns a threshold in pixels for drag & drop operations.

documentPath

public static String documentPath()
The path where documents are stored of the current user.

Returns: the path of the document directory

UNKNOWN: The path where documents are stored of the current user.

finalize

protected void finalize()
Deletes the wrapped C++ instance

fixedFont

public static QFont fixedFont()
Returns the default fixed font.

Returns: the default fixed font.

UNKNOWN: Returns the default fixed font.

generalFont

public static QFont generalFont()
Returns the default general font.

Returns: the default general font.

UNKNOWN: Returns the default general font.

highlightColor

public static QColor highlightColor()
Returns the default color for text highlights.

Returns: the default color for text highlights

See Also: org.kde.qt.QColorGroup#hightlight

UNKNOWN: Returns the default color for text highlights.

highlightedTextColor

public static QColor highlightedTextColor()
Returns the default color for highlighted text.

Returns: the default color for highlighted text

See Also: org.kde.qt.QColorGroup#hightlightedText

UNKNOWN: Returns the default color for highlighted text.

inactiveTextColor

public static QColor inactiveTextColor()
The default color to use for inactive texts.

Returns: the inactive text color

UNKNOWN: The default color to use for inactive texts.

inactiveTitleColor

public static QColor inactiveTitleColor()
The default color to use for inactive titles.

Returns: the inactive title color

UNKNOWN: The default color to use for inactive titles.

insertTearOffHandle

public static int insertTearOffHandle()
Returns whether tear-off handles are inserted in KPopupMenus.

Returns: whether tear-off handles are inserted in KPopupMenus.

UNKNOWN: Returns whether tear-off handles are inserted in KPopupMenus.

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

isMultiHead

public static boolean isMultiHead()
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 On Windows, settings are retrieved from the system.

Returns: true if the user chose multi head

UNKNOWN: Returns if the user specified multihead.

largeFont

public static QFont largeFont(String text)
Returns a font of approx. 48 pt. capable of showing text.

Parameters: text the text to test

Returns: the font that is capable to show the text with 48 pt

UNKNOWN: Returns a font of approx.

largeFont

public static QFont largeFont()

linkColor

public static QColor linkColor()
Returns the default link color.

Returns: the default link color

UNKNOWN: Returns the default link color.

menuFont

public static QFont menuFont()
Returns the default menu font.

Returns: the default menu font.

UNKNOWN: Returns the default menu font.

opaqueResize

public static boolean opaqueResize()
Whether the user wishes to use opaque resizing. Primarily intended for QSplitter.setOpaqueResize()

Returns: Returns true if user wants to use opaque resizing.

UNKNOWN: Whether the user wishes to use opaque resizing.

shadeSortColumn

public static boolean shadeSortColumn()
Returns if the sorted column in a KListView shall be drawn with a shaded background color.

Returns: true if the sorted column shall be shaded

UNKNOWN: Returns if the sorted column in a KListView shall be drawn with a shaded background color.

showContextMenusOnPress

public static boolean showContextMenusOnPress()
Returns the KDE setting for context menus.

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

UNKNOWN: Returns the KDE setting for context menus.

showFilePreview

public static boolean showFilePreview(KURL arg1)
This function determines if the user wishes to see previews for the selected url

Returns: Returns true if user wants to show previews.

UNKNOWN: This function determines if the user wishes to see previews for the selected url

showIconsOnPushButtons

public static boolean showIconsOnPushButtons()
This function determines if the user wishes to see icons on the push buttons.

Returns: Returns true if user wants to show icons.

UNKNOWN: This function determines if the user wishes to see icons on the push buttons.

singleClick

public static boolean singleClick()
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.

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

splashScreenDesktopGeometry

public static QRect splashScreenDesktopGeometry()
This function returns the desktop geometry for an application's splash screen. It takes into account the user's display settings (number of screens, Xinerama, etc), and the user's preferences (if KDE should be Xinerama aware).

Returns: the geometry to use for the desktop. Note that it might not start at (0,0).

UNKNOWN: This function returns the desktop geometry for an application's splash screen.

taskbarFont

public static QFont taskbarFont()
Returns the default taskbar font.

Returns: the default taskbar font.

UNKNOWN: Returns the default taskbar font.

textColor

public static QColor textColor()
Returns the default text color.

Returns: the default text color

See Also: org.kde.qt.QColorGroup#text

UNKNOWN: Returns the default text color.

toolBarFont

public static QFont toolBarFont()
Returns the default toolbar font.

Returns: the default toolbar font.

UNKNOWN: Returns the default toolbar font.

toolBarHighlightColor

public static QColor toolBarHighlightColor()
The default color to use when highlighting toolbar buttons.

Returns: the toolbar highlight color

UNKNOWN: The default color to use when highlighting toolbar buttons.

trashPath

public static String trashPath()
DEPRECATED (starting from kde-3.4). This isn't where the trash contents is, anymore. Use KIO.trash() to trash files, "trash:/" to list the trash contents.

UNKNOWN: DEPRECATED (starting from kde-3.

visitedLinkColor

public static QColor visitedLinkColor()
Returns the default color for visited links.

Returns: the default color for visited links

UNKNOWN: Returns the default color for visited links.

visualActivate

public static boolean visualActivate()
Checks whether to show feedback when in item (specifically an icon) is activated.

Returns: whether to show some feedback when an item is activated.

UNKNOWN: Checks whether to show feedback when in item (specifically an icon) is activated.

visualActivateSpeed

public static int visualActivateSpeed()
Returns the speed of the visual activation feedback.

Returns: the speed of the visual activation feedback, between 0 for minimum and 100 for maximum speed

UNKNOWN: Returns the speed of the visual activation feedback.

wheelMouseZooms

public static boolean wheelMouseZooms()
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.

Returns: true if the user wishes to zoom with the mouse wheel, false for scrolling

UNKNOWN: Typically, QScrollView derived classes can be scrolled fast by holding down the Ctrl-button during wheel-scrolling.

windowTitleFont

public static QFont windowTitleFont()
Returns the default window title font.

Returns: the default window title font.

UNKNOWN: Returns the default window title font.