|
@@ -6050,6 +6050,8 @@ void setQDateTimeEditProperties(QScriptValue value, QScriptEngine *engine)
|
6050
|
6050
|
value.setProperty("day", engine->newFunction(QDateTimeEdit_day));
|
6051
|
6051
|
value.setProperty("month", engine->newFunction(QDateTimeEdit_month));
|
6052
|
6052
|
value.setProperty("year", engine->newFunction(QDateTimeEdit_year));
|
|
6053
|
+ value.setProperty("setToCurrentTime",
|
|
6054
|
+ engine->newFunction(QDateTimeEdit_setToCurrentTime));
|
6053
|
6055
|
}
|
6054
|
6056
|
|
6055
|
6057
|
@ Certain operations on a |QDateEdit| are easier with a few convenience
|
|
@@ -6094,6 +6096,13 @@ QScriptValue QDateTimeEdit_year(QScriptContext *context, QScriptEngine *)
|
6094
|
6096
|
return QScriptValue(self->date().year());
|
6095
|
6097
|
}
|
6096
|
6098
|
|
|
6099
|
+QScriptValue QDateTimeEdit_setToCurrentTime(QScriptContext *context, QScriptEngine *)
|
|
6100
|
+{
|
|
6101
|
+ QDateTimeEdit *self = getself<QDateTimeEdit *>(context);
|
|
6102
|
+ self->setDateTime(QDateTime::currentDateTime());
|
|
6103
|
+ return QScriptValue();
|
|
6104
|
+}
|
|
6105
|
+
|
6097
|
6106
|
@ A few function prototypes are needed for this.
|
6098
|
6107
|
|
6099
|
6108
|
@<Function prototypes for scripting@>=
|
|
@@ -6105,6 +6114,7 @@ QScriptValue QDateTimeEdit_day(QScriptContext *context, QScriptEngine *engine);
|
6105
|
6114
|
QScriptValue QDateTimeEdit_month(QScriptContext *context,
|
6106
|
6115
|
QScriptEngine *engine);
|
6107
|
6116
|
QScriptValue QDateTimeEdit_year(QScriptContext *context, QScriptEngine *engine);
|
|
6117
|
+QScriptValue QDateTimeEdit_setToCurrentTime(QScriptContext *context, QScriptEngine *engine);
|
6108
|
6118
|
|
6109
|
6119
|
@ In order to get to objects created from the XML description, it is necessary
|
6110
|
6120
|
to provide a function that can be called to retrieve children of a given widget.
|