io.qt.sensors.QAmbientLightReading Maven / Gradle / Ivy
Show all versions of qtjambi-sensors Show documentation
package io.qt.sensors;
import io.qt.*;
/**
* Represents one reading from the ambient light sensor
* Java wrapper for Qt class QAmbientLightReading
*/
public class QAmbientLightReading extends io.qt.sensors.QSensorReading
{
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QAmbientLightReading.class);
/**
* Java wrapper for Qt enum QAmbientLightReading::LightLevel
*/
public enum LightLevel implements QtEnumerator {
/**
* Representing QAmbientLightReading:: Undefined
*/
Undefined(0),
/**
* Representing QAmbientLightReading:: Dark
*/
Dark(1),
/**
* Representing QAmbientLightReading:: Twilight
*/
Twilight(2),
/**
* Representing QAmbientLightReading:: Light
*/
Light(3),
/**
* Representing QAmbientLightReading:: Bright
*/
Bright(4),
/**
* Representing QAmbientLightReading:: Sunny
*/
Sunny(5);
static {
QtJambi_LibraryUtilities.initialize();
}
private LightLevel(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 LightLevel resolve(int value) {
switch (value) {
case 0: return Undefined;
case 1: return Dark;
case 2: return Twilight;
case 3: return Light;
case 4: return Bright;
case 5: return Sunny;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QAmbientLightReading:: QAmbientLightReading(QObject*)
*/
public QAmbientLightReading(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QAmbientLightReading instance, io.qt.core.QObject parent);
/**
* See QAmbientLightReading:: lightLevel()const
*/
@QtPropertyReader(name="lightLevel")
@QtUninvokable
public final io.qt.sensors.QAmbientLightReading.@NonNull LightLevel lightLevel(){
return io.qt.sensors.QAmbientLightReading.LightLevel.resolve(lightLevel_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int lightLevel_native_constfct(long __this__nativeId);
/**
* See QAmbientLightReading:: setLightLevel(QAmbientLightReading::LightLevel)
*/
@QtUninvokable
public final void setLightLevel(io.qt.sensors.QAmbientLightReading.@NonNull LightLevel lightLevel){
setLightLevel_native_QAmbientLightReading_LightLevel(QtJambi_LibraryUtilities.internal.nativeId(this), lightLevel.value());
}
@QtUninvokable
private native void setLightLevel_native_QAmbientLightReading_LightLevel(long __this__nativeId, int lightLevel);
/**
* See QSensorReading:: copyValuesFrom(QSensorReading*)
*/
@QtUninvokable
@Override
protected void copyValuesFrom(io.qt.sensors.@Nullable QSensorReading other){
copyValuesFrom_native_QSensorReading_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(other));
}
@QtUninvokable
private native void copyValuesFrom_native_QSensorReading_ptr(long __this__nativeId, long other);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QAmbientLightReading(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QAmbientLightReading(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QAmbientLightReading instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QAmbientLightReading(io.qt.core.QObject)}
* with parent = null
.
*/
public QAmbientLightReading() {
this((io.qt.core.QObject)null);
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #lightLevel()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final io.qt.sensors.QAmbientLightReading.@NonNull LightLevel getLightLevel() {
return lightLevel();
}
}