Homepage > Man Pages > Category > Subroutines
Homepage > Man Pages > Name > Q

qcolorgroup

man page of qcolorgroup

qcolorgroup: Group of widget colors

NAME

QColorGroup - Group of widget colors

SYNOPSIS

#include <qpalette.h> Public Members QColorGroup () QColorGroup ( const QColor & foreground, const QColor & background, const QColor & light, const QColor & dark, const QColor & mid, const QColor & text, const QColor & base ) (obsolete) QColorGroup ( const QBrush & foreground, const QBrush & button, const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & background ) QColorGroup ( const QColorGroup & other ) ~QColorGroup () QColorGroup & operator= ( const QColorGroup & other ) enum ColorRole { Foreground, Button, Light, Midlight, Dark, Mid, Text, BrightText, ButtonText, Base, Background, Shadow, Highlight, HighlightedText, Link, LinkVisited, NColorRoles } const QColor & color ( ColorRole r ) const const QBrush & brush ( ColorRole r ) const void setColor ( ColorRole r, const QColor & c ) void setBrush ( ColorRole r, const QBrush & b ) const QColor & foreground () const const QColor & button () const const QColor & light () const const QColor & dark () const const QColor & mid () const const QColor & text () const const QColor & base () const const QColor & background () const const QColor & midlight () const const QColor & brightText () const const QColor & buttonText () const const QColor & shadow () const const QColor & highlight () const const QColor & highlightedText () const const QColor & link () const const QColor & linkVisited () const bool operator== ( const QColorGroup & g ) const bool operator!= ( const QColorGroup & g ) const

RELATED FUNCTION DOCUMENTATION

QDataStream & operator<< ( QDataStream & s, const QColorGroup & g )
DESCRIPTION
The QColorGroup class contains a group of widget colors. A color group contains a group of colors used by widgets for drawing themselves. We recommend that widgets use color group roles such as "foreground" and "base" rather than literal colors like "red" or "turquoise". The color roles are enumerated and defined in the ColorRole documentation. The most common use of QColorGroup is like this: QPainter p; ... p.setPen( colorGroup().foreground() ); p.drawLine( ... ) It is also possible to modify color groups or create new color groups from scratch. The color group class can be created using three different constructors or by modifying one supplied by Qt. The default constructor creates an all-black color group, which can then be modified using set functions; there's also a constructor for specifying all the color group colors. And there is also a copy constructor. We strongly recommend using a system-supplied color group and modifying that as necessary. You modify a color group by calling the access functions setColor() and setBrush(), depending on whether you want a pure color or a pixmap pattern. There are also corresponding color() and brush() getters, and a commonly used convenience function to get each ColorRole: background(), foreground(), base(), etc. See also QColor, QPalette, QWidget::colorGroup, Widget Appearance and Style, Graphics Classes, and Image Processing Classes. Member Type Documentation
QCOLORGROUP::COLORROLE
The ColorRole enum defines the different symbolic color roles used in current GUIs. The central roles are: QColorGroup::Background - general background color. QColorGroup::Foreground - general foreground color. QColorGroup::Base - used as background color for text entry widgets, for example; usually white or another light color. QColorGroup::Text - the foreground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast with Background and Base. QColorGroup::Button - general button background color in which buttons need a background different from Background, as in the Macintosh style. QColorGroup::ButtonText - a foreground color used with the Button color. There are some color roles used mostly for 3D bevel and shadow effects: QColorGroup::Light - lighter than Button color. QColorGroup::Midlight - between Button and Light. QColorGroup::Dark - darker than Button. QColorGroup::Mid - between Button and Dark. QColorGroup::Shadow - a very dark color. By default, the shadow color is Qt::black. All of these are normally derived from Background and used in ways that depend on that relationship. For example, buttons depend on it to make the bevels look attractive, and Motif scroll bars depend on Mid to be slightly different from Background. Selected (marked) items have two roles: QColorGroup::Highlight - a color to indicate a selected item or the current item. By default, the highlight color is Qt::darkBlue. QColorGroup::HighlightedText - a text color that contrasts with Highlight. By default, the highlighted text color is Qt::white. Finally, there is a special role for text that needs to be drawn where Text or Foreground would give poor contrast, such as on pressed push buttons: QColorGroup::BrightText - a text color that is very different from Foreground and contrasts well with e.g. Dark. QColorGroup::Link - a text color used for unvisited hyperlinks. By default, the link color is Qt::blue. QColorGroup::LinkVisited - a text color used for already visited hyperlinks. By default, the linkvisited color is Qt::magenta. QColorGroup::NColorRoles - Internal. Note that text colors can be used for things other than just words; text colors are usually used for text, but it's quite common to use the text color roles for lines, icons, etc. This image shows most of the color roles in use: <center> [Image Omitted] </center>

MEMBER FUNCTION DOCUMENTATION

QCOLORGROUP::QCOLORGROUP ()

Constructs a color group with all colors set to black.

QCOLORGROUP::QCOLORGROUP ( CONST QCOLOR & FOREGROUND, CONST QCOLOR &

background, const QColor & light, const QColor & dark, const QColor & mid, const QColor & text, const QColor & base ) This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. Constructs a color group with the specified colors. The button color will be set to the background color.

QCOLORGROUP::QCOLORGROUP ( CONST QBRUSH & FOREGROUND, CONST QBRUSH & BUTTON,

const QBrush & light, const QBrush & dark, const QBrush & mid, const QBrush & text, const QBrush & bright_text, const QBrush & base, const QBrush & background ) Constructs a color group. You can pass either brushes, pixmaps or plain colors for foreground, button, light, dark, mid, text, bright_text, base and background. See also QBrush.
QCOLORGROUP::QCOLORGROUP ( CONST QCOLORGROUP & OTHER )
Constructs a color group that is an independent copy of other.
QCOLORGROUP::~QCOLORGROUP ()
Destroys the color group.

CONST QCOLOR & QCOLORGROUP::BACKGROUND () CONST

Returns the background color of the color group. See also ColorRole.

CONST QCOLOR & QCOLORGROUP::BASE () CONST

Returns the base color of the color group. See also ColorRole.

CONST QCOLOR & QCOLORGROUP::BRIGHTTEXT () CONST

Returns the bright text foreground color of the color group. See also ColorRole. Examples:

CONST QBRUSH & QCOLORGROUP::BRUSH ( COLORROLE R ) CONST

Returns the brush that has been set for color role r. See also color(), setBrush(), and ColorRole. Examples:
CONST QCOLOR & QCOLORGROUP::BUTTON () CONST
Returns the button color of the color group. See also ColorRole. Examples:
CONST QCOLOR & QCOLORGROUP::BUTTONTEXT () CONST
Returns the button text foreground color of the color group. See also ColorRole. Examples:

CONST QCOLOR & QCOLORGROUP::COLOR ( COLORROLE R ) CONST

Returns the color that has been set for color role r. See also brush() and ColorRole.

CONST QCOLOR & QCOLORGROUP::DARK () CONST

Returns the dark color of the color group. See also ColorRole. Example: themes/wood.cpp.

CONST QCOLOR & QCOLORGROUP::FOREGROUND () CONST

Returns the foreground color of the color group. See also ColorRole. Examples:

CONST QCOLOR & QCOLORGROUP::HIGHLIGHT () CONST

Returns the highlight color of the color group. See also ColorRole.
CONST QCOLOR & QCOLORGROUP::HIGHLIGHTEDTEXT () CONST
Returns the highlighted text color of the color group. See also ColorRole.
CONST QCOLOR & QCOLORGROUP::LIGHT () CONST
Returns the light color of the color group. See also ColorRole. Example: themes/wood.cpp.

CONST QCOLOR & QCOLORGROUP::LINK () CONST

Returns the unvisited link text color of the color group. See also ColorRole.

CONST QCOLOR & QCOLORGROUP::LINKVISITED () CONST

Returns the visited link text color of the color group. See also ColorRole.

CONST QCOLOR & QCOLORGROUP::MID () CONST

Returns the mid color of the color group. See also ColorRole. Examples:

CONST QCOLOR & QCOLORGROUP::MIDLIGHT () CONST

Returns the midlight color of the color group. See also ColorRole.
BOOL QCOLORGROUP::OPERATOR!= ( CONST QCOLORGROUP & G ) CONST
Returns TRUE if this color group is different from g; otherwise returns FALSE. See also
QCOLORGROUP & QCOLORGROUP::OPERATOR= ( CONST QCOLORGROUP & OTHER )
Copies the colors of other to this color group.

BOOL QCOLORGROUP::OPERATOR== ( CONST QCOLORGROUP & G ) CONST

Returns TRUE if this color group is equal to g; otherwise returns FALSE. See also

VOID QCOLORGROUP::SETBRUSH ( COLORROLE R, CONST QBRUSH & B )

Sets the brush used for color role r to b. See also brush(), setColor(), and ColorRole. Example: themes/wood.cpp.

VOID QCOLORGROUP::SETCOLOR ( COLORROLE R, CONST QCOLOR & C )

Sets the brush used for color role r to a solid color c. See also brush() and ColorRole. Examples:

CONST QCOLOR & QCOLORGROUP::SHADOW () CONST

Returns the shadow color of the color group. See also ColorRole.
CONST QCOLOR & QCOLORGROUP::TEXT () CONST
Returns the text foreground color of the color group. See also ColorRole. Example: listviews/listviews.cpp.
RELATED FUNCTION DOCUMENTATION

QDATASTREAM & OPERATOR<< ( QDATASTREAM & S, CONST QCOLORGROUP & G )

Writes color group, g to the stream s. See also Format of the QDataStream operators.

SEE ALSO

//doc.trolltech.com/qcolorgroup.html //www.trolltech.com/faq/tech.html

COPYRIGHT

Copyright 1992-2007 Trolltech ASA, //www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR

Generated automatically from the source code.
BUGS
If you find a bug in Qt, please report it as described in //doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt- bugs@trolltech.com. Please include the name of the manual page (qcolorgroup.3qt) and the Qt version (3.3.8). QCOLORGROUP(3)
 
 
 

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 73.09ms.

generiere.de | und-verkauft.de | plr.li