All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.core.QStandardPaths Maven / Gradle / Ivy

There is a newer version: 6.3.0
Show newest version
package io.qt.core;


/**
 * 

Methods for accessing standard paths

*

Java wrapper for Qt class QStandardPaths

*/ public final class QStandardPaths extends io.qt.QtObject { static { QtJambi_LibraryUtilities.initialize(); } /** * This variable stores the meta-object for the class. */ public static final io.qt.core.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QStandardPaths.class); /** *

Java wrapper for Qt enum QStandardPaths::LocateOption

* * @see LocateOptions */ public enum LocateOption implements io.qt.QtFlagEnumerator { LocateFile(0), LocateDirectory(1); private LocateOption(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public LocateOptions asFlags() { return new LocateOptions(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public LocateOptions combined(LocateOption e) { return new LocateOptions(this, e); } /** * Creates a new {@link LocateOptions} from the entries. * @param values entries * @return new flag */ public static LocateOptions flags(LocateOption ... values) { return new LocateOptions(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static LocateOption resolve(int value) { switch (value) { case 0: return LocateFile; case 1: return LocateDirectory; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** * QFlags type for enum {@link LocateOption} */ public static final class LocateOptions extends io.qt.QFlags implements Comparable { private static final long serialVersionUID = 0x15ea1da432905defL; /** * Creates a new LocateOptions where the flags in args are set. * @param args enum entries */ public LocateOptions(LocateOption ... args){ super(args); } /** * Creates a new LocateOptions with given value. * @param value */ public LocateOptions(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new LocateOptions */ @Override public final LocateOptions combined(LocateOption e){ return new LocateOptions(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final LocateOptions setFlag(LocateOption e){ super.setFlag(e); return this; } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ public final LocateOptions setFlag(LocateOption e, boolean on){ super.setFlag(e, on); return this; } /** * Returns an array of flag objects represented by this LocateOptions. * @return array of enum entries */ @Override public final LocateOption[] flags(){ return super.flags(LocateOption.values()); } /** * {@inheritDoc} */ @Override public final LocateOptions clone(){ return new LocateOptions(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(LocateOptions other){ return Integer.compare(value(), other.value()); } } /** *

Java wrapper for Qt enum QStandardPaths::StandardLocation

*/ public enum StandardLocation implements io.qt.QtEnumerator { DesktopLocation(0), DocumentsLocation(1), FontsLocation(2), ApplicationsLocation(3), MusicLocation(4), MoviesLocation(5), PicturesLocation(6), TempLocation(7), HomeLocation(8), AppLocalDataLocation(9), CacheLocation(10), GenericDataLocation(11), RuntimeLocation(12), ConfigLocation(13), DownloadLocation(14), GenericCacheLocation(15), GenericConfigLocation(16), AppDataLocation(17), AppConfigLocation(18); private StandardLocation(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static StandardLocation resolve(int value) { switch (value) { case 0: return DesktopLocation; case 1: return DocumentsLocation; case 2: return FontsLocation; case 3: return ApplicationsLocation; case 4: return MusicLocation; case 5: return MoviesLocation; case 6: return PicturesLocation; case 7: return TempLocation; case 8: return HomeLocation; case 9: return AppLocalDataLocation; case 10: return CacheLocation; case 11: return GenericDataLocation; case 12: return RuntimeLocation; case 13: return ConfigLocation; case 14: return DownloadLocation; case 15: return GenericCacheLocation; case 16: return GenericConfigLocation; case 17: return AppDataLocation; case 18: return AppConfigLocation; default: throw new io.qt.QNoSuchEnumValueException(value); } } private final int value; } /** *

See QStandardPaths::displayName(QStandardPaths::StandardLocation)

*/ public static java.lang.String displayName(io.qt.core.QStandardPaths.StandardLocation type){ return displayName_native_QStandardPaths_StandardLocation(type.value()); } private native static java.lang.String displayName_native_QStandardPaths_StandardLocation(int type); /** *

Overloaded function for {@link #findExecutable(java.lang.String, java.util.Collection)} * with paths = new java.util.ArrayList<String>().

*/ public static java.lang.String findExecutable(java.lang.String executableName) { return findExecutable(executableName, new java.util.ArrayList()); } /** *

See QStandardPaths::findExecutable(QString,QStringList)

*/ public native static java.lang.String findExecutable(java.lang.String executableName, java.util.Collection paths); public native static boolean isTestModeEnabled(); /** *

Overloaded function for {@link #locate(io.qt.core.QStandardPaths.StandardLocation, java.lang.String, io.qt.core.QStandardPaths.LocateOptions)}.

*/ public static java.lang.String locate(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName, io.qt.core.QStandardPaths.LocateOption ... options){ return locate(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(options)); } /** *

Overloaded function for {@link #locate(io.qt.core.QStandardPaths.StandardLocation, java.lang.String, io.qt.core.QStandardPaths.LocateOptions)} * with options = new io.qt.core.QStandardPaths.LocateOptions(0).

*/ public static java.lang.String locate(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName) { return locate(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(0)); } /** *

See QStandardPaths::locate(QStandardPaths::StandardLocation,QString,LocateOptions)

*/ public static java.lang.String locate(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName, io.qt.core.QStandardPaths.LocateOptions options){ return locate_native_QStandardPaths_StandardLocation_cref_QString_QFlags_QStandardPaths_LocateOption_(type.value(), fileName, options.value()); } private native static java.lang.String locate_native_QStandardPaths_StandardLocation_cref_QString_QFlags_QStandardPaths_LocateOption_(int type, java.lang.String fileName, int options); /** *

Overloaded function for {@link #locateAll(io.qt.core.QStandardPaths.StandardLocation, java.lang.String, io.qt.core.QStandardPaths.LocateOptions)}.

*/ public static io.qt.core.QStringList locateAll(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName, io.qt.core.QStandardPaths.LocateOption ... options){ return locateAll(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(options)); } /** *

Overloaded function for {@link #locateAll(io.qt.core.QStandardPaths.StandardLocation, java.lang.String, io.qt.core.QStandardPaths.LocateOptions)} * with options = new io.qt.core.QStandardPaths.LocateOptions(0).

*/ public static io.qt.core.QStringList locateAll(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName) { return locateAll(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(0)); } /** *

See QStandardPaths::locateAll(QStandardPaths::StandardLocation,QString,LocateOptions)

*/ public static io.qt.core.QStringList locateAll(io.qt.core.QStandardPaths.StandardLocation type, java.lang.String fileName, io.qt.core.QStandardPaths.LocateOptions options){ return locateAll_native_QStandardPaths_StandardLocation_cref_QString_QFlags_QStandardPaths_LocateOption_(type.value(), fileName, options.value()); } private native static io.qt.core.QStringList locateAll_native_QStandardPaths_StandardLocation_cref_QString_QFlags_QStandardPaths_LocateOption_(int type, java.lang.String fileName, int options); /** *

See QStandardPaths::setTestModeEnabled(bool)

*/ public native static void setTestModeEnabled(boolean testMode); /** *

See QStandardPaths::standardLocations(QStandardPaths::StandardLocation)

*/ public static io.qt.core.QStringList standardLocations(io.qt.core.QStandardPaths.StandardLocation type){ return standardLocations_native_QStandardPaths_StandardLocation(type.value()); } private native static io.qt.core.QStringList standardLocations_native_QStandardPaths_StandardLocation(int type); /** *

See QStandardPaths::writableLocation(QStandardPaths::StandardLocation)

*/ public static java.lang.String writableLocation(io.qt.core.QStandardPaths.StandardLocation type){ return writableLocation_native_QStandardPaths_StandardLocation(type.value()); } private native static java.lang.String writableLocation_native_QStandardPaths_StandardLocation(int type); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QStandardPaths(QPrivateConstructor p) { super(p); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy