Qt Jambi Home

com.trolltech.qt.core
Enum Qt.AlignmentFlag

java.lang.Object
  extended by java.lang.Enum<Qt.AlignmentFlag>
      extended by com.trolltech.qt.core.Qt.AlignmentFlag
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<Qt.AlignmentFlag>
Enclosing interface:
Qt

public static enum Qt.AlignmentFlag
extends java.lang.Enum<Qt.AlignmentFlag>
implements QtEnumerator

This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.

The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.

The horizontal flags are:

ConstantValueDescription
AlignLeft1Aligns with the left edge.
AlignRight2Aligns with the right edge.
AlignHCenter4Centers horizontally in the available space.
AlignJustify8Justifies the text in the available space.

The vertical flags are:

ConstantValueDescription
AlignTop32Aligns with the top.
AlignBottom64Aligns with the bottom.
AlignVCenter128Centers vertically in the available space.

You can use only one of the horizontal flags at a time. There is one two-dimensional flag:

ConstantValueDescription
AlignCenter132Centers in both dimensions.

You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.

Three enum values are useful in applications that can be run in right-to-left mode:

ConstantValueDescription
AlignAbsolute16If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute.
AlignLeading1Synonym for Qt::AlignLeft.
AlignTrailing2Synonym for Qt::AlignRight.

Masks:

ConstantValue
AlignHorizontal_Mask31
AlignVertical_Mask224

Conflicting combinations of flags have undefined meanings.


Enum Constant Summary
AlignAbsolute
          If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge.
AlignBottom
          Aligns with the bottom.
AlignCenter
          Centers in both dimensions.
AlignHCenter
          Centers horizontally in the available space.
AlignHorizontal_Mask
          Internal.
AlignJustify
          Justifies the text in the available space.
AlignLeft
          Aligns with the left edge.
AlignRight
          Aligns with the right edge.
AlignTop
          Aligns with the top.
AlignVCenter
          Centers vertically in the available space.
AlignVertical_Mask
          Internal.
 
Method Summary
static Qt.Alignment createQFlags(Qt.AlignmentFlag... values)
           
static Qt.AlignmentFlag resolve(int value)
           
 int value()
          This function should return an integer value for the enum values of the enumeration that implements this interface.
static Qt.AlignmentFlag valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Qt.AlignmentFlag[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AlignLeft

public static final Qt.AlignmentFlag AlignLeft

Aligns with the left edge.


AlignRight

public static final Qt.AlignmentFlag AlignRight

Aligns with the right edge.


AlignHCenter

public static final Qt.AlignmentFlag AlignHCenter

Centers horizontally in the available space.


AlignJustify

public static final Qt.AlignmentFlag AlignJustify

Justifies the text in the available space.


AlignAbsolute

public static final Qt.AlignmentFlag AlignAbsolute

If the widget's layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean "left" and Qt::AlignRight to always mean "right", combine the flag with Qt::AlignAbsolute.


AlignHorizontal_Mask

public static final Qt.AlignmentFlag AlignHorizontal_Mask
Internal.


AlignTop

public static final Qt.AlignmentFlag AlignTop

Aligns with the top.


AlignBottom

public static final Qt.AlignmentFlag AlignBottom

Aligns with the bottom.


AlignVCenter

public static final Qt.AlignmentFlag AlignVCenter

Centers vertically in the available space.


AlignVertical_Mask

public static final Qt.AlignmentFlag AlignVertical_Mask
Internal.


AlignCenter

public static final Qt.AlignmentFlag AlignCenter

Centers in both dimensions.

Method Detail

values

public static Qt.AlignmentFlag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Qt.AlignmentFlag c : Qt.AlignmentFlag.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Qt.AlignmentFlag valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

value

public int value()
Description copied from interface: QtEnumerator
This function should return an integer value for the enum values of the enumeration that implements this interface.

Specified by:
value in interface QtEnumerator

createQFlags

public static Qt.Alignment createQFlags(Qt.AlignmentFlag... values)

resolve

public static Qt.AlignmentFlag resolve(int value)

Qt Jambi Home