io.qt.core.QTime Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Clock time functions
* Java wrapper for Qt class QTime
*/
public class QTime extends QtObject
implements java.lang.Comparable,
java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* See QTime:: QTime()
*/
public QTime(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QTime instance);
/**
* See QTime:: QTime(QTime)
*/
public QTime(io.qt.core.@NonNull QTime other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QTime instance, io.qt.core.QTime other);
/**
* See QTime:: QTime(int, int, int, int)
*/
public QTime(int h, int m, int s, int ms){
super((QPrivateConstructor)null);
initialize_native(this, h, m, s, ms);
}
private native static void initialize_native(QTime instance, int h, int m, int s, int ms);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QTime addMSecs(int ms){
return addMSecs_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), ms);
}
@QtUninvokable
private native io.qt.core.QTime addMSecs_native_int_constfct(long __this__nativeId, int ms);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QTime addSecs(int secs){
return addSecs_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), secs);
}
@QtUninvokable
private native io.qt.core.QTime addSecs_native_int_constfct(long __this__nativeId, int secs);
/**
*
*/
@QtUninvokable
public final int hour(){
return hour_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int hour_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final boolean isNull(){
return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isNull_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int minute(){
return minute_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int minute_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int msec(){
return msec_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int msec_native_constfct(long __this__nativeId);
/**
* See QTime:: msecsSinceStartOfDay()const
*/
@QtUninvokable
public final int msecsSinceStartOfDay(){
return msecsSinceStartOfDay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int msecsSinceStartOfDay_native_constfct(long __this__nativeId);
/**
* See QTime:: msecsTo(QTime)const
*/
@QtUninvokable
public final int msecsTo(io.qt.core.@NonNull QTime t){
return msecsTo_native_QTime_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(t));
}
@QtUninvokable
private native int msecsTo_native_QTime_constfct(long __this__nativeId, long t);
/**
*
*/
@QtUninvokable
private final boolean operator_less(io.qt.core.@NonNull QTime rhs){
return operator_less_native_QTime(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean operator_less_native_QTime(long __this__nativeId, long rhs);
/**
* See operator<<(QDataStream&, QTime)
*/
@QtUninvokable
public void writeTo(io.qt.core.@StrictNonNull QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
*
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QTime rhs){
return equals_native_QTime(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rhs));
}
@QtUninvokable
private native boolean equals_native_QTime(long __this__nativeId, long rhs);
/**
* See operator>>(QDataStream&, QTime&)
*/
@QtUninvokable
public void readFrom(io.qt.core.@StrictNonNull QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
*
*/
@QtUninvokable
public final int second(){
return second_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int second_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int secsTo(io.qt.core.@NonNull QTime t){
return secsTo_native_QTime_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(t));
}
@QtUninvokable
private native int secsTo_native_QTime_constfct(long __this__nativeId, long t);
/**
* See QTime:: setHMS(int, int, int, int)
*/
@QtUninvokable
public final boolean setHMS(int h, int m, int s, int ms){
return setHMS_native_int_int_int_int(QtJambi_LibraryUtilities.internal.nativeId(this), h, m, s, ms);
}
@QtUninvokable
private native boolean setHMS_native_int_int_int_int(long __this__nativeId, int h, int m, int s, int ms);
/**
* See QTime:: toString(QString)const
*/
@QtUninvokable
public final java.lang.@NonNull String toString(java.lang.@NonNull String format){
return toString_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), format);
}
@QtUninvokable
private native java.lang.String toString_native_cref_QString_constfct(long __this__nativeId, java.lang.String format);
/**
* See QTime:: toString(Qt::DateFormat)const
*/
@QtUninvokable
public final java.lang.@NonNull String toString(io.qt.core.Qt.@NonNull DateFormat f){
return toString_native_Qt_DateFormat_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), f.value());
}
@QtUninvokable
private native java.lang.String toString_native_Qt_DateFormat_constfct(long __this__nativeId, int f);
/**
*
*/
public native static io.qt.core.@NonNull QTime currentTime();
/**
* See QTime:: fromMSecsSinceStartOfDay(int)
*/
public native static io.qt.core.@NonNull QTime fromMSecsSinceStartOfDay(int msecs);
/**
* See QTime:: fromString(QString, QStringView)
*/
public native static io.qt.core.@NonNull QTime fromString(java.lang.@NonNull String string, java.lang.@NonNull String format);
/**
* See QTime:: fromString(QStringView, Qt::DateFormat)
*/
public static io.qt.core.@NonNull QTime fromString(java.lang.@NonNull String string, io.qt.core.Qt.@NonNull DateFormat format){
return fromString_native_QStringView_Qt_DateFormat(string, format.value());
}
private native static io.qt.core.QTime fromString_native_QStringView_Qt_DateFormat(java.lang.String string, int format);
/**
* See QTime:: isValid(int, int, int, int)
*/
public native static boolean isValid(int h, int m, int s, int ms);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QTime(QPrivateConstructor p) { super(p); }
/**
*
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.core.QTime) {
return equals((io.qt.core.QTime) other);
}
return false;
}
/**
*
*/
/**
* {@inheritDoc}
*/
@QtUninvokable
public int compareTo(io.qt.core.@StrictNonNull QTime other) {
if (equals(other)) return 0;
else if (operator_less(other)) return -1;
else return 1;
}
/**
* Returns the objects's hash code computed by qHash(QTime)
.
*/
@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 QTime:: QTime(QTime)
*/
@QtUninvokable
@Override
public QTime clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QTime clone_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QTime(int, int, int, int)}
* with ms = 0
.
*/
public QTime(int h, int m, int s) {
this(h, m, s, (int)0);
}
/**
* Overloaded constructor for {@link #QTime(int, int, int, int)}
* with:
* s = 0
* ms = 0
*
*/
public QTime(int h, int m) {
this(h, m, (int)0, (int)0);
}
/**
* Overloaded function for {@link #setHMS(int, int, int, int)}
* with ms = 0
.
*/
@QtUninvokable
public final boolean setHMS(int h, int m, int s) {
return setHMS(h, m, s, (int)0);
}
/**
* Overloaded function for {@link #toString(io.qt.core.Qt.DateFormat)}
* with f = io.qt.core.Qt.DateFormat.TextDate
.
*/
@QtUninvokable
public final java.lang.@NonNull String toString() {
return toString(io.qt.core.Qt.DateFormat.TextDate);
}
/**
* Overloaded function for {@link #fromString(java.lang.String, io.qt.core.Qt.DateFormat)}
* with format = io.qt.core.Qt.DateFormat.TextDate
.
*/
public static io.qt.core.@NonNull QTime fromString(java.lang.@NonNull String string) {
return fromString(string, io.qt.core.Qt.DateFormat.TextDate);
}
/**
* Overloaded function for {@link #isValid(int, int, int, int)}
* with ms = 0
.
*/
public static boolean isValid(int h, int m, int s) {
return isValid(h, m, s, (int)0);
}
}