com.trolltech.qt.gui
Class QStyleOptionSlider

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.QStyleOptionComplex
                  extended by com.trolltech.qt.gui.QStyleOptionSlider
All Implemented Interfaces:
QtJambiInterface

public class QStyleOptionSlider
extends QStyleOptionComplex

The QStyleOptionSlider class is used to describe the parameters needed for drawing a slider.

QStyleOptionSlider contains all the information that QStyle functions need to draw QSlider and QScrollBar.

For performance reasons, the access to the member variables is direct (i.e., using the . or -> operator). This low-level feel makes the structures straightforward to use and emphasizes that these are simply parameters used by the style functions.

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

See Also:
QStyleOptionComplex, QSlider, QScrollBar

Nested Class Summary
static class QStyleOptionSlider.StyleOptionType
          This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
static class QStyleOptionSlider.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
  QStyleOptionSlider()
          Constructs a QStyleOptionSlider, initializing the members variables to their default values.
protected QStyleOptionSlider(int version)
          This method is used internally by Qt Jambi.
  QStyleOptionSlider(QStyleOptionSlider other)
          Constructs a copy of the other style option.
 
Method Summary
 boolean dialWrapping()
          Returns whether the dial should wrap or not.
static QStyleOptionSlider fromNativePointer(QNativePointer nativePointer)
          This function returns the QStyleOptionSlider instance pointed to by nativePointer
 int maximum()
          Returns the maximum value for the slider.
 int minimum()
          Returns the minimum value for the slider.
static QNativePointer nativePointerArray(QStyleOptionSlider[] array)
          This function returns a QNativePointer that is pointing to the specified QStyleOptionSlider array.
 double notchTarget()
          Returns the number of pixel between notches.
 Qt.Orientation orientation()
          Returns the slider's orientation (horizontal or vertical).
 int pageStep()
          Returns the size of the page step of the slider.
 void setDialWrapping(boolean dialWrapping)
          Sets whether the dial should wrap or not to dialWrapping.
 void setMaximum(int maximum)
          Sets the maximum value for the slider to maximum.
 void setMinimum(int minimum)
          Sets the minimum value for the slider to minimum.
 void setNotchTarget(double notchTarget)
          Sets the number of pixel between notches to notchTarget.
 void setOrientation(Qt.Orientation orientation)
          Sets the slider's orientation (horizontal or vertical) to orientation.
 void setPageStep(int pageStep)
          Sets the size of the page step of the slider to pageStep.
 void setSingleStep(int singleStep)
          Sets the size of the single step of the slider to singleStep.
 void setSliderPosition(int sliderPosition)
          Sets the position of the slider handle to sliderPosition.
 void setSliderValue(int sliderValue)
          Sets the value of the slider to sliderValue.
 void setTickInterval(int tickInterval)
          Sets the interval that should be drawn between tick marks to tickInterval.
 void setTickPosition(QSlider.TickPosition tickPosition)
          Sets the position of the slider's tick marks, if any to tickPosition.
 void setUpsideDown(boolean upsideDown)
          Sets the slider control orientation to upsideDown.
 int singleStep()
          Returns the size of the single step of the slider.
 int sliderPosition()
          Returns the position of the slider handle.
 int sliderValue()
          Returns the value of the slider.
 int tickInterval()
          Returns the interval that should be drawn between tick marks.
 QSlider.TickPosition tickPosition()
          Returns the position of the slider's tick marks, if any.
 boolean upsideDown()
          Returns the slider control orientation.
 
Methods inherited from class com.trolltech.qt.gui.QStyleOptionComplex
activeSubControls, nativePointerArray, setActiveSubControls, setSubControls, subControls
 
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

QStyleOptionSlider

public QStyleOptionSlider(QStyleOptionSlider other)

Constructs a copy of the other style option.


QStyleOptionSlider

public QStyleOptionSlider()

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


QStyleOptionSlider

protected QStyleOptionSlider(int version)

This method is used internally by Qt Jambi. Do not use it in your applications.

Method Detail

setTickInterval

public final void setTickInterval(int tickInterval)

Sets the interval that should be drawn between tick marks to tickInterval.

The default value is 0.

See Also:
tickInterval

tickInterval

public final int tickInterval()

Returns the interval that should be drawn between tick marks.

The default value is 0.

See Also:
setTickInterval

setMinimum

public final void setMinimum(int minimum)

Sets the minimum value for the slider to minimum.

The default value is 0.

See Also:
minimum

minimum

public final int minimum()

Returns the minimum value for the slider.

The default value is 0.

See Also:
setMinimum

setNotchTarget

public final void setNotchTarget(double notchTarget)

Sets the number of pixel between notches to notchTarget.

The default value is 0.0.

See Also:
QDial::notchTarget

notchTarget

public final double notchTarget()

Returns the number of pixel between notches.

The default value is 0.0.

See Also:
setNotchTarget, QDial::notchTarget

setMaximum

public final void setMaximum(int maximum)

Sets the maximum value for the slider to maximum.

The default value is 0.

See Also:
maximum

maximum

public final int maximum()

Returns the maximum value for the slider.

The default value is 0.

See Also:
setMaximum

setSliderPosition

public final void setSliderPosition(int sliderPosition)

Sets the position of the slider handle to sliderPosition.

If the slider has active feedback (i.e., QAbstractSlider::tracking is true), this value will be the same as sliderValue. Otherwise, it will have the current position of the handle. The default value is 0.

See Also:
sliderPosition, QAbstractSlider::tracking, sliderValue

sliderPosition

public final int sliderPosition()

Returns the position of the slider handle.

If the slider has active feedback (i.e., QAbstractSlider::tracking is true), this value will be the same as sliderValue. Otherwise, it will have the current position of the handle. The default value is 0.

See Also:
setSliderPosition, QAbstractSlider::tracking, sliderValue

setDialWrapping

public final void setDialWrapping(boolean dialWrapping)

Sets whether the dial should wrap or not to dialWrapping.

The default value is false, i.e. the dial is not wrapped.

See Also:
dialWrapping, QDial::wrapping

dialWrapping

public final boolean dialWrapping()

Returns whether the dial should wrap or not.

The default value is false, i.e. the dial is not wrapped.

See Also:
setDialWrapping, QDial::wrapping

setSliderValue

public final void setSliderValue(int sliderValue)

Sets the value of the slider to sliderValue.

If the slider has active feedback (i.e., QAbstractSlider::tracking is true), this value will be the same as sliderPosition. Otherwise, it will have the value the slider had before the mouse was pressed.

The default value is 0.

See Also:
sliderValue, QAbstractSlider::tracking, sliderPosition

sliderValue

public final int sliderValue()

Returns the value of the slider.

If the slider has active feedback (i.e., QAbstractSlider::tracking is true), this value will be the same as sliderPosition. Otherwise, it will have the value the slider had before the mouse was pressed.

The default value is 0.

See Also:
setSliderValue, QAbstractSlider::tracking, sliderPosition

setSingleStep

public final void setSingleStep(int singleStep)

Sets the size of the single step of the slider to singleStep.

The default value is 0.

See Also:
QAbstractSlider::singleStep

singleStep

public final int singleStep()

Returns the size of the single step of the slider.

The default value is 0.

See Also:
setSingleStep, QAbstractSlider::singleStep

setTickPosition

public final void setTickPosition(QSlider.TickPosition tickPosition)

Sets the position of the slider's tick marks, if any to tickPosition.

The default value is QSlider::NoTicks.

See Also:
tickPosition, QSlider::TickPosition

tickPosition

public final QSlider.TickPosition tickPosition()

Returns the position of the slider's tick marks, if any.

The default value is QSlider::NoTicks.

See Also:
setTickPosition, QSlider::TickPosition

setPageStep

public final void setPageStep(int pageStep)

Sets the size of the page step of the slider to pageStep.

The default value is 0.

See Also:
QAbstractSlider::pageStep

pageStep

public final int pageStep()

Returns the size of the page step of the slider.

The default value is 0.

See Also:
setPageStep, QAbstractSlider::pageStep

setOrientation

public final void setOrientation(Qt.Orientation orientation)

Sets the slider's orientation (horizontal or vertical) to orientation.

The default orientation is Qt::Horizontal.

See Also:
orientation, Qt::Orientation

orientation

public final Qt.Orientation orientation()

Returns the slider's orientation (horizontal or vertical).

The default orientation is Qt::Horizontal.

See Also:
setOrientation, Qt::Orientation

setUpsideDown

public final void setUpsideDown(boolean upsideDown)

Sets the slider control orientation to upsideDown.

Normally a slider increases as it moves up or to the right; upsideDown indicates that it should do the opposite (increase as it moves down or to the left). The default value is false, i.e. the slider increases as it moves up or to the right.

See Also:
upsideDown, QStyle::sliderPositionFromValue, QStyle::sliderValueFromPosition, QAbstractSlider::invertedAppearance

upsideDown

public final boolean upsideDown()

Returns the slider control orientation.

Normally a slider increases as it moves up or to the right; upsideDown indicates that it should do the opposite (increase as it moves down or to the left). The default value is false, i.e. the slider increases as it moves up or to the right.

See Also:
setUpsideDown, QStyle::sliderPositionFromValue, QStyle::sliderValueFromPosition, QAbstractSlider::invertedAppearance

fromNativePointer

public static QStyleOptionSlider fromNativePointer(QNativePointer nativePointer)
This function returns the QStyleOptionSlider instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

nativePointerArray

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

Parameters:
array - the array that the returned pointer will point to.
Returns:
a QNativePointer that is pointing to the specified array.