5 @SuppressWarnings public class QTime{
6 public int hour, min, sec, msec;
7 public QTime(
int h,
int m,
int s,
int ms){
15 @SuppressWarnings
public class QDate{
16 public int year, mon,
day;
17 public QDate(
int y,
int m,
int d){
24 @SuppressWarnings
public class QDateTimeEdit : QWidget{
26 private onDateTimeChangeListener lis = nilptr;
37 nativehandle = QtXnl.createQObject(QType.qtDateTimeEdit,
this, 0);
38 if (nativehandle == 0){
44 public bool create(@NotNilptr QWidget parent)
override {
45 nativehandle = QtXnl.createQObject(QType.qtDateTimeEdit,
this, parent.nativehandle);
46 if (nativehandle == 0){
56 public static class onDateTimeChangeListener{
72 lis.onDateTimeChange(
this, dateTime);
78 lis.onDateChange(
this, year, month, day);
84 lis.onTimeChange(
this, hour, min, sec, msec);
89 QtXnl.widget_set_native_value(nativehandle, Constant.SETDATETIME, milliSecond);
92 public void setDate(
int year,
int mon,
int day){
93 int [] params = {year, mon, day};
94 QtXnl.widget_set_object_value(nativehandle, Constant.SETDATE, params);
97 public void setTime(
int hour,
int min,
int sec,
int msec){
98 int [] params = {hour, min, sec, msec};
99 QtXnl.widget_set_object_value(nativehandle, Constant.SETTIME, params);
103 return QtXnl.long_get(nativehandle, Constant.GETDATETIME);
107 int [] params =
new int [4];
108 QtXnl.widget_set_object_value(nativehandle, Constant.GETTIME, params);
109 return new QTime(params[0], params[1], params[2], params[3]);
113 return QtXnl.long_get(nativehandle, Constant.QDATETIMEEDIT_TOMSECSSINCEEPOCH);
117 int [] params =
new int [3];
118 QtXnl.widget_set_object_value(nativehandle, Constant.GETDATE, params);
119 return new QDate(params[0], params[1], params[2]);
QDate(int y, int m, int d)
void onDateTimeChange(QDateTimeEdit, long)
void onDateChange(QDateTimeEdit, int, int, int)
void onTimeChange(QDateTimeEdit, int, int, int, int)
void setOnDateTimeChangeListener(onDateTimeChangeListener l)
void setDate(int year, int mon, int day)
void onDateTimeChange(long dateTime)
bool create(@NotNilptr QWidget parent) override
void onTimeChange(int hour ,int min ,int sec,int msec)
void setDateTime(long milliSecond)
void setTime(int hour, int min, int sec, int msec)
void onDateChange(int year,int month,int day)
QTime(int h, int m, int s,int ms)