Qt Jambi Home

com.trolltech.qt.gui
Class QTextLength

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

public class QTextLength
extends QtJambiObject

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
          Press link for info on QTextLength.Type
 
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
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
 boolean equals(java.lang.Object other)
          
static QTextLength fromNativePointer(QNativePointer nativePointer)
          This function returns the QTextLength instance pointed to by nativePointer
static QNativePointer nativePointerArray(QTextLength[] array)
          This function returns a QNativePointer that is pointing to the specified QTextLength array.
 double rawValue()
          Returns the constraint value that is specific for the type of the length.
 void readFrom(QDataStream arg__1)
          Reads a QTextLength from arg__1.
 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 to arg__1.
 
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, 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(QTextLength.Type type,
                   double value)

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


QTextLength

public QTextLength()

Constructs a new length object which represents a variable size.

Method Detail

writeTo

public final void writeTo(QDataStream arg__1)
Writes thisQTextLength to arg__1.


readFrom

public final void readFrom(QDataStream arg__1)
Reads a QTextLength from arg__1.


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

fromNativePointer

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

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

nativePointerArray

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

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

equals

public boolean equals(java.lang.Object other)

Overrides:
equals in class java.lang.Object

Qt Jambi Home