com.trolltech.qt.gui
Class QStyleOptionTitleBar

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.QStyleOptionTitleBar
All Implemented Interfaces:
QtJambiInterface

public class QStyleOptionTitleBar
extends QStyleOptionComplex

The QStyleOptionTitleBar class is used to describe the parameters for drawing a title bar.

QStyleOptionTitleBar contains all the information that QStyle functions need to draw the title bars of QWorkspace's MDI children.

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, QStyleOptionComplex, QWorkspace

Nested Class Summary
static class QStyleOptionTitleBar.StyleOptionType
          This enum is used to hold information about the type of the style option, and is defined for each QStyleOption subclass.
static class QStyleOptionTitleBar.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
  QStyleOptionTitleBar()
          Constructs a QStyleOptionTitleBar, initializing the members variables to their default values.
protected QStyleOptionTitleBar(int version)
          This method is used internally by Qt Jambi.
  QStyleOptionTitleBar(QStyleOptionTitleBar other)
          Constructs a copy of the other style option.
 
Method Summary
static QStyleOptionTitleBar fromNativePointer(QNativePointer nativePointer)
          This function returns the QStyleOptionTitleBar instance pointed to by nativePointer
 QIcon icon()
          Returns the icon for the title bar.
static QNativePointer nativePointerArray(QStyleOptionTitleBar[] array)
          This function returns a QNativePointer that is pointing to the specified QStyleOptionTitleBar array.
 void setIcon(QIcon icon)
          Sets the icon for the title bar to icon.
 void setText(java.lang.String text)
          Sets the text of the title bar to text.
 void setTitleBarFlags(Qt.WindowFlags titleBarFlags)
          Sets the widget flags for the title bar to titleBarFlags.
 void setTitleBarFlags(Qt.WindowType... titleBarFlags)
          Sets the widget flags for the title bar to titleBarFlags.
 void setTitleBarState(int titleBarState)
          Sets the state of the title bar to titleBarState.
 java.lang.String text()
          Returns the text of the title bar.
 Qt.WindowFlags titleBarFlags()
          Returns the widget flags for the title bar.
 int titleBarState()
          Returns the state of the title bar.
 
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

QStyleOptionTitleBar

public QStyleOptionTitleBar(QStyleOptionTitleBar other)

Constructs a copy of the other style option.


QStyleOptionTitleBar

public QStyleOptionTitleBar()

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


QStyleOptionTitleBar

protected QStyleOptionTitleBar(int version)

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

Method Detail

setTitleBarFlags

public final void setTitleBarFlags(Qt.WindowType... titleBarFlags)

Sets the widget flags for the title bar to titleBarFlags.

The default value is Qt::Widget.

See Also:
titleBarFlags, Qt::WindowFlags

setTitleBarFlags

public final void setTitleBarFlags(Qt.WindowFlags titleBarFlags)

Sets the widget flags for the title bar to titleBarFlags.

The default value is Qt::Widget.

See Also:
titleBarFlags, Qt::WindowFlags

titleBarFlags

public final Qt.WindowFlags titleBarFlags()

Returns the widget flags for the title bar.

The default value is Qt::Widget.

See Also:
setTitleBarFlags, Qt::WindowFlags

setIcon

public final void setIcon(QIcon icon)

Sets the icon for the title bar to icon.

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

See Also:
icon

icon

public final QIcon icon()

Returns the icon for the title bar.

The default value is an empty icon, i.e. an icon with neither a pixmap nor a filename.

See Also:
setIcon

setText

public final void setText(java.lang.String text)

Sets the text of the title bar to text.

The default value is an empty string.

See Also:
text

text

public final java.lang.String text()

Returns the text of the title bar.

The default value is an empty string.

See Also:
setText

setTitleBarState

public final void setTitleBarState(int titleBarState)

Sets the state of the title bar to titleBarState.

This is basically the window state of the underlying widget. The default value is 0.

See Also:
titleBarState, QWidget::windowState

titleBarState

public final int titleBarState()

Returns the state of the title bar.

This is basically the window state of the underlying widget. The default value is 0.

See Also:
setTitleBarState, QWidget::windowState

fromNativePointer

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

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

nativePointerArray

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

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