Remoto - VFS: dateTimeField Class Reference
Remoto - VFS

The dateTimeField provides a field for selecting dates and times. More...

#include <dateTimeField.h>

Inheritance diagram for dateTimeField:
VFS_form_field

Public Member Functions

 dateTimeField (long t, QString label="", QString tip="")
 DateTime field constructor. More...
 
 dateTimeField (QDateTime t, QString label="", QString tip="")
 DateTime field constructor. More...
 
void setDateOnly (bool d)
 Set the state of the dateOnly option. More...
 
void setNowButton (bool n)
 Set the state of the nowbutton option. More...
 
void setValue (QDateTime t)
 Set the value of this field. More...
 
void setValue (QString s)
 Set the value of this field to a special value. More...
 
- Public Member Functions inherited from VFS_form_field
 VFS_form_field (QJsonValue val, QString type, QString label="", QString tip="")
 
 VFS_form_field (QString type)
 
void clearOption (QString o)
 Clear/remove a widget option. More...
 
int getIndex ()
 Get the field index. More...
 
QString getLabel ()
 Return the label. More...
 
void setAllowEmpty (bool e)
 Validate this field against empty-ness. More...
 
void setEnabled (bool e)
 Enable or disable this field. More...
 
void setHidden (bool e)
 Keep the field, but hide it when rendering. More...
 
void setHideLabel (bool l)
 Hide the label for this field. More...
 
void setIndex (int i)
 Set the field index for this widget. More...
 
void setLabel (QString l, bool replace=true)
 Set the label. More...
 
void setOption (QString o, QJsonValue v)
 Set a widget option. More...
 
void setSpellcheck (bool s)
 Enable or disable spellchecking on this text field. More...
 
void setTip (QString t)
 Set the tooltip. More...
 
void setValue (QJsonValue val)
 Set the value. More...
 

Additional Inherited Members

- Protected Attributes inherited from VFS_form_field
QJsonObject options
 Options for any widget type... this is an arbitrary list. More...
 

Detailed Description

The dateTimeField provides a field for selecting dates and times.

A 'nowbutton' can be added, which will cause the field to have a value of 0, which means 'now'

There is a 'dateonly' option as well, which will not show the time selector.

Definition at line 14 of file dateTimeField.h.

Constructor & Destructor Documentation

◆ dateTimeField() [1/2]

dateTimeField::dateTimeField ( QDateTime  t,
QString  label = "",
QString  tip = "" 
)
explicit

DateTime field constructor.

Parameters
tThe initial value as a QDateTime
labelThe label
tipThe tooltip

Definition at line 21 of file dateTimeField.cpp.

◆ dateTimeField() [2/2]

dateTimeField::dateTimeField ( long  t,
QString  label = "",
QString  tip = "" 
)
explicit

DateTime field constructor.

Parameters
tThe initial value as milliseconds since epoch
labelThe label
tipThe tooltip

Definition at line 34 of file dateTimeField.cpp.

Member Function Documentation

◆ setDateOnly()

void dateTimeField::setDateOnly ( bool  d)

Set the state of the dateOnly option.

Parameters
dboolean state

Definition at line 89 of file dateTimeField.cpp.

◆ setNowButton()

void dateTimeField::setNowButton ( bool  n)

Set the state of the nowbutton option.

Parameters
nboolean state

Definition at line 79 of file dateTimeField.cpp.

◆ setValue() [1/2]

void dateTimeField::setValue ( QDateTime  val)

Set the value of this field.

Parameters
valThe value as a QDatetTime

Definition at line 45 of file dateTimeField.cpp.

◆ setValue() [2/2]

void dateTimeField::setValue ( QString  s)

Set the value of this field to a special value.

Parameters
sThe value as a QString

Only these values are accepted:

  • NOW - instruct a loaded interface to replace the value with the current date and time.
  • NEXTHOUR - instruct a loaded interface to replace the value with the current date and time on hour from now.
  • TRACK - set the field to 0, which can be used to cause the field to track with the current time when used in calculations.

The difference is that NOW and NEXTHOUR will be replaced with a real value, where TRACK will remain 0.

Definition at line 62 of file dateTimeField.cpp.


The documentation for this class was generated from the following files: