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

KDEUI

  • KStyle
  • ColorMode
Public Types | Public Member Functions | List of all members
KStyle::ColorMode Class Reference
KStyle option representation

#include <kstyle.h>

Public Types

enum  Mode { PaletteEntryMode, BWAutoContrastMode = 0x8000000 }
 

Public Member Functions

 ColorMode (QPalette::ColorRole _role)
 
 ColorMode (Mode _mode, QPalette::ColorRole _role)
 
 ColorMode (int encoded)
 
QColor color (const QPalette &palette)
 
 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 191 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 201 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 4432 of file kstyle.cpp.

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

Constructor with explicit color mode and palette roles.

Definition at line 4437 of file kstyle.cpp.

KStyle::ColorMode::ColorMode ( int  encoded)

Decode from an int.

Definition at line 4447 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 4453 of file kstyle.cpp.

KStyle::ColorMode::operator int ( ) const

Represent as an int to store as a property.

Definition at line 4442 of file kstyle.cpp.


The documentation for this class was generated from the following files:
  • kstyle.h
  • kstyle.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal