io.qt.core.QContactsPermission Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Access the user's contacts
* Java wrapper for Qt class QContactsPermission
* This class was introduced in Qt 6.5.
*/
public class QContactsPermission extends QPermission
implements java.lang.Cloneable
{
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(QContactsPermission.class);
/**
* Java wrapper for Qt enum QContactsPermission::AccessMode
*/
public enum AccessMode implements QtByteEnumerator {
/**
* Representing QContactsPermission:: ReadOnly
*/
ReadOnly((byte)0),
/**
* Representing QContactsPermission:: ReadWrite
*/
ReadWrite((byte)1);
static {
QtJambi_LibraryUtilities.initialize();
}
private AccessMode(byte value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public byte value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull AccessMode resolve(byte value) {
switch (value) {
case 0: return ReadOnly;
case 1: return ReadWrite;
default: throw new QNoSuchEnumValueException(value);
}
}
private final byte value;
}
/**
* See QContactsPermission:: QContactsPermission()
*/
public QContactsPermission(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QContactsPermission instance);
/**
* See QContactsPermission:: QContactsPermission(QContactsPermission)
*/
public QContactsPermission(io.qt.core.@NonNull QContactsPermission other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QContactsPermission instance, io.qt.core.QContactsPermission other);
/**
* See QContactsPermission:: accessMode()const
*/
@QtUninvokable
public final io.qt.core.QContactsPermission.@NonNull AccessMode accessMode(){
return io.qt.core.QContactsPermission.AccessMode.resolve(accessMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native byte accessMode_native_constfct(long __this__nativeId);
/**
* See QContactsPermission:: operator=(QContactsPermission)
*/
@QtUninvokable
public final void assign(io.qt.core.@NonNull QContactsPermission other){
assign_native_cref_QContactsPermission(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void assign_native_cref_QContactsPermission(long __this__nativeId, long other);
/**
* See operator==(QContactsPermission, QContactsPermission)
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QContactsPermission v2){
return equals_native_cref_QContactsPermission(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2));
}
@QtUninvokable
private native boolean equals_native_cref_QContactsPermission(long __this__nativeId, long v2);
/**
* See QContactsPermission:: setAccessMode(QContactsPermission::AccessMode)
*/
@QtUninvokable
public final void setAccessMode(io.qt.core.QContactsPermission.@NonNull AccessMode mode){
setAccessMode_native_QContactsPermission_AccessMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@QtUninvokable
private native void setAccessMode_native_QContactsPermission_AccessMode(long __this__nativeId, byte mode);
/**
* See QContactsPermission:: swap(QContactsPermission&)
*/
@QtUninvokable
public final void swap(io.qt.core.@StrictNonNull QContactsPermission other){
java.util.Objects.requireNonNull(other, "Argument 'other': null not expected.");
swap_native_ref_QContactsPermission(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void swap_native_ref_QContactsPermission(long __this__nativeId, long other);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QContactsPermission(QPrivateConstructor p) { super(p); }
/**
* See operator==(QContactsPermission, QContactsPermission)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.core.QContactsPermission) {
return equals((io.qt.core.QContactsPermission) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QContactsPermission)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QContactsPermission:: QContactsPermission(QContactsPermission)
*/
@QtUninvokable
@Override
public QContactsPermission clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QContactsPermission clone_native(long __this_nativeId);
}