QStyleOptionFrame Class Reference

#include <qstyleoption.h>

Inheritance diagram for QStyleOptionFrame:

Inheritance graph
[legend]
Collaboration diagram for QStyleOptionFrame:

Collaboration graph
[legend]
List of all members.

Detailed Description

the background color on which the focus rectangle is being drawnThe QStyleOptionFrame class is used to describe the parameters for drawing a frame.

QStyleOptionFrame is used for drawing several built-in Qt widgets, including QFrame, QGroupBox, QLineEdit, and QMenu. Note that to describe the parameters necessary for drawing a frame in Qt 4.1 or above, you must use the QStyleOptionFrameV2 subclass.

An instance of the QStyleOptionFrame class has type SO_Frame and version 1.

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. 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.

If you create your own QStyle subclass, you should handle both QStyleOptionFrame and QStyleOptionFrameV2.

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

See also:
QStyleOptionFrameV2, QStyleOption

Definition at line 93 of file qstyleoption.h.

Public Types

enum  StyleOptionType
enum  StyleOptionVersion

Public Member Functions

 QStyleOptionFrame ()
 QStyleOptionFrame (const QStyleOptionFrame &other)

Public Attributes

int lineWidth
int midLineWidth

Protected Member Functions

 QStyleOptionFrame (int version)


Member Enumeration Documentation

enum QStyleOptionFrame::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_Frame} 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 96 of file qstyleoption.h.

00096 { Type = SO_Frame };

enum QStyleOptionFrame::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 97 of file qstyleoption.h.

00097 { Version = 1 };


Constructor & Destructor Documentation

QStyleOptionFrame::QStyleOptionFrame (  ) 

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

Definition at line 452 of file qstyleoption.cpp.

00453     : QStyleOption(Version, SO_Frame), lineWidth(0), midLineWidth(0)
00454 {
00455 }

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

Constructs a copy of the other style option.

Definition at line 103 of file qstyleoption.h.

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

QStyleOptionFrame::QStyleOptionFrame ( int  version  )  [protected]

Definition at line 460 of file qstyleoption.cpp.

00461     : QStyleOption(version, SO_Frame), lineWidth(0), midLineWidth(0)
00462 {
00463 }


Member Data Documentation

int QStyleOptionFrame::lineWidth

Definition at line 99 of file qstyleoption.h.

Referenced by QCommonStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), Q3DockWindow::drawFrame(), QFrame::drawFrame(), QLineEditPrivate::getStyleOption(), QWellArray::paintCell(), QMenuBar::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QWorkspaceChild::paintEvent(), and QMenu::paintEvent().

int QStyleOptionFrame::midLineWidth

Definition at line 100 of file qstyleoption.h.

Referenced by QCommonStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), Q3DockWindow::drawFrame(), QFrame::drawFrame(), QLineEditPrivate::getStyleOption(), QWellArray::paintCell(), QMenuBar::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QMenu::paintEvent(), and QWorkspaceChild::paintEvent().


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