TimeEdit Class Reference

The TimeEdit JavaScript class. A simplified version of the TimeEdit Qt widget. More...

Properties

bool showSeconds
 Toggle to display seconds in the time. More...
 
bool showAMPM
 Toggle to display the AM : PM display. More...
 
QTime time
 The current time. More...
 
QTime minimum
 The minimum time allowed by TimeEdit. More...
 
QTime maximum
 The maximum time allowed by TimeEdit. More...
 

Detailed Description

The TimeEdit JavaScript class. A simplified version of the TimeEdit Qt widget.

var myDialog = new Dialog();
myDialog.title = "TimeEdit Example";
var userInput = new TimeEdit();
var min = new QTime( 15, 00, 00);
var max = new QTime( 18, 00, 00);
var preset = new QTime( 15, 00, 00);
userInput.time = preset;
userInput.minimum = min;
userInput.maximum = max;
//These two lines are redundant, as these are already the default values
userInput.showSeconds = false;
userInput.showAMPM = true;
userInput.label = "Pick an appointment time: ";
myDialog.add( userInput );
if ( myDialog.exec() )
MessageLog.trace("The chosen time is: " + userInput.time + ".");

Property Documentation

◆ maximum

QTime TimeEdit::maximum
readwrite

The maximum time allowed by TimeEdit.

◆ minimum

QTime TimeEdit::minimum
readwrite

The minimum time allowed by TimeEdit.

◆ showAMPM

bool TimeEdit::showAMPM
readwrite

Toggle to display the AM : PM display.

◆ showSeconds

bool TimeEdit::showSeconds
readwrite

Toggle to display seconds in the time.

◆ time

QTime TimeEdit::time
readwrite

The current time.