
io.qt.internal.PropertyFlags Maven / Gradle / Ivy
package io.qt.internal;
import io.qt.*;
/**
* Java wrapper for Qt enum PropertyFlags
* @hidden
*/
public enum PropertyFlags implements QtFlagEnumerator {
/**
* Representing Invalid
*/
Invalid(0),
/**
* Representing Readable
*/
Readable(1),
/**
* Representing Writable
*/
Writable(2),
/**
* Representing Resettable
*/
Resettable(4),
/**
* Representing EnumOrFlag
*/
EnumOrFlag(8),
/**
* Representing Alias
*/
Alias(16),
/**
* Representing StdCppSet
*/
StdCppSet(256),
/**
* Representing Constant
*/
Constant(1024),
/**
* Representing Final
*/
Final(2048),
/**
* Representing Designable
*/
Designable(4096),
/**
* Representing Scriptable
*/
Scriptable(16384),
/**
* Representing Stored
*/
Stored(65536),
/**
* Representing User
*/
User(1048576),
/**
* Representing Required
*/
Required(16777216),
/**
* Representing Bindable
*/
Bindable(33554432);
static {
QtJambi_LibraryUtilities.initialize();
}
private PropertyFlags(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull PropertyAttributes asFlags() {
return new PropertyAttributes(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull PropertyAttributes combined(@NonNull PropertyFlags 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 PropertyAttributes cleared(@NonNull PropertyFlags e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link PropertyAttributes} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull PropertyAttributes flags(@Nullable PropertyFlags @NonNull... values) {
return new PropertyAttributes(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull PropertyFlags resolve(int value) {
switch (value) {
case 0: return Invalid;
case 1: return Readable;
case 2: return Writable;
case 4: return Resettable;
case 8: return EnumOrFlag;
case 16: return Alias;
case 256: return StdCppSet;
case 1024: return Constant;
case 2048: return Final;
case 4096: return Designable;
case 16384: return Scriptable;
case 65536: return Stored;
case 1048576: return User;
case 16777216: return Required;
case 33554432: return Bindable;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy