• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KWinLibraries

KDecorationOptions Class Reference
[KWin decorations library]

#include <kdecoration.h>

Inheritance diagram for KDecorationOptions:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class holds various configuration settings for the decoration.

It is accessible from the decorations either as KDecoration::options() or KDecorationFactory::options().

Definition at line 207 of file kdecoration.h.


Public Member Functions

QColor color (ColorType type, bool active=true) const
bool customButtonPositions () const
QFont font (bool active=true, bool small=false) const
 KDecorationOptions ()
bool moveResizeMaximizedWindows () const
WindowOperation operationMaxButtonClick (Qt::MouseButtons button) const
QPalette palette (ColorType type, bool active=true) const
BorderSize preferredBorderSize (KDecorationFactory *factory) const
bool showTooltips () const
QString titleButtonsLeft () const
QString titleButtonsRight () const
virtual unsigned long updateSettings ()=0
unsigned long updateSettings (KConfig *config)
virtual ~KDecorationOptions ()

Static Public Member Functions

static QString defaultTitleButtonsLeft ()
static QString defaultTitleButtonsRight ()

Protected Member Functions

void setBorderSize (BorderSize bs)
void setCustomButtonPositions (bool b)
void setOpMaxButtonLeftClick (WindowOperation op)
void setOpMaxButtonMiddleClick (WindowOperation op)
void setOpMaxButtonRightClick (WindowOperation op)
void setTitleButtonsLeft (const QString &b)
void setTitleButtonsRight (const QString &b)

Constructor & Destructor Documentation

KDecorationOptions::KDecorationOptions (  ) 

Definition at line 384 of file kdecoration.cpp.

KDecorationOptions::~KDecorationOptions (  )  [virtual]

Definition at line 391 of file kdecoration.cpp.


Member Function Documentation

QColor KDecorationOptions::color ( ColorType  type,
bool  active = true 
) const

Returns the color that should be used for the given part of the decoration.

The changed flags for this setting is SettingColors.

Parameters:
type The requested color type.
active Whether the color should be for active or inactive windows.

Definition at line 398 of file kdecoration.cpp.

bool KDecorationOptions::customButtonPositions (  )  const

Returns true if the style should use custom button positions The changed flags for this setting is SettingButtons.

See also:
titleButtonsLeft

titleButtonsRight

Definition at line 433 of file kdecoration.cpp.

QString KDecorationOptions::defaultTitleButtonsLeft (  )  [static]

Returns the default left button sequence.

Definition at line 443 of file kdecoration.cpp.

QString KDecorationOptions::defaultTitleButtonsRight (  )  [static]

Returns the default right button sequence.

Definition at line 453 of file kdecoration.cpp.

QFont KDecorationOptions::font ( bool  active = true,
bool  small = false 
) const

Returns the active or inactive decoration font.

The changed flags for this setting is SettingFont.

Parameters:
active Whether to return the color for active or inactive windows.
small If true, returns a font that's suitable for tool windows.

Definition at line 403 of file kdecoration.cpp.

bool KDecorationOptions::moveResizeMaximizedWindows (  )  const

Definition at line 472 of file kdecoration.cpp.

KDecorationDefines::WindowOperation KDecorationOptions::operationMaxButtonClick ( Qt::MouseButtons  button  )  const

Definition at line 477 of file kdecoration.cpp.

QPalette KDecorationOptions::palette ( ColorType  type,
bool  active = true 
) const

Returns a palette using the given decoration color as the background.

The changed flags for this setting is SettingColors.

Parameters:
type The requested color type.
active Whether to return the color for active or inactive windows.

Definition at line 411 of file kdecoration.cpp.

KDecorationOptions::BorderSize KDecorationOptions::preferredBorderSize ( KDecorationFactory *  factory  )  const

The preferred border size selected by the user, e.g.

for accessibility reasons, or when using high resolution displays. It's up to the decoration to decide which borders or if any borders at all will obey this setting. It is guaranteed that the returned value will be one of those returned by KDecorationFactory::borderSizes(), so if that one hasn't been reimplemented, BorderNormal is always returned. The changed flags for this setting is SettingBorder.

Parameters:
factory the decoration factory used

Definition at line 463 of file kdecoration.cpp.

void KDecorationOptions::setBorderSize ( BorderSize  bs  )  [protected]

Definition at line 499 of file kdecoration.cpp.

void KDecorationOptions::setCustomButtonPositions ( bool  b  )  [protected]

Definition at line 505 of file kdecoration.cpp.

void KDecorationOptions::setOpMaxButtonLeftClick ( WindowOperation  op  )  [protected]

Definition at line 484 of file kdecoration.cpp.

void KDecorationOptions::setOpMaxButtonMiddleClick ( WindowOperation  op  )  [protected]

Definition at line 494 of file kdecoration.cpp.

void KDecorationOptions::setOpMaxButtonRightClick ( WindowOperation  op  )  [protected]

Definition at line 489 of file kdecoration.cpp.

void KDecorationOptions::setTitleButtonsLeft ( const QString &  b  )  [protected]

Definition at line 510 of file kdecoration.cpp.

void KDecorationOptions::setTitleButtonsRight ( const QString &  b  )  [protected]

Definition at line 515 of file kdecoration.cpp.

bool KDecorationOptions::showTooltips (  )  const

Returns:
true if the style should use tooltips for window buttons The changed flags for this setting is SettingTooltips.

Definition at line 458 of file kdecoration.cpp.

QString KDecorationOptions::titleButtonsLeft (  )  const

If customButtonPositions() returns true, titleButtonsLeft returns which buttons should be on the left side of the titlebar from left to right.

Characters in the returned string have this meaning :

  • 'M' menu button
  • 'S' on_all_desktops button
  • 'H' quickhelp button
  • 'I' minimize ( iconify ) button
  • 'A' maximize button
  • 'X' close button
  • 'F' keep_above_others button
  • 'B' keep_below_others button
  • 'L' shade button
  • 'R' resize button
  • '_' spacer
The default ( which is also returned if customButtonPositions returns false ) is "MS". Unknown buttons in the returned string must be ignored. The changed flags for this setting is SettingButtons.

Definition at line 438 of file kdecoration.cpp.

QString KDecorationOptions::titleButtonsRight (  )  const

If customButtonPositions() returns true, titleButtonsRight returns which buttons should be on the right side of the titlebar from left to right.

Characters in the return string have the same meaning like in titleButtonsLeft().

The default ( which is also returned if customButtonPositions returns false ) is "HIAX". Unknown buttons in the returned string must be ignored. The changed flags for this setting is SettingButtons.

Definition at line 448 of file kdecoration.cpp.

virtual unsigned long KDecorationOptions::updateSettings (  )  [pure virtual]

unsigned long KDecorationOptions::updateSettings ( KConfig *  config  ) 

Call to update settings when the config changes.

Return value is a combination of Setting* (SettingColors, etc.) that have changed.

Since:
4.0.1

Definition at line 428 of file kdecoration.cpp.


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

KWinLibraries

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal