io.qt.core.QStringConverterBase Maven / Gradle / Ivy
The newest version!
package io.qt.core;
/**
* Java wrapper for Qt class QStringConverterBase
*/
public class QStringConverterBase extends io.qt.QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QStringConverterBase::Flag
*
* @see Flags
*/
public enum Flag implements io.qt.QtFlagEnumerator {
Default(0),
Stateless(1),
ConvertInvalidToNull(2),
WriteBom(4),
ConvertInitialBom(8);
private Flag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public Flags asFlags() {
return new Flags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public Flags combined(Flag e) {
return new Flags(this, e);
}
/**
* Creates a new {@link Flags} from the entries.
* @param values entries
* @return new flag
*/
public static Flags flags(Flag ... values) {
return new Flags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static Flag resolve(int value) {
switch (value) {
case 0: return Default;
case 1: return Stateless;
case 2: return ConvertInvalidToNull;
case 4: return WriteBom;
case 8: return ConvertInitialBom;
default: throw new io.qt.QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* QFlags type for enum {@link Flag}
*/
public static final class Flags extends io.qt.QFlags implements Comparable {
private static final long serialVersionUID = 0x92d9bce6c929c1c6L;
/**
* Creates a new Flags where the flags in args
are set.
* @param args enum entries
*/
public Flags(Flag ... args){
super(args);
}
/**
* Creates a new Flags with given value
.
* @param value
*/
public Flags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new Flags
*/
@Override
public final Flags combined(Flag e){
return new Flags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final Flags setFlag(Flag 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 Flags setFlag(Flag e, boolean on){
super.setFlag(e, on);
return this;
}
/**
* Returns an array of flag objects represented by this Flags.
* @return array of enum entries
*/
@Override
public final Flag[] flags(){
return super.flags(Flag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final Flags clone(){
return new Flags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(Flags other){
return Integer.compare(value(), other.value());
}
}
/**
* Java wrapper for Qt class QStringConverterBase::State
*/
public static class State extends io.qt.QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Overloaded constructor for {@link #State(io.qt.core.QStringConverterBase.Flags)}.
*/
public State(io.qt.core.QStringConverterBase.Flag ... f){
this(new io.qt.core.QStringConverterBase.Flags(f));
}
/**
* Overloaded constructor for {@link #State(io.qt.core.QStringConverterBase.Flags)}
* with f = new io.qt.core.QStringConverterBase.Flags(0)
.
*/
public State() {
this(new io.qt.core.QStringConverterBase.Flags(0));
}
public State(io.qt.core.QStringConverterBase.Flags f){
super((QPrivateConstructor)null);
initialize_native(this, f);
}
private native static void initialize_native(State instance, io.qt.core.QStringConverterBase.Flags f);
@io.qt.QtUninvokable
public final void clear(){
clear_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native void clear_native(long __this__nativeId);
/**
* Overloaded function for {@link #setFlags(io.qt.core.QStringConverterBase.Flags)}.
*/
@io.qt.QtUninvokable
public final void setFlags(io.qt.core.QStringConverterBase.Flag ... flags){
setFlags(new io.qt.core.QStringConverterBase.Flags(flags));
}
@io.qt.QtUninvokable
public final void setFlags(io.qt.core.QStringConverterBase.Flags flags){
setFlags_native_cref_QFlags_QStringConverterBase_Flag_(QtJambi_LibraryUtilities.internal.nativeId(this), flags.value());
}
@io.qt.QtUninvokable
private native void setFlags_native_cref_QFlags_QStringConverterBase_Flag_(long __this__nativeId, int flags);
@io.qt.QtUninvokable
public final io.qt.core.QStringConverterBase.Flags flags(){
return new io.qt.core.QStringConverterBase.Flags(flags_native(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@io.qt.QtUninvokable
private native int flags_native(long __this__nativeId);
@io.qt.QtUninvokable
public final void setInternalState(int internalState){
setInternalState_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), internalState);
}
@io.qt.QtUninvokable
private native void setInternalState_native_int(long __this__nativeId, int internalState);
@io.qt.QtUninvokable
public final int internalState(){
return internalState_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native int internalState_native(long __this__nativeId);
@io.qt.QtUninvokable
public final void setInvalidChars(long invalidChars){
setInvalidChars_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), invalidChars);
}
@io.qt.QtUninvokable
private native void setInvalidChars_native_qsizetype(long __this__nativeId, long invalidChars);
@io.qt.QtUninvokable
public final long invalidChars(){
return invalidChars_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native long invalidChars_native(long __this__nativeId);
@io.qt.QtUninvokable
public final void setRemainingChars(long remainingChars){
setRemainingChars_native_qsizetype(QtJambi_LibraryUtilities.internal.nativeId(this), remainingChars);
}
@io.qt.QtUninvokable
private native void setRemainingChars_native_qsizetype(long __this__nativeId, long remainingChars);
@io.qt.QtUninvokable
public final long remainingChars(){
return remainingChars_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@io.qt.QtUninvokable
private native long remainingChars_native(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected State(QPrivateConstructor p) { super(p); }
}
public QStringConverterBase(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QStringConverterBase instance);
/**
* Constructor for internal use only.
* @param p expected to be null
.
*/
@io.qt.NativeAccess
protected QStringConverterBase(QPrivateConstructor p) { super(p); }
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy