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.8.0
Show newest version
package io.qt.core;

import io.qt.*;


/**
 * 

Methods for accessing standard paths

*

Java wrapper for Qt class QStandardPaths

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

Java wrapper for Qt enum QStandardPaths::LocateOption

* * @see LocateOptions */ public enum LocateOption implements QtFlagEnumerator { /** *

Representing QStandardPaths::LocateFile

*/ LocateFile(0), /** *

Representing QStandardPaths::LocateDirectory

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

Java wrapper for Qt enum QStandardPaths::StandardLocation

*/ public enum StandardLocation implements QtEnumerator { /** *

Representing QStandardPaths::DesktopLocation

*/ DesktopLocation(0), /** *

Representing QStandardPaths::DocumentsLocation

*/ DocumentsLocation(1), /** *

Representing QStandardPaths::FontsLocation

*/ FontsLocation(2), /** *

Representing QStandardPaths::ApplicationsLocation

*/ ApplicationsLocation(3), /** *

Representing QStandardPaths::MusicLocation

*/ MusicLocation(4), /** *

Representing QStandardPaths::MoviesLocation

*/ MoviesLocation(5), /** *

Representing QStandardPaths::PicturesLocation

*/ PicturesLocation(6), /** *

Representing QStandardPaths::TempLocation

*/ TempLocation(7), /** *

Representing QStandardPaths::HomeLocation

*/ HomeLocation(8), /** *

Representing QStandardPaths::AppLocalDataLocation

*/ AppLocalDataLocation(9), /** *

Representing QStandardPaths::CacheLocation

*/ CacheLocation(10), /** *

Representing QStandardPaths::GenericDataLocation

*/ GenericDataLocation(11), /** *

Representing QStandardPaths::RuntimeLocation

*/ RuntimeLocation(12), /** *

Representing QStandardPaths::ConfigLocation

*/ ConfigLocation(13), /** *

Representing QStandardPaths::DownloadLocation

*/ DownloadLocation(14), /** *

Representing QStandardPaths::GenericCacheLocation

*/ GenericCacheLocation(15), /** *

Representing QStandardPaths::GenericConfigLocation

*/ GenericConfigLocation(16), /** *

Representing QStandardPaths::AppDataLocation

*/ AppDataLocation(17), /** *

Representing QStandardPaths::AppConfigLocation

*/ AppConfigLocation(18), /** *

Representing QStandardPaths::PublicShareLocation

*/ PublicShareLocation(19), /** *

Representing QStandardPaths::TemplatesLocation

*/ TemplatesLocation(20), /** *

Representing QStandardPaths::StateLocation

*/ StateLocation(21), /** *

Representing QStandardPaths::GenericStateLocation

*/ GenericStateLocation(22); static { QtJambi_LibraryUtilities.initialize(); } 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 @NonNull 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; case 19: return PublicShareLocation; case 20: return TemplatesLocation; case 21: return StateLocation; case 22: return GenericStateLocation; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QStandardPaths::displayName(QStandardPaths::StandardLocation)

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

See QStandardPaths::findExecutable(QString,QStringList)

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

See QStandardPaths::isTestModeEnabled()

*/ public native static boolean isTestModeEnabled(); /** *

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

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

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

*/ public static io.qt.core.@NonNull QStringList locateAll(io.qt.core.QStandardPaths.@NonNull StandardLocation type, java.lang.@NonNull String fileName, io.qt.core.QStandardPaths.@NonNull LocateOptions options){ return locateAll_native_QStandardPaths_StandardLocation_cref_QString_QStandardPaths_LocateOptions(type.value(), fileName, options.value()); } private native static io.qt.core.QStringList locateAll_native_QStandardPaths_StandardLocation_cref_QString_QStandardPaths_LocateOptions(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.@NonNull QStringList standardLocations(io.qt.core.QStandardPaths.@NonNull 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.@NonNull String writableLocation(io.qt.core.QStandardPaths.@NonNull 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. * @hidden */ @NativeAccess protected QStandardPaths(QPrivateConstructor p) { super(p); } /** *

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

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

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.@NonNull String locate(io.qt.core.QStandardPaths.@NonNull StandardLocation type, java.lang.@NonNull String fileName) { return locate(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(0)); } /** *

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

*/ public static java.lang.@NonNull String locate(io.qt.core.QStandardPaths.@NonNull StandardLocation type, java.lang.@NonNull String fileName, io.qt.core.QStandardPaths.@NonNull LocateOption @NonNull... options) { return locate(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.@NonNull QStringList locateAll(io.qt.core.QStandardPaths.@NonNull StandardLocation type, java.lang.@NonNull String fileName) { return locateAll(type, fileName, new io.qt.core.QStandardPaths.LocateOptions(0)); } /** *

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy