com.trolltech.qt.gui
Class QTextOption

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QTextOption
All Implemented Interfaces:
QtJambiInterface

public class QTextOption
extends QtJambiObject

The QTextOption class provides a description of general rich text properties.

QTextOption is used to encapsulate common rich text properties in a single object. It contains information about text alignment, layout direction, word wrapping, and other standard properties associated with text rendering and layout.

See Also:
QTextEdit, QTextDocument, QTextCursor

Nested Class Summary
static class QTextOption.Flag
          Press link for info on QTextOption.Flag
static class QTextOption.Flags
          This QFlag class provides flags for the int enum.
static class QTextOption.WrapMode
          This enum describes how text is wrapped in a document.
 
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
QTextOption()
          Constructs a text option with default properties for text.
QTextOption(Qt.Alignment alignment)
          Constructs a text option with the given alignment for text.
QTextOption(QTextOption o)
          Construct a copy of the o text option.
 
Method Summary
 Qt.Alignment alignment()
          Returns the text alignment defined by the option.
 QTextOption.Flags flags()
          Returns the flags associated with the option.
static QTextOption fromNativePointer(QNativePointer nativePointer)
          This function returns the QTextOption instance pointed to by nativePointer
static QNativePointer nativePointerArray(QTextOption[] array)
          This function returns a QNativePointer that is pointing to the specified QTextOption array.
 void setAlignment(Qt.Alignment alignment)
          Sets the option's text alignment to the specified alignment.
 void setAlignment(Qt.AlignmentFlag... alignment)
          Sets the option's text alignment to the specified alignment.
 void setFlags(QTextOption.Flag... flags)
          Sets the flags associated with the option to the given flags.
 void setFlags(QTextOption.Flags flags)
          Sets the flags associated with the option to the given flags.
 void setTabArray(java.util.List<java.lang.Double> tabStops)
          Sets the tab positions for the text layout to those specified by tabStops.
 void setTabStop(double tabStop)
          Sets the distance in device units between tab stops to the value specified by tabStop.
 void setTextDirection(Qt.LayoutDirection aDirection)
          Sets the direction of the text layout defined by the option to the given aDirection.
 void setUseDesignMetrics(boolean b)
          If b is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).
 void setWrapMode(QTextOption.WrapMode wrap)
          Sets the option's text wrap mode to the given wrap.
 java.util.List<java.lang.Double> tabArray()
          Returns a list of tab positions defined for the text layout.
 double tabStop()
          Returns the distance in device units between tab stops.
 Qt.LayoutDirection textDirection()
          Returns the direction of the text layout defined by the option.
 boolean useDesignMetrics()
          Returns true if the layout uses design rather than device metrics; otherwise returns false.
 QTextOption.WrapMode wrapMode()
          Returns the text wrap mode defined by the option.
 
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

QTextOption

public QTextOption(QTextOption o)

Construct a copy of the o text option.


QTextOption

public QTextOption()

Constructs a text option with default properties for text.


QTextOption

public QTextOption(Qt.Alignment alignment)

Constructs a text option with the given alignment for text.

Method Detail

alignment

public final Qt.Alignment alignment()

Returns the text alignment defined by the option.

See Also:
setAlignment

flags

public final QTextOption.Flags flags()

Returns the flags associated with the option.

See Also:
setFlags

setAlignment

public final void setAlignment(Qt.AlignmentFlag... alignment)

Sets the option's text alignment to the specified alignment.

See Also:
alignment

setAlignment

public final void setAlignment(Qt.Alignment alignment)

Sets the option's text alignment to the specified alignment.

See Also:
alignment

setFlags

public final void setFlags(QTextOption.Flag... flags)

Sets the flags associated with the option to the given flags.

See Also:
flags

setFlags

public final void setFlags(QTextOption.Flags flags)

Sets the flags associated with the option to the given flags.

See Also:
flags

setTabArray

public final void setTabArray(java.util.List<java.lang.Double> tabStops)

Sets the tab positions for the text layout to those specified by tabStops.

See Also:
tabArray, setTabStop

setTabStop

public final void setTabStop(double tabStop)

Sets the distance in device units between tab stops to the value specified by tabStop.

See Also:
tabStop, setTabArray

setTextDirection

public final void setTextDirection(Qt.LayoutDirection aDirection)

Sets the direction of the text layout defined by the option to the given aDirection.

See Also:
textDirection

setUseDesignMetrics

public final void setUseDesignMetrics(boolean b)

If b is true then the layout will use design metrics; otherwise it will use the metrics of the paint device (which is the default behavior).

See Also:
useDesignMetrics

setWrapMode

public final void setWrapMode(QTextOption.WrapMode wrap)

Sets the option's text wrap mode to the given wrap.

See Also:
wrapMode

tabArray

public final java.util.List<java.lang.Double> tabArray()

Returns a list of tab positions defined for the text layout.

See Also:
setTabArray, tabStop

tabStop

public final double tabStop()

Returns the distance in device units between tab stops.

See Also:
setTabStop, tabArray

textDirection

public final Qt.LayoutDirection textDirection()

Returns the direction of the text layout defined by the option.

See Also:
setTextDirection

useDesignMetrics

public final boolean useDesignMetrics()

Returns true if the layout uses design rather than device metrics; otherwise returns false.

See Also:
setUseDesignMetrics

wrapMode

public final QTextOption.WrapMode wrapMode()

Returns the text wrap mode defined by the option.

See Also:
setWrapMode

fromNativePointer

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

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

nativePointerArray

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

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