|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QTextLength
public class QTextLength
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.
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.AbstractSignal, 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 |
---|
public QTextLength(QTextLength.Type type, double value)
Constructs a new length object of the given type and value.
public QTextLength()
Constructs a new length object which represents a variable size.
Method Detail |
---|
public final void writeTo(QDataStream arg__1)
public final void readFrom(QDataStream arg__1)
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.
public final QTextLength.Type type()
Returns the type of length.
public final double value(double maximumLength)
Returns the effective length, constrained by the type of the length object and the specified maximumLength.
public static QTextLength fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.public static QNativePointer nativePointerArray(QTextLength[] array)
array
- the array that the returned pointer will point to.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |