Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QTextLength

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.gui.QTextLength

All Implemented Interfaces:
  QtJambiInterface, java.lang.Cloneable

    public class QTextLength

extends QtJambiObject
implements java.lang.Cloneable

The QTextLength class encapsulates the different types of length used in a `QTextDocument`. When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used.

Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires.

See also:
  `QTextTable`.

Nested Class Summary
`static class` | `QTextLength.Type`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, 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
`QTextLength()` Constructs a new length object which represents a variable size.
`QTextLength(QTextLength.Type type, double value)` Constructs a new length object of the given `type` and `value`.

Method Summary
`QTextLength` | `clone()` This method is reimplemented for internal reasons
`double` | `rawValue()` Returns the constraint value that is specific for the type of the length.
`void` | `readFrom(QDataStream arg__1)` Reads a QTextLength
`QTextLength.Type` | `type()` Returns the type of length.
`double` | `value(double maximumLength)` Returns the effective length, constrained by the type of the length object and the specified `maximumLength`.
`void` | `writeTo(QDataStream arg__1)` Writes thisQTextLength

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

### QTextLength

    public QTextLength()

  Constructs a new length object which represents a variable size.

### QTextLength

    public QTextLength(QTextLength.Type type,
                       double value)

  Constructs a new length object of the given `type` and `value`.

Method Detail

### writeTo

    public final void writeTo(QDataStream arg__1)

  Writes thisQTextLength

### readFrom

    public final void readFrom(QDataStream arg__1)

  Reads a QTextLength

### rawValue

    public final double rawValue()

  Returns the constraint value that is specific for the type of the length. If the length is `QTextLength::PercentageLength` then the raw value is in percent, in the range of 0 to 100. If the length is `QTextLength::FixedLength` then that fixed amount is returned. For variable lengths, zero is returned.

### type

    public final QTextLength.Type type()

  Returns the type of length.

See also:
  `QTextLength::Type` .

### value

    public final double value(double maximumLength)

  Returns the effective length, constrained by the type of the length object and the specified `maximumLength`.

See also:
  `type()`.

### clone

    public QTextLength clone()

  This method is reimplemented for internal reasons

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD