• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Classes | Public Types | Static Public Member Functions | Friends | List of all members
TDEGlobalSettings Class Reference

#include <tdeglobalsettings.h>

Classes

struct  KMouseSettings
 

Public Types

enum  TearOffHandle { Disable = 0 , ApplicationLevel , Enable }
 
enum  Completion {
  CompletionNone =1 , CompletionAuto , CompletionMan , CompletionShell ,
  CompletionPopup , CompletionPopupAuto
}
 

Static Public Member Functions

static int dndEventDelay ()
 
static bool singleClick ()
 
static bool iconUseRoundedRect ()
 
static TearOffHandle insertTearOffHandle ()
 
static bool changeCursorOverIcon ()
 
static bool visualActivate ()
 
static unsigned int visualActivateSpeed ()
 
static int autoSelectDelay ()
 
static int contextMenuKey ()
 
static bool showContextMenusOnPress ()
 
static Completion completionMode ()
 
static KMouseSettings & mouseSettings ()
 
static TQString autostartPath ()
 
static TQString trashPath ()
 
static TQString desktopPath ()
 
static TQString documentPath ()
 
static TQString downloadPath ()
 
static TQString musicPath ()
 
static TQString picturesPath ()
 
static TQString publicSharePath ()
 
static TQString templatesPath ()
 
static TQString videosPath ()
 
static TQColor toolBarHighlightColor ()
 
static TQColor inactiveTitleColor ()
 
static TQColor inactiveTextColor ()
 
static TQColor activeTitleColor ()
 
static TQColor activeTextColor ()
 
static int contrast ()
 
static TQColor buttonBackground ()
 
static TQColor buttonTextColor ()
 
static TQColor baseColor ()
 
static TQColor textColor ()
 
static TQColor linkColor ()
 
static TQColor visitedLinkColor ()
 
static TQColor highlightedTextColor ()
 
static TQColor highlightColor ()
 
static TQColor alternateBackgroundColor ()
 
static TQColor calculateAlternateBackgroundColor (const TQColor &base)
 
static bool shadeSortColumn ()
 
static TQFont generalFont ()
 
static TQFont fixedFont ()
 
static TQFont toolBarFont ()
 
static TQFont menuFont ()
 
static TQFont windowTitleFont ()
 
static TQFont taskbarFont ()
 
static TQFont largeFont (const TQString &text=TQString::null)
 
static bool isMultiHead ()
 
static bool wheelMouseZooms ()
 
static TQRect splashScreenDesktopGeometry ()
 
static TQRect desktopGeometry (const TQPoint &point)
 
static TQRect desktopGeometry (TQWidget *w)
 
static bool showIconsOnPushButtons ()
 
static bool showFilePreview (const KURL &)
 
static bool showKonqIconActivationEffect ()
 
static bool opaqueResize ()
 
static int buttonLayout ()
 

Friends

class TDEApplication
 

Detailed Description

Access the KDE global configuration.

Author
David Faure faure.nosp@m.@kde.nosp@m..org

Definition at line 48 of file tdeglobalsettings.h.

Member Enumeration Documentation

◆ Completion

enum TDEGlobalSettings::Completion

This enum describes the completion mode used for by the TDECompletion class.

See the styleguide.

Enumerator
CompletionNone 

No completion is used.

CompletionAuto 

Text is automatically filled in whenever possible.

CompletionMan 

Same as automatic except shortest match is used for completion.

CompletionShell 

Complete text much in the same way as a typical *nix shell would.

CompletionPopup 

Lists all possible matches in a popup list-box to choose from.

CompletionPopupAuto 

Lists all possible matches in a popup list-box to choose from, and automatically fill the result whenever possible.

Definition at line 178 of file tdeglobalsettings.h.

◆ TearOffHandle

enum TDEGlobalSettings::TearOffHandle

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 TDEPopupMenu.

Since
3.1
Enumerator
Disable 

disable tear-off handles

ApplicationLevel 

enable on application level

Enable 

enable tear-off handles

Definition at line 117 of file tdeglobalsettings.h.

Member Function Documentation

◆ activeTextColor()

TQColor TDEGlobalSettings::activeTextColor ( )
static

The default color to use for active texts.

Returns
the active text color

Definition at line 353 of file tdeglobalsettings.cpp.

◆ activeTitleColor()

TQColor TDEGlobalSettings::activeTitleColor ( )
static

The default color to use for active titles.

Returns
the active title color

Definition at line 340 of file tdeglobalsettings.cpp.

◆ alternateBackgroundColor()

TQColor TDEGlobalSettings::alternateBackgroundColor ( )
static

Returns the alternate background color used by TDEListView with TDEListViewItem.

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
calculateAlternateBackgroundColor

Definition at line 422 of file tdeglobalsettings.cpp.

◆ autoSelectDelay()

int TDEGlobalSettings::autoSelectDelay ( )
static

Returns the KDE setting for the auto-select option.

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

Definition at line 277 of file tdeglobalsettings.cpp.

◆ autostartPath()

static TQString TDEGlobalSettings::autostartPath ( )
inlinestatic

The path to the autostart directory of the current user.

Returns
the path of the autostart directory

Definition at line 233 of file tdeglobalsettings.h.

◆ baseColor()

TQColor TDEGlobalSettings::baseColor ( )
static

Returns the default base (background) color.

Returns
the default base (background) color
See also
TQColorGroup::base()

Definition at line 386 of file tdeglobalsettings.cpp.

◆ buttonBackground()

TQColor TDEGlobalSettings::buttonBackground ( )
static

Returns the button background color.

Returns
the button background color
Since
3.4

Definition at line 369 of file tdeglobalsettings.cpp.

◆ buttonLayout()

int TDEGlobalSettings::buttonLayout ( )
static

The layout scheme to use for dialog buttons.

Returns
Returns the number of the scheme to use.
See also
KDialogBase::setButtonStyle()
Since
3.3

Definition at line 945 of file tdeglobalsettings.cpp.

◆ buttonTextColor()

TQColor TDEGlobalSettings::buttonTextColor ( )
static

Returns the button text color.

Returns
the button text color
Since
3.4

Definition at line 377 of file tdeglobalsettings.cpp.

◆ calculateAlternateBackgroundColor()

TQColor TDEGlobalSettings::calculateAlternateBackgroundColor ( const TQColor &  base)
static

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

listviews.

Parameters
basethe base for the calculation
Returns
the calculated color
See also
alternateBackgroundColor

Definition at line 430 of file tdeglobalsettings.cpp.

◆ changeCursorOverIcon()

bool TDEGlobalSettings::changeCursorOverIcon ( )
static

Checks whether the cursor changes over icons.

Returns
the KDE setting for "change cursor over icon"

Definition at line 253 of file tdeglobalsettings.cpp.

◆ completionMode()

TDEGlobalSettings::Completion TDEGlobalSettings::completionMode ( )
static

Returns the preferred completion mode setting.

Returns
Completion. Default is CompletionPopup.

Definition at line 283 of file tdeglobalsettings.cpp.

◆ contextMenuKey()

int TDEGlobalSettings::contextMenuKey ( )
static

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

Returns
the key that pops up context menus.

Definition at line 302 of file tdeglobalsettings.cpp.

◆ contrast()

int TDEGlobalSettings::contrast ( )
static

Returns the contrast for borders.

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

Definition at line 363 of file tdeglobalsettings.cpp.

◆ desktopGeometry() [1/2]

TQRect TDEGlobalSettings::desktopGeometry ( const TQPoint &  point)
static

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
pointa 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).
Since
3.2

Definition at line 880 of file tdeglobalsettings.cpp.

◆ desktopGeometry() [2/2]

TQRect TDEGlobalSettings::desktopGeometry ( TQWidget *  w)
static

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
wthe 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).
Since
3.2

Definition at line 897 of file tdeglobalsettings.cpp.

◆ desktopPath()

static TQString TDEGlobalSettings::desktopPath ( )
inlinestatic

The path to the desktop directory of the current user.

Returns
the user's desktop directory

Definition at line 248 of file tdeglobalsettings.h.

◆ dndEventDelay()

int TDEGlobalSettings::dndEventDelay ( )
static

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 TQWidget::mousePressEvent(). When the position of the mouse (newPos) in a TQWidget::mouseMoveEvent() exceeds this threshold you may start a drag which should originate from oldPos.

Example code:

void KColorCells::mousePressEvent( TQMouseEvent *e )
{
mOldPos = e->pos();
}
void KColorCells::mouseMoveEvent( TQMouseEvent *e )
{
if( !(e->state() && LeftButton)) return;
int delay = TDEGlobalSettings::dndEventDelay();
TQPoint 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();
}
}
}
KColorDrag
KColorDrag::makeDrag
static KColorDrag * makeDrag(const TQColor &, TQWidget *dragsource) TDE_DEPRECATED
TDEGlobalSettings::dndEventDelay
static int dndEventDelay()
Returns a threshold in pixels for drag & drop operations.
Definition: tdeglobalsettings.cpp:225
Returns
the threshold for drag & drop in pixels

Definition at line 225 of file tdeglobalsettings.cpp.

◆ documentPath()

static TQString TDEGlobalSettings::documentPath ( )
inlinestatic

The path where documents are stored of the current user.

Returns
the path of the document directory

Definition at line 254 of file tdeglobalsettings.h.

◆ downloadPath()

static TQString TDEGlobalSettings::downloadPath ( )
inlinestatic

The path where documents are stored of the current user.

Returns
the path of the downloads directory

Definition at line 260 of file tdeglobalsettings.h.

◆ fixedFont()

TQFont TDEGlobalSettings::fixedFont ( )
static

Returns the default fixed font.

Returns
the default fixed font.

Definition at line 486 of file tdeglobalsettings.cpp.

◆ generalFont()

TQFont TDEGlobalSettings::generalFont ( )
static

Returns the default general font.

Returns
the default general font.

Definition at line 470 of file tdeglobalsettings.cpp.

◆ highlightColor()

TQColor TDEGlobalSettings::highlightColor ( )
static

Returns the default color for text highlights.

Returns
the default color for text highlights
See also
TQColorGroup::hightlight()

Definition at line 413 of file tdeglobalsettings.cpp.

◆ highlightedTextColor()

TQColor TDEGlobalSettings::highlightedTextColor ( )
static

Returns the default color for highlighted text.

Returns
the default color for highlighted text
See also
TQColorGroup::hightlightedText()

Definition at line 404 of file tdeglobalsettings.cpp.

◆ iconUseRoundedRect()

bool TDEGlobalSettings::iconUseRoundedRect ( )
static

Returns whether icon text is drawn in a rounded style.

Returns
true if rounded, or false if rectangular.

Definition at line 237 of file tdeglobalsettings.cpp.

◆ inactiveTextColor()

TQColor TDEGlobalSettings::inactiveTextColor ( )
static

The default color to use for inactive texts.

Returns
the inactive text color

Definition at line 328 of file tdeglobalsettings.cpp.

◆ inactiveTitleColor()

TQColor TDEGlobalSettings::inactiveTitleColor ( )
static

The default color to use for inactive titles.

Returns
the inactive title color

Definition at line 316 of file tdeglobalsettings.cpp.

◆ insertTearOffHandle()

TDEGlobalSettings::TearOffHandle TDEGlobalSettings::insertTearOffHandle ( )
static

Returns whether tear-off handles are inserted in TDEPopupMenus.

Returns
whether tear-off handles are inserted in TDEPopupMenus.
Since
3.1

Definition at line 243 of file tdeglobalsettings.cpp.

◆ isMultiHead()

bool TDEGlobalSettings::isMultiHead ( )
static

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

Definition at line 842 of file tdeglobalsettings.cpp.

◆ largeFont()

TQFont TDEGlobalSettings::largeFont ( const TQString &  text = TQString::null)
static

Returns a font of approx.

48 pt. capable of showing text.

Parameters
textthe text to test
Returns
the font that is capable to show the text with 48 pt
Since
3.1

Definition at line 567 of file tdeglobalsettings.cpp.

◆ linkColor()

TQColor TDEGlobalSettings::linkColor ( )
static

Returns the default link color.

Returns
the default link color

Definition at line 453 of file tdeglobalsettings.cpp.

◆ menuFont()

TQFont TDEGlobalSettings::menuFont ( )
static

Returns the default menu font.

Returns
the default menu font.

Definition at line 518 of file tdeglobalsettings.cpp.

◆ mouseSettings()

TDEGlobalSettings::KMouseSettings & TDEGlobalSettings::mouseSettings ( )
static

This returns the current mouse settings.

On Windows, settings are retrieved from the system.

Returns
the current mouse settings

Definition at line 784 of file tdeglobalsettings.cpp.

◆ musicPath()

static TQString TDEGlobalSettings::musicPath ( )
inlinestatic

The path where documents are stored of the current user.

Returns
the path of the music directory

Definition at line 266 of file tdeglobalsettings.h.

◆ opaqueResize()

bool TDEGlobalSettings::opaqueResize ( )
static

Whether the user wishes to use opaque resizing.

Primarily intended for TQSplitter::setOpaqueResize()

Returns
Returns true if user wants to use opaque resizing.
Since
3.2

Definition at line 938 of file tdeglobalsettings.cpp.

◆ picturesPath()

static TQString TDEGlobalSettings::picturesPath ( )
inlinestatic

The path where documents are stored of the current user.

Returns
the path of the pictures directory

Definition at line 272 of file tdeglobalsettings.h.

◆ publicSharePath()

static TQString TDEGlobalSettings::publicSharePath ( )
inlinestatic

The path of the public share of the current user.

Returns
the path of the public share directory

Definition at line 278 of file tdeglobalsettings.h.

◆ shadeSortColumn()

bool TDEGlobalSettings::shadeSortColumn ( void  )
static

Returns if the sorted column in a TDEListView shall be drawn with a shaded background color.

Returns
true if the sorted column shall be shaded
Since
3.4

Definition at line 447 of file tdeglobalsettings.cpp.

◆ showContextMenusOnPress()

bool TDEGlobalSettings::showContextMenusOnPress ( )
static

Returns the KDE setting for context menus.

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

Definition at line 296 of file tdeglobalsettings.cpp.

◆ showFilePreview()

bool TDEGlobalSettings::showFilePreview ( const KURL &  url)
static

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

Returns
Returns true if user wants to show previews.
Since
3.2

Definition at line 923 of file tdeglobalsettings.cpp.

◆ showIconsOnPushButtons()

bool TDEGlobalSettings::showIconsOnPushButtons ( )
static

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

Returns
Returns true if user wants to show icons.
Since
3.2

Definition at line 916 of file tdeglobalsettings.cpp.

◆ showKonqIconActivationEffect()

bool TDEGlobalSettings::showKonqIconActivationEffect ( )
static

This function determines if the user wishes to see icon activation effects in Konqueror or KDesktop.

Returns
Returns true if user wants to show activation effects.
Since
3.5.12

Definition at line 931 of file tdeglobalsettings.cpp.

◆ singleClick()

bool TDEGlobalSettings::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.

Definition at line 231 of file tdeglobalsettings.cpp.

◆ splashScreenDesktopGeometry()

TQRect TDEGlobalSettings::splashScreenDesktopGeometry ( )
static

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).
Since
3.2

Definition at line 861 of file tdeglobalsettings.cpp.

◆ taskbarFont()

TQFont TDEGlobalSettings::taskbarFont ( )
static

Returns the default taskbar font.

Returns
the default taskbar font.

Definition at line 550 of file tdeglobalsettings.cpp.

◆ templatesPath()

static TQString TDEGlobalSettings::templatesPath ( )
inlinestatic

The path where templates are stored of the current user.

Returns
the path of the templates directory

Definition at line 284 of file tdeglobalsettings.h.

◆ textColor()

TQColor TDEGlobalSettings::textColor ( )
static

Returns the default text color.

Returns
the default text color
See also
TQColorGroup::text()

Definition at line 395 of file tdeglobalsettings.cpp.

◆ toolBarFont()

TQFont TDEGlobalSettings::toolBarFont ( )
static

Returns the default toolbar font.

Returns
the default toolbar font.

Definition at line 502 of file tdeglobalsettings.cpp.

◆ toolBarHighlightColor()

TQColor TDEGlobalSettings::toolBarHighlightColor ( )
static

The default color to use when highlighting toolbar buttons.

Returns
the toolbar highlight color

Definition at line 309 of file tdeglobalsettings.cpp.

◆ trashPath()

static TQString TDEGlobalSettings::trashPath ( )
inlinestatic

DEPRECATED (starting from kde-3.4).

This isn't where the trash contents is, anymore. Use TDEIO::trash() to trash files, "trash:/" to list the trash contents.

Definition at line 240 of file tdeglobalsettings.h.

◆ videosPath()

static TQString TDEGlobalSettings::videosPath ( )
inlinestatic

The path where documents are stored of the current user.

Returns
the path of the videos directory

Definition at line 290 of file tdeglobalsettings.h.

◆ visitedLinkColor()

TQColor TDEGlobalSettings::visitedLinkColor ( )
static

Returns the default color for visited links.

Returns
the default color for visited links

Definition at line 462 of file tdeglobalsettings.cpp.

◆ visualActivate()

bool TDEGlobalSettings::visualActivate ( )
static

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

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

Definition at line 259 of file tdeglobalsettings.cpp.

◆ visualActivateSpeed()

unsigned int TDEGlobalSettings::visualActivateSpeed ( )
static

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

Definition at line 265 of file tdeglobalsettings.cpp.

◆ wheelMouseZooms()

bool TDEGlobalSettings::wheelMouseZooms ( )
static

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

But TQTextEdit 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
Since
3.1

Definition at line 855 of file tdeglobalsettings.cpp.

◆ windowTitleFont()

TQFont TDEGlobalSettings::windowTitleFont ( )
static

Returns the default window title font.

Returns
the default window title font.

Definition at line 534 of file tdeglobalsettings.cpp.

Friends And Related Function Documentation

◆ TDEApplication

friend class TDEApplication
friend

Definition at line 628 of file tdeglobalsettings.h.


The documentation for this class was generated from the following files:
  • tdeglobalsettings.h
  • tdeglobalsettings.cpp

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.