|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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.1 or above.
An instance of this class has type SO_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 don't 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:
if (const QStyleOptionProgressBar *progressBarOption =
qstyleoption_cast<const QStyleOptionProgressBar *>(option)) {
QStyleOptionProgressBarV2 progressBarV2(*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.
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.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Constructor Summary | |
---|---|
|
QStyleOptionProgressBarV2()
Constructs a QStyleOptionProgressBarV2, initializing he members variables to their default values. |
protected |
QStyleOptionProgressBarV2(int version)
This method is used internally by Qt Jambi. |
|
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()
Returns whether the text reads from bottom to top when the progress bar is vertical. |
static QStyleOptionProgressBarV2 |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionProgressBarV2 instance pointed to by nativePointer |
boolean |
invertedAppearance()
Returns whether the progress bar's appearance is inverted. |
static QNativePointer |
nativePointerArray(QStyleOptionProgressBarV2[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionProgressBarV2 array. |
Qt.Orientation |
orientation()
Returns the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal. |
void |
setBottomToTop(boolean bottomToTop)
Sets whether the text reads from bottom to top when the progress bar is vertical to bottomToTop. |
void |
setInvertedAppearance(boolean invertedAppearance)
Sets whether the progress bar's appearance is inverted to invertedAppearance. |
void |
setOrientation(Qt.Orientation orientation)
Sets the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal to orientation. |
Methods inherited from class com.trolltech.qt.gui.QStyleOptionProgressBar |
---|
maximum, minimum, nativePointerArray, progress, setMaximum, setMinimum, setProgress, setText, setTextAlignment, setTextAlignment, setTextVisible, text, textAlignment, textVisible |
Methods inherited from class com.trolltech.qt.gui.QStyleOption |
---|
direction, fontMetrics, initFrom, nativePointerArray, palette, rect, setDirection, setFontMetrics, setPalette, setRect, setState, setState, setType, setVersion, state, type, version |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, 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(QStyleOptionProgressBarV2 other)
Constructs a copy of the other style option.
public QStyleOptionProgressBarV2(QStyleOptionProgressBar other)
Constructs a copy of the other style option which can be either of the 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.
protected QStyleOptionProgressBarV2(int version)
This method is used internally by Qt Jambi. Do not use it in your applications.
public QStyleOptionProgressBarV2()
Constructs a QStyleOptionProgressBarV2, initializing he members variables to their default values.
Method Detail |
---|
public final void setBottomToTop(boolean bottomToTop)
Sets whether the text reads from bottom to top when the progress bar is vertical to bottomToTop.
The default value is false.
public final boolean bottomToTop()
Returns whether the text reads from bottom to top when the progress bar is vertical.
The default value is false.
public final void setInvertedAppearance(boolean invertedAppearance)
Sets whether the progress bar's appearance is inverted to invertedAppearance.
The default value is false.
public final boolean invertedAppearance()
Returns whether the progress bar's appearance is inverted.
The default value is false.
public final void setOrientation(Qt.Orientation orientation)
Sets the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal to orientation.
public final Qt.Orientation orientation()
Returns the progress bar's orientation (horizontal or vertical); the default orentation is Qt::Horizontal.
public static QStyleOptionProgressBarV2 fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QStyleOptionProgressBarV2[] array)
array
- the array that the returned pointer will point to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |