|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QAbstractItemView.SelectionMode>
com.trolltech.qt.gui.QAbstractItemView.SelectionMode
public static enum QAbstractItemView.SelectionMode
This enum indicates how the view responds to user selections.
Constant | Value | Description |
---|---|---|
SingleSelection | 1 | When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item. |
ContiguousSelection | 4 | When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. |
ExtendedSelection | 3 | When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them. |
MultiSelection | 2 | When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. Multiple items can be toggled by dragging the mouse over them. |
NoSelection | 0 | Items cannot be selected. |
The most commonly used modes are SingleSelection and ExtendedSelection.
Enum Constant Summary | |
---|---|
ContiguousSelection
When the user selects an item in the usual way, the selection is cleared and the new item selected. |
|
ExtendedSelection
When the user selects an item in the usual way, the selection is cleared and the new item selected. |
|
MultiSelection
When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. |
|
NoSelection
Items cannot be selected. |
|
SingleSelection
When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item. |
Method Summary | |
---|---|
static QAbstractItemView.SelectionMode |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QAbstractItemView.SelectionMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static QAbstractItemView.SelectionMode[] |
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 |
---|
public static final QAbstractItemView.SelectionMode NoSelection
Items cannot be selected.
public static final QAbstractItemView.SelectionMode SingleSelection
When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item.
public static final QAbstractItemView.SelectionMode MultiSelection
When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. Multiple items can be toggled by dragging the mouse over them.
public static final QAbstractItemView.SelectionMode ExtendedSelection
When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item. Multiple items can be selected by dragging the mouse over them.
public static final QAbstractItemView.SelectionMode ContiguousSelection
When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.
Method Detail |
---|
public static QAbstractItemView.SelectionMode[] values()
for (QAbstractItemView.SelectionMode c : QAbstractItemView.SelectionMode.values()) System.out.println(c);
public static QAbstractItemView.SelectionMode 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 name
java.lang.NullPointerException
- if the argument is nullpublic int value()
QtEnumerator
value
in interface QtEnumerator
public static QAbstractItemView.SelectionMode resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |