com.trolltech.qt.core
Enum QDir.SortFlag

java.lang.Object
  extended by java.lang.Enum<QDir.SortFlag>
      extended by 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:

ConstantValueDescription
Name0Sort by name.
Time1Sort by time (modification time).
Size2Sort by file size.
Type128Sort by file type (extension).
Unsorted3Do not sort.
DirsFirst4Put the directories first, then the files.
DirsLast32Put the files first, then the directories.
Reversed8Reverse the sort order.
IgnoreCase16Sort case-insensitively.
LocaleAware64Sort 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()
           
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()
Specified by:
value in interface QtEnumerator

createQFlags

public static QDir.SortFlags createQFlags(QDir.SortFlag... values)

resolve

public static QDir.SortFlag resolve(int value)