com.trolltech.qt.gui
Class QTextOption

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.QTextOption
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QTextOption
extends QtJambiObject
implements java.lang.Cloneable

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, and QTextCursor.


Nested Class Summary
static class QTextOption.Flag
           
static class QTextOption.Flags
           
static class QTextOption.TabType
          This enum holds the different types of tabulator
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.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
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(Qt.AlignmentFlag[] alignment)
          This is an overloaded method provided for convenience.
QTextOption(QTextOption o)
          Construct a copy of the other text option.
 
Method Summary
 Qt.Alignment alignment()
          Returns the text alignment defined by the option.
 QTextOption clone()
          This method is reimplemented for internal reasons
 QTextOption.Flags flags()
          Returns the flags associated with the option.
 void setAlignment(Qt.Alignment alignment)
          Sets the option's text alignment to the specified alignment.
 void setAlignment(Qt.AlignmentFlag[] alignment)
          This is an overloaded method provided for convenience.
 void setFlags(QTextOption.Flag[] flags)
          This is an overloaded method provided for convenience.
 void setFlags(QTextOption.Flags flags)
          Sets the flags associated with the option to the given flags.
 void setTabArray(java.util.List tabStops)
          Sets the tab positions for the text layout to those specified by tabStops.
 void setTabs(java.util.List tabStops)
          Set the Tab properties to tabStops.
 void setTabStop(double tabStop)
          Sets the default 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 direction.
 void setUseDesignMetrics(boolean b)
          If enable 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 mode.
 java.util.List tabArray()
          Returns a list of tab positions defined for the text layout.
 java.util.List tabs()
          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, 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

QTextOption

public QTextOption()
Constructs a text option with default properties for text.


QTextOption

public QTextOption(Qt.AlignmentFlag[] alignment)
This is an overloaded method provided for convenience.


QTextOption

public QTextOption(Qt.Alignment alignment)
Constructs a text option with the given alignment for text.


QTextOption

public QTextOption(QTextOption o)
Construct a copy of the other text option.

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)
This is an overloaded method provided for convenience.


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)
This is an overloaded method provided for convenience.


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 tabStops)
Sets the tab positions for the text layout to those specified by tabStops.

See also:
tabArray(), setTabStop(), and setTabs().


setTabStop

public final void setTabStop(double tabStop)
Sets the default distance in device units between tab stops to the value specified by tabStop.

See also:
tabStop(), setTabArray(), setTabs(), and tabs().


setTabs

public final void setTabs(java.util.List tabStops)
Set the Tab properties to tabStops.

See also:
tabStop(), and tabs().


setTextDirection

public final void setTextDirection(Qt.LayoutDirection aDirection)
Sets the direction of the text layout defined by the option to the given direction.

See also:
textDirection().


setUseDesignMetrics

public final void setUseDesignMetrics(boolean b)
If enable 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 mode.

See also:
wrapMode().


tabArray

public final java.util.List tabArray()
Returns a list of tab positions defined for the text layout.

See also:
setTabArray(), and tabStop().


tabStop

public final double tabStop()
Returns the distance in device units between tab stops. Convenient function for the above method

See also:
setTabStop(), tabArray(), setTabs(), and tabs().


tabs

public final java.util.List tabs()
Returns a list of tab positions defined for the text layout.

See also:
tabStop(), setTabs(), and setTabStop().


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().


clone

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

Overrides:
clone in class java.lang.Object