Qt 4.8
|
The QStyleHintReturn class provides style hints that return more than basic data types. More...
#include <qstyleoption.h>
Public Types | |
enum | HintReturnType { SH_Default =0xf000, SH_Mask, SH_Variant } |
enum | StyleOptionType { Type = SH_Default } |
This enum is used to hold information about the type of the style option, and is defined for each QStyleHintReturn subclass. More... | |
enum | StyleOptionVersion { Version = 1 } |
This enum is used to hold information about the version of the style option, and is defined for each QStyleHintReturn subclass. More... | |
Public Functions | |
QStyleHintReturn (int version=QStyleOption::Version, int type=SH_Default) | |
Constructs a QStyleHintReturn with version version and type type. More... | |
~QStyleHintReturn () | |
Public Variables | |
int | type |
the type of the style hint container More... | |
int | version |
the version of the style hint return container More... | |
Related Functions | |
(Note that these are not member functions.) | |
T | qstyleoption_cast (const QStyleHintReturn *hint) |
T | qstyleoption_cast (QStyleHintReturn *hint) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
The QStyleHintReturn class provides style hints that return more than basic data types.
QStyleHintReturn and its subclasses are used to pass information from a style back to the querying widget. This is most useful when the return value from QStyle::styleHint() does not provide enough detail; for example, when a mask is to be returned.
Definition at line 907 of file qstyleoption.h.
Enumerator | |
---|---|
SH_Default | |
SH_Mask | |
SH_Variant |
Definition at line 909 of file qstyleoption.h.
This enum is used to hold information about the type of the style option, and is defined for each QStyleHintReturn subclass.
The type is used internally by QStyleHintReturn, 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 QStyleHintReturn subclass and your own styles.
Enumerator | |
---|---|
Type |
Definition at line 913 of file qstyleoption.h.
This enum is used to hold information about the version of the style option, and is defined for each QStyleHintReturn subclass.
The version is used by QStyleHintReturn subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally do not need to check it.
Enumerator | |
---|---|
Version |
Definition at line 914 of file qstyleoption.h.
QStyleHintReturn::QStyleHintReturn | ( | int | version = QStyleOption::Version , |
int | type = SH_Default |
||
) |
Constructs a QStyleHintReturn with version version and type type.
The version has no special meaning for QStyleHintReturn; it can be used by subclasses to distinguish between different version of the same hint type.
Definition at line 6227 of file qstyleoption.cpp.
QStyleHintReturn::~QStyleHintReturn | ( | ) |
Definition at line 6236 of file qstyleoption.cpp.
|
related |
Returns a T or 0 depending on the type and version of hint.
Example:
Definition at line 944 of file qstyleoption.h.
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns a T or 0 depending on the type of hint.
Definition at line 953 of file qstyleoption.h.
QStyleHintReturn::type |
the type of the style hint container
Definition at line 920 of file qstyleoption.h.
Referenced by qstyleoption_cast().
QStyleHintReturn::version |
the version of the style hint return container
This value can be used by subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast<T>(), you normally do not need to check it.
Definition at line 919 of file qstyleoption.h.
Referenced by qstyleoption_cast().