|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QStyleOption
com.trolltech.qt.gui.QStyleOptionProgressBar
com.trolltech.qt.gui.QStyleOptionProgressBarV2
public class QStyleOptionProgressBarV2
The QStyleOptionProgressBarV2 class is used to describe the parameters necessary for drawing a progress bar in Qt 4. or above. An instance of this class has typeSO_ProgressBar
and version 2.
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 do not need to check it.
If you create your own QStyle
subclass, you should handle both QStyleOptionProgressBar
and QStyleOptionProgressBarV2. One way to achieve this is to use the QStyleOptionProgressBarV2 copy constructor. For example:
QStyleOptionProgressBar progressBarOption = null; if ((progressBarOption = (QStyleOptionProgressBar) option) != null) { QStyleOptionProgressBarV2 progressBarV2 = new QStyleOptionProgressBarV2(progressBarOption); // draw the progress bar using progressBarV2 }In the example above: If the progressBarOption's version is 1, the extra members (orientation, invertedAppearance, and bottomToTop) are set to default values for progressBarV2. If the progressBarOption's version is 2, the constructor will simply copy the extra members to progressBarV2.
For an example demonstrating how style options can be used, see the Styles example.
QStyleOptionProgressBar
, and QStyleOption
.
Nested Class Summary | |
---|---|
static class |
QStyleOptionProgressBarV2.StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass. |
static class |
QStyleOptionProgressBarV2.StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each QStyleOption subclass. |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QStyleOption |
---|
QStyleOption.OptionType |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QStyleOptionProgressBarV2()
Constructs a QStyleOptionProgressBarV2, initializing he members variables to their default values. |
|
QStyleOptionProgressBarV2(QStyleOptionProgressBar other)
Constructs a copy of the other style option which can be either of the QStyleOptionProgressBar and QStyleOptionProgressBarV2 types. |
|
QStyleOptionProgressBarV2(QStyleOptionProgressBarV2 other)
Constructs a copy of the other style option. |
Method Summary | |
---|---|
boolean |
bottomToTop()
This variable holds whether the text reads from bottom to top when the progress bar is vertical. |
QStyleOptionProgressBarV2 |
clone()
This method is reimplemented for internal reasons |
boolean |
invertedAppearance()
This variable holds whether the progress bar's appearance is inverted. |
Qt.Orientation |
orientation()
This variable holds the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal . |
void |
setBottomToTop(boolean bottomToTop)
This variable holds whether the text reads from bottom to top when the progress bar is vertical. |
void |
setInvertedAppearance(boolean invertedAppearance)
This variable holds whether the progress bar's appearance is inverted. |
void |
setOrientation(Qt.Orientation orientation)
This variable holds the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal . |
Methods inherited from class com.trolltech.qt.gui.QStyleOptionProgressBar |
---|
maximum, minimum, progress, setMaximum, setMinimum, setProgress, setText, setTextAlignment, setTextAlignment, setTextVisible, text, textAlignment, textVisible |
Methods inherited from class com.trolltech.qt.gui.QStyleOption |
---|
direction, fontMetrics, initFrom, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setType, setVersion, state, type, version |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QStyleOptionProgressBarV2()
public QStyleOptionProgressBarV2(QStyleOptionProgressBar other)
QStyleOptionProgressBar
and QStyleOptionProgressBarV2 types. If the other style option's version is 1, the extra members (orientation, invertedAppearance, and bottomToTop) are set to default values for the new style option. If other's version is 2, the extra members are simply copied.
public QStyleOptionProgressBarV2(QStyleOptionProgressBarV2 other)
Method Detail |
---|
public final void setBottomToTop(boolean bottomToTop)
QProgressBar::textDirection
.
public final boolean bottomToTop()
QProgressBar::textDirection
.
public final void setInvertedAppearance(boolean invertedAppearance)
QProgressBar::invertedAppearance
.
public final boolean invertedAppearance()
QProgressBar::invertedAppearance
.
public final void setOrientation(Qt.Orientation orientation)
Qt::Horizontal
. QProgressBar::orientation
.
public final Qt.Orientation orientation()
Qt::Horizontal
. QProgressBar::orientation
.
public QStyleOptionProgressBarV2 clone()
clone
in class QStyleOptionProgressBar
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |