io.qt.positioning.QNmeaPositionInfoSource Maven / Gradle / Ivy
Show all versions of qtjambi-positioning Show documentation
package io.qt.positioning;
import io.qt.*;
/**
* Positional information using a NMEA data source
* Java wrapper for Qt class QNmeaPositionInfoSource
*/
public class QNmeaPositionInfoSource extends io.qt.positioning.QGeoPositionInfoSource
{
@QtPropertyMember(enabled=false)
private Object __rcDevice = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QNmeaPositionInfoSource.class);
/**
* Java wrapper for Qt enum QNmeaPositionInfoSource::UpdateMode
*/
@QtUnlistedEnum
public enum UpdateMode implements QtEnumerator {
/**
* Representing QNmeaPositionInfoSource:: RealTimeMode
*/
RealTimeMode(1),
/**
* Representing QNmeaPositionInfoSource:: SimulationMode
*/
SimulationMode(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private UpdateMode(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 UpdateMode resolve(int value) {
switch (value) {
case 1: return RealTimeMode;
case 2: return SimulationMode;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QNmeaPositionInfoSource:: QNmeaPositionInfoSource(QNmeaPositionInfoSource::UpdateMode, QObject*)
*/
public QNmeaPositionInfoSource(io.qt.positioning.QNmeaPositionInfoSource.@NonNull UpdateMode updateMode, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, updateMode, parent);
}
private native static void initialize_native(QNmeaPositionInfoSource instance, io.qt.positioning.QNmeaPositionInfoSource.UpdateMode updateMode, io.qt.core.QObject parent);
/**
* See QNmeaPositionInfoSource:: device()const
*/
@QtUninvokable
public final io.qt.core.@Nullable QIODevice device(){
return device_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QIODevice device_native_constfct(long __this__nativeId);
/**
* See QNmeaPositionInfoSource:: parsePosInfoFromNmeaData(QByteArrayView, QGeoPositionInfo*, bool*)
*/
@QtUninvokable
protected final io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData(io.qt.core.@NonNull QByteArrayView data){
return parsePosInfoFromNmeaData_native_QByteArrayView_QGeoPositionInfo_ptr_bool_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data));
}
@QtUninvokable
private native io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData_native_QByteArrayView_QGeoPositionInfo_ptr_bool_ptr(long __this__nativeId, long data);
/**
* See QNmeaPositionInfoSource:: setDevice(QIODevice*)
*/
@QtUninvokable
public final void setDevice(io.qt.core.@Nullable QIODevice source){
setDevice_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(source));
__rcDevice = source;
if(device()!=__rcDevice){
__rcDevice = null;
}
}
@QtUninvokable
private native void setDevice_native_QIODevice_ptr(long __this__nativeId, long source);
/**
* See QNmeaPositionInfoSource:: setError(QGeoPositionInfoSource::Error)
*/
@QtUninvokable
protected final void setError(io.qt.positioning.QGeoPositionInfoSource.@NonNull Error positionError){
setError_native_QGeoPositionInfoSource_Error(QtJambi_LibraryUtilities.internal.nativeId(this), positionError.value());
}
@QtUninvokable
private native void setError_native_QGeoPositionInfoSource_Error(long __this__nativeId, int positionError);
/**
* See QNmeaPositionInfoSource:: setUserEquivalentRangeError(double)
*/
@QtUninvokable
public final void setUserEquivalentRangeError(double uere){
setUserEquivalentRangeError_native_double(QtJambi_LibraryUtilities.internal.nativeId(this), uere);
}
@QtUninvokable
private native void setUserEquivalentRangeError_native_double(long __this__nativeId, double uere);
/**
* See QNmeaPositionInfoSource:: updateMode()const
*/
@QtUninvokable
public final io.qt.positioning.QNmeaPositionInfoSource.@NonNull UpdateMode updateMode(){
return io.qt.positioning.QNmeaPositionInfoSource.UpdateMode.resolve(updateMode_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int updateMode_native_constfct(long __this__nativeId);
/**
* See QNmeaPositionInfoSource:: userEquivalentRangeError()const
*/
@QtUninvokable
public final double userEquivalentRangeError(){
return userEquivalentRangeError_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double userEquivalentRangeError_native_constfct(long __this__nativeId);
/**
* See QGeoPositionInfoSource:: error()const
*/
@QtUninvokable
@Override
public io.qt.positioning.QGeoPositionInfoSource.@NonNull Error error(){
return io.qt.positioning.QGeoPositionInfoSource.Error.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QGeoPositionInfoSource:: lastKnownPosition(bool)const
*/
@QtUninvokable
@Override
public io.qt.positioning.@NonNull QGeoPositionInfo lastKnownPosition(boolean fromSatellitePositioningMethodsOnly){
return lastKnownPosition_native_bool_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fromSatellitePositioningMethodsOnly);
}
@QtUninvokable
private native io.qt.positioning.QGeoPositionInfo lastKnownPosition_native_bool_constfct(long __this__nativeId, boolean fromSatellitePositioningMethodsOnly);
/**
* See QGeoPositionInfoSource:: minimumUpdateInterval()const
*/
@QtUninvokable
@Override
public int minimumUpdateInterval(){
return minimumUpdateInterval_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int minimumUpdateInterval_native_constfct(long __this__nativeId);
/**
* See QNmeaPositionInfoSource:: parsePosInfoFromNmeaData(const char*, int, QGeoPositionInfo*, bool*)
*/
@QtUninvokable
protected io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData(java.nio.@StrictNonNull ByteBuffer data){
java.util.Objects.requireNonNull(data, "Argument 'data': null not expected.");
return parsePosInfoFromNmeaData_native_const_char_ptr_int_QGeoPositionInfo_ptr_bool_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), data);
}
@QtUninvokable
private native io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData_native_const_char_ptr_int_QGeoPositionInfo_ptr_bool_ptr(long __this__nativeId, java.nio.ByteBuffer data);
/**
* See QGeoPositionInfoSource:: requestUpdate(int)
*/
@Override
public void requestUpdate(int timeout){
requestUpdate_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), timeout);
}
private native void requestUpdate_native_int(long __this__nativeId, int timeout);
/**
* See QGeoPositionInfoSource:: setUpdateInterval(int)
*/
@QtUninvokable
@Override
public void setUpdateInterval(int msec){
setUpdateInterval_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), msec);
}
@QtUninvokable
private native void setUpdateInterval_native_int(long __this__nativeId, int msec);
/**
* See QGeoPositionInfoSource:: startUpdates()
*/
@Override
public void startUpdates(){
startUpdates_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void startUpdates_native(long __this__nativeId);
/**
* See QGeoPositionInfoSource:: stopUpdates()
*/
@Override
public void stopUpdates(){
stopUpdates_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void stopUpdates_native(long __this__nativeId);
/**
* See QGeoPositionInfoSource:: supportedPositioningMethods()const
*/
@QtUninvokable
@Override
public io.qt.positioning.QGeoPositionInfoSource.@NonNull PositioningMethods supportedPositioningMethods(){
return new io.qt.positioning.QGeoPositionInfoSource.PositioningMethods(supportedPositioningMethods_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int supportedPositioningMethods_native_constfct(long __this__nativeId);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QNmeaPositionInfoSource(QPrivateConstructor p) { super(p); }
public static final class Result{
public Result(QGeoPositionInfo info, boolean hasFix){
this.info = info;
this.hasFix = hasFix;
}
public QGeoPositionInfo info(){ return info; }
public final boolean hasFix(){ return hasFix; }
private final QGeoPositionInfo info;
private final boolean hasFix;
}
/**
* Overloaded constructor for {@link #QNmeaPositionInfoSource(io.qt.positioning.QNmeaPositionInfoSource.UpdateMode, io.qt.core.QObject)}
* with parent = null
.
*/
public QNmeaPositionInfoSource(io.qt.positioning.QNmeaPositionInfoSource.@NonNull UpdateMode updateMode) {
this(updateMode, (io.qt.core.QObject)null);
}
/**
* Overloaded function for {@link #parsePosInfoFromNmeaData(io.qt.core.QByteArrayView)}.
*/
@QtUninvokable
protected final io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData(io.qt.core.@NonNull QByteArray data) {
return parsePosInfoFromNmeaData(new io.qt.core.QByteArrayView(data));
}
/**
* Overloaded function for {@link #parsePosInfoFromNmeaData(java.nio.ByteBuffer)}.
*/
@QtUninvokable
protected final io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData(byte @StrictNonNull[] data, int offsetOfData, int size) {
return parsePosInfoFromNmeaData(data==null ? null : java.nio.ByteBuffer.wrap(data, offsetOfData, size));
}
/**
* Overloaded function for {@link #parsePosInfoFromNmeaData(java.nio.ByteBuffer)}.
*/
@QtUninvokable
protected final io.qt.positioning.QNmeaPositionInfoSource.@Nullable Result parsePosInfoFromNmeaData(byte @StrictNonNull[] data) {
return parsePosInfoFromNmeaData(data==null ? null : java.nio.ByteBuffer.wrap(data));
}
}