Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.core
Enum QDir.SortFlag

    java.lang.Object
      java.lang.Enum<QDir.SortFlag>
          com.trolltech.qt.core.QDir.SortFlag

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<QDir.SortFlag>

Enclosing class:
  QDir

    public static enum QDir.SortFlag

extends java.lang.Enum<QDir.SortFlag>
implements QtEnumerator

This enum describes the sort options available to `QDir`, e.g. for `entryList` and `entryInfoList`. The sort value is specified by OR-ing together values from the following list:

Constant | Value | Description
--- | --- | ---
`Name` | `0` | Sort by name.
`Time` | `1` | Sort by time (modification time).
`Size` | `2` | Sort by file size.
`Type` | `128` | Sort by file type (extension).
`Unsorted` | `3` | Do not sort.
`DirsFirst` | `4` | Put the directories first, then the files.
`DirsLast` | `32` | Put the files first, then the directories.
`Reversed` | `8` | Reverse the sort order.
`IgnoreCase` | `16` | Sort case-insensitively.
`LocaleAware` | `64` | Sort items appropriately using the current locale settings.

You can only specify one of the first four.

If you specify both `DirsFirst` and Reversed, directories are still put first, but in reverse order; the files will be listed after the directories, again in reverse order.

Enum Constant Summary
`DirsFirst` Put the directories first, then the files.
`DirsLast` Put the files first, then the directories.
`IgnoreCase` Sort case-insensitively.
`LocaleAware` Sort items appropriately using the current locale settings.
`Name` Sort by name.
`NoSort` Internal.
`Reversed` Reverse the sort order.
`Size` Sort by file size.
`SortByMask` Internal.
`Time` Sort by time (modification time).
`Type` Sort by file type (extension).

Method Summary
`static QDir.SortFlags` | `createQFlags(QDir.SortFlag... values)`
`static QDir.SortFlag` | `resolve(int value)`
`int` | `value()` This function should return an integer value for the enum values of the enumeration that implements this interface.
`static QDir.SortFlag` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static QDir.SortFlag[]` | `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

### Name

    public static final QDir.SortFlag Name

  Sort by name.

### Time

    public static final QDir.SortFlag Time

  Sort by time (modification time).

### Size

    public static final QDir.SortFlag Size

  Sort by file size.

### SortByMask

    public static final QDir.SortFlag SortByMask

  Internal.

### DirsFirst

    public static final QDir.SortFlag DirsFirst

  Put the directories first, then the files.

### Reversed

    public static final QDir.SortFlag Reversed

  Reverse the sort order.

### IgnoreCase

    public static final QDir.SortFlag IgnoreCase

  Sort case-insensitively.

### DirsLast

    public static final QDir.SortFlag DirsLast

  Put the files first, then the directories.

### LocaleAware

    public static final QDir.SortFlag LocaleAware

  Sort items appropriately using the current locale settings.

### Type

    public static final QDir.SortFlag Type

  Sort by file type (extension).

### NoSort

    public static final QDir.SortFlag NoSort

  Internal.

Method Detail

### values

    public static final QDir.SortFlag[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(QDir.SortFlag c : QDir.SortFlag.values())
              System.out.println(c);

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

### valueOf

    public static QDir.SortFlag 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

### 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 QDir.SortFlags createQFlags(QDir.SortFlag... values)

### resolve

    public static QDir.SortFlag resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD