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

io.qt.gui.QValidator Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.gui;

import io.qt.*;


/**
 * 

Validation of input text

*

Java wrapper for Qt class QValidator

*/ public abstract class QValidator extends io.qt.core.QObject { 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(QValidator.class); @NativeAccess private static final class ConcreteWrapper extends QValidator { @NativeAccess private ConcreteWrapper(QPrivateConstructor p) { super(p); } @Override @QtUninvokable public io.qt.gui.QValidator.@NonNull State validate(io.qt.gui.QValidator.QValidationData arg__1){ return io.qt.gui.QValidator.State.resolve(validate_native_ref_QString_ref_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1)); } @QtUninvokable private native int validate_native_ref_QString_ref_int_constfct(long __this__nativeId, io.qt.gui.QValidator.QValidationData arg__1); } /** *

Java wrapper for Qt enum QValidator::State

*/ public enum State implements QtEnumerator { /** *

Representing QValidator::Invalid

*/ Invalid(0), /** *

Representing QValidator::Intermediate

*/ Intermediate(1), /** *

Representing QValidator::Acceptable

*/ Acceptable(2); static { QtJambi_LibraryUtilities.initialize(); } private State(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 State resolve(int value) { switch (value) { case 0: return Invalid; case 1: return Intermediate; case 2: return Acceptable; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QValidator::changed()

*/ public final @NonNull Signal0 changed = new Signal0(); /** *

See QValidator::QValidator(QObject*)

*/ public QValidator(io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QValidator instance, io.qt.core.QObject parent); /** *

See QValidator::locale()const

*/ @QtUninvokable public final io.qt.core.@NonNull QLocale locale(){ return locale_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QLocale locale_native_constfct(long __this__nativeId); /** *

See QValidator::setLocale(QLocale)

*/ @QtUninvokable public final void setLocale(io.qt.core.@NonNull QLocale locale){ setLocale_native_cref_QLocale(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(locale)); } @QtUninvokable private native void setLocale_native_cref_QLocale(long __this__nativeId, long locale); /** *

See QValidator::fixup(QString&)const

*/ @QtUninvokable public void fixup(io.qt.core.@StrictNonNull QString arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); fixup_native_ref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1); } @QtUninvokable private native void fixup_native_ref_QString_constfct(long __this__nativeId, io.qt.core.QString arg__1); /** *

See QValidator::validate(QString&,int&)const

*/ @QtUninvokable public abstract io.qt.gui.QValidator.@NonNull State validate(io.qt.gui.QValidator.QValidationData arg__1); @QtUninvokable private native int validate_native_ref_QString_ref_int_constfct(long __this__nativeId, io.qt.gui.QValidator.QValidationData arg__1); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QValidator(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QValidator(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QValidator instance, QDeclarativeConstructor constructor); /** Result type for {@link QValidator#validate(QValidationData)}. */ public static class QValidationData { @NativeAccess public QValidationData(String input, int pos) { string = input; position = pos; } public @NativeAccess String string; public @NativeAccess int position; } /** * @see #fixup(io.qt.core.QString) */ @QtUninvokable public final java.lang.@NonNull String fixup(java.lang.@Nullable String string){ io.qt.core.QString _string = new io.qt.core.QString(string); fixup(_string); return _string.toString(); } /** *

Overloaded constructor for {@link #QValidator(io.qt.core.QObject)} * with parent = null.

*/ public QValidator() { this((io.qt.core.QObject)null); } /** *

Overloaded function for {@link #setLocale(io.qt.core.QLocale)}.

*/ @QtUninvokable public final void setLocale(io.qt.core.QLocale.@NonNull Language locale) { setLocale(new io.qt.core.QLocale(locale)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy