io.qt.gui.QAbstractFileIconProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi Show documentation
Show all versions of qtjambi Show documentation
QtJambi base module containing QtCore, QtGui and QtWidgets.
package io.qt.gui;
import io.qt.*;
/**
* File icons for the QFileSystemModel class
* Java wrapper for Qt class QAbstractFileIconProvider
* This class was introduced in Qt 6.0.
*/
public class QAbstractFileIconProvider extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QAbstractFileIconProvider::IconType
*/
public enum IconType implements QtEnumerator {
/**
* Representing QAbstractFileIconProvider:: Computer
*/
Computer(0),
/**
* Representing QAbstractFileIconProvider:: Desktop
*/
Desktop(1),
/**
* Representing QAbstractFileIconProvider:: Trashcan
*/
Trashcan(2),
/**
* Representing QAbstractFileIconProvider:: Network
*/
Network(3),
/**
* Representing QAbstractFileIconProvider:: Drive
*/
Drive(4),
/**
* Representing QAbstractFileIconProvider:: Folder
*/
Folder(5),
/**
* Representing QAbstractFileIconProvider:: File
*/
File(6);
static {
QtJambi_LibraryUtilities.initialize();
}
private IconType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull IconType resolve(int value) {
switch (value) {
case 0: return Computer;
case 1: return Desktop;
case 2: return Trashcan;
case 3: return Network;
case 4: return Drive;
case 5: return Folder;
case 6: return File;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QAbstractFileIconProvider::Option
*
* @see Options
*/
public enum Option implements QtFlagEnumerator {
/**
* Representing QAbstractFileIconProvider:: DontUseCustomDirectoryIcons
*/
DontUseCustomDirectoryIcons(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private Option(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
@Override
public @NonNull Options asFlags() {
return new Options(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Options combined(@NonNull Option e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Options cleared(@NonNull Option e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link Options} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull Options flags(@Nullable Option @NonNull... values) {
return new Options(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Option resolve(int value) {
switch (value) {
case 1: return DontUseCustomDirectoryIcons;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link Option}
*/
public static final class Options extends QFlags