com.trolltech.qt.gui
Class QStyleOptionButton

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      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.QStyleOptionButton
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QStyleOptionButton
extends QStyleOption
implements java.lang.Cloneable

The QStyleOptionButton class is used to describe the parameters for drawing buttons. QStyleOptionButton contains all the information that QStyle functions need to draw graphical elements like QPushButton, QCheckBox, and QRadioButton.

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:
QStyleOption, and QStyleOptionToolButton.


Nested Class Summary
static class QStyleOptionButton.ButtonFeature
          This enum describes the different types of features a push button can have.
static class QStyleOptionButton.ButtonFeatures
           
static class QStyleOptionButton.StyleOptionType
          This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
static class QStyleOptionButton.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.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
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
QStyleOptionButton()
          Constructs a QStyleOptionButton, initializing the members variables to their default values.
QStyleOptionButton(QStyleOptionButton other)
          Constructs a copy of the other style option.
 
Method Summary
 QStyleOptionButton clone()
          This method is reimplemented for internal reasons
 QStyleOptionButton.ButtonFeatures features()
          This variable holds a bitwise OR of the features that describe this button.
 QIcon icon()
          This variable holds the icon of the button.
 QSize iconSize()
          This variable holds the size of the icon for the button.
 void setFeatures(QStyleOptionButton.ButtonFeature[] features)
           
 void setFeatures(QStyleOptionButton.ButtonFeatures features)
          This variable holds a bitwise OR of the features that describe this button.
 void setIcon(QIcon icon)
          This variable holds the icon of the button.
 void setIconSize(QSize iconSize)
          This variable holds the size of the icon for the button.
 void setText(java.lang.String text)
          This variable holds the text of the button.
 java.lang.String text()
          This variable holds the text of the button.
 
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

QStyleOptionButton

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


QStyleOptionButton

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

Method Detail

setIconSize

public final void setIconSize(QSize iconSize)
This variable holds the size of the icon for the button. The default value is QSize(-1, -1), i.e. an invalid size.


iconSize

public final QSize iconSize()
This variable holds the size of the icon for the button. The default value is QSize(-1, -1), i.e. an invalid size.


setFeatures

public final void setFeatures(QStyleOptionButton.ButtonFeature[] features)

setFeatures

public final void setFeatures(QStyleOptionButton.ButtonFeatures features)
This variable holds a bitwise OR of the features that describe this button.

See also:
ButtonFeature .


features

public final QStyleOptionButton.ButtonFeatures features()
This variable holds a bitwise OR of the features that describe this button.

See also:
ButtonFeature .


setIcon

public final void setIcon(QIcon icon)
This variable holds the icon of the button. The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

See also:
iconSize.


icon

public final QIcon icon()
This variable holds the icon of the button. The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

See also:
iconSize.


setText

public final void setText(java.lang.String text)
This variable holds the text of the button. The default value is an empty string.


text

public final java.lang.String text()
This variable holds the text of the button. The default value is an empty string.


clone

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

Overrides:
clone in class QStyleOption