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

KDEUI

KStyle::ColorMode

KStyle::ColorMode Class Reference
[KStyle option representation]

A representation for colors for use as a widget layout property. More...

#include <kstyle.h>

List of all members.

Public Types

enum  Mode { PaletteEntryMode, BWAutoContrastMode = 0x8000000 }

Public Member Functions

QColor color (const QPalette &palette)
 ColorMode (int encoded)
 ColorMode (Mode _mode, QPalette::ColorRole _role)
 ColorMode (QPalette::ColorRole _role)
 operator int () const

Detailed Description

A representation for colors for use as a widget layout property.

This marshals to and from integers.

Definition at line 190 of file kstyle.h.


Member Enumeration Documentation

enum KStyle::ColorMode::Mode

KStyle understands two kinds of colors:

  1. Palette entries.

This means the item must be painted with a specific color role from the palette.

  1. Auto-selected black or white, dependent on the brightness of a certain color role from the palette.
Enumerator:
PaletteEntryMode 
BWAutoContrastMode 

Definition at line 200 of file kstyle.h.


Constructor & Destructor Documentation

KStyle::ColorMode::ColorMode ( QPalette::ColorRole  _role  ) 

Constructor, using a the given palette role _role and a default mode.

Definition at line 4397 of file kstyle.cpp.

KStyle::ColorMode::ColorMode ( Mode  _mode,
QPalette::ColorRole  _role 
)

Constructor with explicit color mode and palette roles.

Definition at line 4402 of file kstyle.cpp.

KStyle::ColorMode::ColorMode ( int  encoded  ) 

Decode from an int.

Definition at line 4412 of file kstyle.cpp.


Member Function Documentation

QColor KStyle::ColorMode::color ( const QPalette &  palette  ) 

Return the color corresponding to our role from the palette, automatically compensating for the contrast mode.

Definition at line 4418 of file kstyle.cpp.

KStyle::ColorMode::operator int (  )  const

Represent as an int to store as a property.

Definition at line 4407 of file kstyle.cpp.


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

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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