QStyleOptionFocusRect Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionFocusRect:

Inheritance graph
[legend]
Collaboration diagram for QStyleOptionFocusRect:

Collaboration graph
[legend]
List of all members.

Detailed Description

the palette that should be used when painting the controlthe text layout direction that should be used when drawing text in the controlthe font metrics that should be used when drawing text in the controlthe area that should be used for various calculations and paintingthe style flags that are used when drawing the controlthe option type of the style optionthe version of the style optionThe QStyleOptionFocusRect class is used to describe the parameters for drawing a focus rectangle with QStyle.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

For an example demonstrating how style options can be used, see the {widgets/styles}{Styles} example.

See also:
QStyleOption

Definition at line 78 of file qstyleoption.h.

Public Types

enum  StyleOptionType
enum  StyleOptionVersion

Public Member Functions

 QStyleOptionFocusRect ()
 QStyleOptionFocusRect (const QStyleOptionFocusRect &other)

Public Attributes

QColor backgroundColor

Protected Member Functions

 QStyleOptionFocusRect (int version)


Member Enumeration Documentation

enum QStyleOptionFocusRect::StyleOptionType

This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.

Type The type of style option provided ({SO_FocusRect} for this class).

The type is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own QStyleOption subclass and your own styles.

See also:
StyleOptionVersion

Reimplemented from QStyleOption.

Definition at line 81 of file qstyleoption.h.

00081 { Type = SO_FocusRect };

enum QStyleOptionFocusRect::StyleOptionVersion

This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass.

Version 1

The version is used by QStyleOption subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.

See also:
StyleOptionType

Reimplemented from QStyleOption.

Definition at line 82 of file qstyleoption.h.

00082 { Version = 1 };


Constructor & Destructor Documentation

QStyleOptionFocusRect::QStyleOptionFocusRect (  ) 

Constructs a QStyleOptionFocusRect, initializing the members variables to their default values.

Definition at line 356 of file qstyleoption.cpp.

References QStyleOption::state, and QStyle::State_KeyboardFocusChange.

00357     : QStyleOption(Version, SO_FocusRect)
00358 {
00359     state |= QStyle::State_KeyboardFocusChange; // assume we had one, will be corrected in initFrom()
00360 }

QStyleOptionFocusRect::QStyleOptionFocusRect ( const QStyleOptionFocusRect other  )  [inline]

Constructs a copy of the other style option.

Definition at line 87 of file qstyleoption.h.

00087 : QStyleOption(Version, Type) { *this = other; }

QStyleOptionFocusRect::QStyleOptionFocusRect ( int  version  )  [protected]

Definition at line 365 of file qstyleoption.cpp.

References QStyleOption::state, and QStyle::State_KeyboardFocusChange.

00366     : QStyleOption(version, SO_FocusRect)
00367 {
00368     state |= QStyle::State_KeyboardFocusChange;  // assume we had one, will be corrected in initFrom()
00369 }


Member Data Documentation

QColor QStyleOptionFocusRect::backgroundColor

Definition at line 84 of file qstyleoption.h.

Referenced by QWindowsStyle::drawComplexControl(), Q3IconView::eventFilter(), Q3ListBox::paintCell(), Q3ListViewItem::paintFocus(), Q3IconViewItem::paintFocus(), and Q3Table::paintFocus().


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 19:10:20 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1