com.trolltech.qt.gui
Class QStyleOptionProgressBar

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QStyleOption
              extended by com.trolltech.qt.gui.QStyleOptionProgressBar
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable
Direct Known Subclasses:
QStyleOptionProgressBarV2

public class QStyleOptionProgressBar
extends QStyleOption
implements java.lang.Cloneable

The QStyleOptionProgressBar class is used to describe the parameters necessary for drawing a progress bar. Since Qt 4.1, Qt uses the QStyleOptionProgressBarV2 subclass for drawing QProgressBar.

An instance of the QStyleOptionProgressBar class has type SO_ProgressBar 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 QStyleOptionProgressBar and QStyleOptionProgressBarV2.

For an example demonstrating how style options can be used, see the Styles example.

See also:
QStyleOptionProgressBarV2, and QStyleOption.


Nested Class Summary
static class QStyleOptionProgressBar.StyleOptionType
          This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
static class QStyleOptionProgressBar.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, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Constructor Summary
QStyleOptionProgressBar()
          Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.
QStyleOptionProgressBar(QStyleOptionProgressBar other)
          Constructs a copy of the other style option.
 
Method Summary
 QStyleOptionProgressBar clone()
          This method is reimplemented for internal reasons
static QStyleOptionProgressBar fromNativePointer(QNativePointer nativePointer)
          This method returns the QStyleOptionProgressBar instance pointed to by nativePointer.
 int maximum()
          This variable holds the maximum value for the progress bar.
 int minimum()
          This variable holds the minimum value for the progress bar.
static QNativePointer nativePointerArray(QStyleOptionProgressBar[] array)
          This function returns a QNativePointer that is pointing to the specified QStyleOptionProgressBar array.
 int progress()
          This variable holds the current progress for the progress bar.
 void setMaximum(int maximum)
          This variable holds the maximum value for the progress bar.
 void setMinimum(int minimum)
          This variable holds the minimum value for the progress bar.
 void setProgress(int progress)
          This variable holds the current progress for the progress bar.
 void setText(java.lang.String text)
          This variable holds the text for the progress bar.
 void setTextAlignment(Qt.Alignment textAlignment)
          This variable holds the text alignment for the text in the QProgressBar.
 void setTextAlignment(Qt.AlignmentFlag[] textAlignment)
           
 void setTextVisible(boolean textVisible)
          This variable holds a flag indicating whether or not text is visible.
 java.lang.String text()
          This variable holds the text for the progress bar.
 Qt.Alignment textAlignment()
          This variable holds the text alignment for the text in the QProgressBar.
 boolean textVisible()
          This variable holds a flag indicating whether or not text is visible.
 
Methods inherited from class com.trolltech.qt.gui.QStyleOption
direction, fontMetrics, initFrom, nativePointerArray, palette, rect, setDirection, setFontMetrics, setPalette, setRect, 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 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

QStyleOptionProgressBar

public QStyleOptionProgressBar()
Constructs a QStyleOptionProgressBar, initializing the members variables to their default values.


QStyleOptionProgressBar

public QStyleOptionProgressBar(QStyleOptionProgressBar other)
Constructs a copy of the other style option.

Method Detail

setMinimum

public final void setMinimum(int minimum)
This variable holds the minimum value for the progress bar. This is the minimum value in the progress bar. The default value is 0.

See also:
QProgressBar::minimum.


minimum

public final int minimum()
This variable holds the minimum value for the progress bar. This is the minimum value in the progress bar. The default value is 0.

See also:
QProgressBar::minimum.


setMaximum

public final void setMaximum(int maximum)
This variable holds the maximum value for the progress bar. This is the maximum value in the progress bar. The default value is 0.

See also:
QProgressBar::maximum.


maximum

public final int maximum()
This variable holds the maximum value for the progress bar. This is the maximum value in the progress bar. The default value is 0.

See also:
QProgressBar::maximum.


setProgress

public final void setProgress(int progress)
This variable holds the current progress for the progress bar. The current progress. A value of QStyleOptionProgressBar::minimum - 1 indicates that the progress hasn't started yet. The default value is 0.

See also:
QProgressBar::value.


progress

public final int progress()
This variable holds the current progress for the progress bar. The current progress. A value of QStyleOptionProgressBar::minimum - 1 indicates that the progress hasn't started yet. The default value is 0.

See also:
QProgressBar::value.


setTextAlignment

public final void setTextAlignment(Qt.AlignmentFlag[] textAlignment)

setTextAlignment

public final void setTextAlignment(Qt.Alignment textAlignment)
This variable holds the text alignment for the text in the QProgressBar. This can be used as a guide on where the text should be in the progress bar. The default value is Qt::AlignLeft .


textAlignment

public final Qt.Alignment textAlignment()
This variable holds the text alignment for the text in the QProgressBar. This can be used as a guide on where the text should be in the progress bar. The default value is Qt::AlignLeft .


setText

public final void setText(java.lang.String text)
This variable holds the text for the progress bar. The progress bar text is usually just the progress expressed as a string. An empty string indicates that the progress bar has not started yet. The default value is an empty string.

See also:
QProgressBar::text.


text

public final java.lang.String text()
This variable holds the text for the progress bar. The progress bar text is usually just the progress expressed as a string. An empty string indicates that the progress bar has not started yet. The default value is an empty string.

See also:
QProgressBar::text.


setTextVisible

public final void setTextVisible(boolean textVisible)
This variable holds a flag indicating whether or not text is visible. If this flag is true then the text is visible. Otherwise, the text is not visible. The default value is false.

See also:
QProgressBar::textVisible.


textVisible

public final boolean textVisible()
This variable holds a flag indicating whether or not text is visible. If this flag is true then the text is visible. Otherwise, the text is not visible. The default value is false.

See also:
QProgressBar::textVisible.


fromNativePointer

public static QStyleOptionProgressBar fromNativePointer(QNativePointer nativePointer)
This method returns the QStyleOptionProgressBar instance pointed to by nativePointer.


nativePointerArray

public static QNativePointer nativePointerArray(QStyleOptionProgressBar[] array)
This function returns a QNativePointer that is pointing to the specified QStyleOptionProgressBar array.


clone

public QStyleOptionProgressBar clone()
This method is reimplemented for internal reasons

Overrides:
clone in class QStyleOption