|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Qt.AlignmentFlag>
com.trolltech.qt.core.Qt.AlignmentFlag
public static enum Qt.AlignmentFlag
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:
Constant | Value | Description |
---|---|---|
AlignLeft | 1 | Aligns with the left edge. |
AlignRight | 2 | Aligns with the right edge. |
AlignHCenter | 4 | Centers horizontally in the available space. |
AlignJustify | 8 | Justifies the text in the available space. |
The vertical flags are:
Constant | Value | Description |
---|---|---|
AlignTop | 32 | Aligns with the top. |
AlignBottom | 64 | Aligns with the bottom. |
AlignVCenter | 128 | Centers vertically in the available space. |
You can use only one of the horizontal flags at a time. There is one two-dimensional flag:
Constant | Value | Description |
---|---|---|
AlignCenter | 132 | Centers 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:
Constant | Value | Description |
---|---|---|
AlignAbsolute | 16 | 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. |
AlignLeading | 1 | Synonym for Qt::AlignLeft. |
AlignTrailing | 2 | Synonym for Qt::AlignRight. |
Masks:
Constant | Value |
---|---|
AlignHorizontal_Mask | 31 |
AlignVertical_Mask | 224 |
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()
|
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're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Qt.AlignmentFlag AlignLeft
Aligns with the left edge.
public static final Qt.AlignmentFlag AlignRight
Aligns with the right edge.
public static final Qt.AlignmentFlag AlignHCenter
Centers horizontally in the available space.
public static final Qt.AlignmentFlag AlignJustify
Justifies the text in the available space.
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.
public static final Qt.AlignmentFlag AlignHorizontal_Mask
public static final Qt.AlignmentFlag AlignTop
Aligns with the top.
public static final Qt.AlignmentFlag AlignBottom
Aligns with the bottom.
public static final Qt.AlignmentFlag AlignVCenter
Centers vertically in the available space.
public static final Qt.AlignmentFlag AlignVertical_Mask
public static final Qt.AlignmentFlag AlignCenter
Centers in both dimensions.
Method Detail |
---|
public static final Qt.AlignmentFlag[] values()
for(Qt.AlignmentFlag c : Qt.AlignmentFlag.values()) System.out.println(c);
public static Qt.AlignmentFlag valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic int value()
value
in interface QtEnumerator
public static Qt.Alignment createQFlags(Qt.AlignmentFlag... values)
public static Qt.AlignmentFlag resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |