VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtDateAndTimeWidget Class Reference

A date and time widget.

Inheritance diagram for makVrv::DtDateAndTimeWidget:
Inheritance graph
[legend]

Public Member Functions

 DtDateAndTimeWidget (DtDe &de, QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~DtDateAndTimeWidget ()
 
virtual void setWidgetsEnabled (bool isEnabled)
 
Field value setters.

Sets the values of the widget's corresponding fields.

virtual void setDateAndTime (int year, int month, int day, int hours, int minutes, double seconds)
 
virtual void setDate (int year, int month, int day)
 
virtual void setTime (int hours, int minutes, double seconds)
 
virtual void setTimeScale (double timeScale)
 
Widget activation states.

Sets the activation states of the widget, typically when system is ready for receiving updates from the widget.

virtual void activate ()
 
virtual void deactivate ()
 
- Public Member Functions inherited from makVrv::DtDateAndTimeInterface
 DtDateAndTimeInterface ()
 
virtual ~DtDateAndTimeInterface ()
 

Protected Slots

virtual void updateTime ()
 
User input slots.

Receives notification that the user has changed a widget's value.

virtual void on_myHourChanged (int hour)
 
virtual void on_myMinuteChanged (int minute)
 
virtual void on_myTimeChanged (const QTime &)
 
virtual void on_myDateChanged (const QDate &)
 
virtual void on_myTimeScaleChanged (double)
 
virtual void on_myUseCurrentSettingsClicked ()
 

Protected Member Functions

void setupGui ()
 
int getSeconds (double seconds)
 
int getMilliseconds (double seconds)
 
double getSeconds (int sec, int millisec)
 

Protected Attributes

DtDemyDe
 
DtAnalogClockmyAnalogClock
 
QCalendarWidget * myCalendar
 
QDoubleSpinBoxmyTimeScaleSpinBox
 
QTimeEdit * myCurrentTimeEdit
 
QLabelmyHourLabel
 
QSlider * myHourSlider
 
QLabelmyMinuteLabel
 
QSlider * myMinuteSlider
 
QTimer * myTimer
 
QPushButtonmyUseCurrentSettingsButton
 
QLabelmyCurrentTimeLabel
 
QLabelmyTimeScaleLabel
 
QLabelmyHelpLabel
 

Additional Inherited Members

- Public Attributes inherited from makVrv::DtDateAndTimeInterface
boost::signalslib::signal< void()> signal_timeUpdateRequested
 
boost::signalslib::signal
< void(int, int, double)> 
signal_changeTime
 
boost::signalslib::signal
< void(int, int, int)> 
signal_changeDate
 
boost::signalslib::signal
< void(double)> 
signal_changeTimeScale
 

Constructor & Destructor Documentation

makVrv::DtDateAndTimeWidget::DtDateAndTimeWidget ( DtDe de,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)

CTOR.

virtual makVrv::DtDateAndTimeWidget::~DtDateAndTimeWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtDateAndTimeWidget::setDateAndTime ( int  year,
int  month,
int  day,
int  hours,
int  minutes,
double  seconds 
)
virtual

Set the date and time of the widget.

Parameters
[in]yearis the numerical year (all digits required).
[in]monthis the numerical month of the year (1 - 12).
[in]dayis the numerical day of the month (1 - 31).
[in]hoursis the numerical hour of the day (0 - 23).
[in]minutesis the numerical minutes of the day (0 - 59).
[in]secondsis the seconds of the day (0.0 - 59.999).

Implements makVrv::DtDateAndTimeInterface.

virtual void makVrv::DtDateAndTimeWidget::setDate ( int  year,
int  month,
int  day 
)
virtual

Set the date of the widget.

Parameters
[in]yearis the numerical year (all digits required).
[in]monthis the numerical month of the year (1 - 12).
[in]dayis the numerical day of the month (1 - 31).
virtual void makVrv::DtDateAndTimeWidget::setTime ( int  hours,
int  minutes,
double  seconds 
)
virtual

Set the time of the widget.

Parameters
[in]hoursis the numerical hour of the day (0 - 23).
[in]minutesis the numerical minutes of the day (0 - 59).
[in]secondsis the seconds of the day (0.0 - 59.999).
virtual void makVrv::DtDateAndTimeWidget::setTimeScale ( double  timeScale)
virtual

Changed the time scale.

Parameters
[in]timeScaleis a multiplier for scaling time (default 1.0).

Implements makVrv::DtDateAndTimeInterface.

virtual void makVrv::DtDateAndTimeWidget::activate ( )
virtual

Activate the update timer for this widget.

Implements makVrv::DtDateAndTimeInterface.

virtual void makVrv::DtDateAndTimeWidget::deactivate ( )
virtual

Deactivate the timer for this widget.

Implements makVrv::DtDateAndTimeInterface.

virtual void makVrv::DtDateAndTimeWidget::setWidgetsEnabled ( bool  isEnabled)
virtual

Enable or disable all the date and time widgets on this widget Widgets are disabled when listening to remote weather.

Parameters
[in]isEnableddetermines whether or not the widgets are activated

Implements makVrv::DtDateAndTimeInterface.

virtual void makVrv::DtDateAndTimeWidget::on_myHourChanged ( int  hour)
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::on_myMinuteChanged ( int  minute)
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::on_myTimeChanged ( const QTime &  )
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::on_myDateChanged ( const QDate &  )
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::on_myTimeScaleChanged ( double  )
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::on_myUseCurrentSettingsClicked ( )
protectedvirtualslot
virtual void makVrv::DtDateAndTimeWidget::updateTime ( )
protectedvirtualslot

Updates the currently displayed time to match the current time. Called by the widget's timer every 33 ms.

void makVrv::DtDateAndTimeWidget::setupGui ( )
protected

Sets up the widget's fields. Non-virtual (Called from CTOR).

int makVrv::DtDateAndTimeWidget::getSeconds ( double  seconds)
protected

Helper function to get the whole number of seconds from a double.

Parameters
[in]secondsis the double value to split.
Returns
the whole number value for seconds.
int makVrv::DtDateAndTimeWidget::getMilliseconds ( double  seconds)
protected

Helper function to get the whole number of milliseconds from a double.

Parameters
[in]secondsis the double value to split.
Returns
the whole number value for milliseconds.
double makVrv::DtDateAndTimeWidget::getSeconds ( int  sec,
int  millisec 
)
protected

Helper function to join seconds and milliseconds as integers into a single double of seconds with fraction of seconds.

Parameters
[in]secis the integer value of seconds.
[in]millisecis the integer value of milliseconds.
Returns
a double value for seconds and fraction of seconds.

Member Data Documentation

DtDe& makVrv::DtDateAndTimeWidget::myDe
protected
DtAnalogClock* makVrv::DtDateAndTimeWidget::myAnalogClock
protected
QCalendarWidget* makVrv::DtDateAndTimeWidget::myCalendar
protected
QDoubleSpinBox* makVrv::DtDateAndTimeWidget::myTimeScaleSpinBox
protected
QTimeEdit* makVrv::DtDateAndTimeWidget::myCurrentTimeEdit
protected
QLabel* makVrv::DtDateAndTimeWidget::myHourLabel
protected
QSlider* makVrv::DtDateAndTimeWidget::myHourSlider
protected
QLabel* makVrv::DtDateAndTimeWidget::myMinuteLabel
protected
QSlider* makVrv::DtDateAndTimeWidget::myMinuteSlider
protected
QTimer* makVrv::DtDateAndTimeWidget::myTimer
protected
QPushButton* makVrv::DtDateAndTimeWidget::myUseCurrentSettingsButton
protected
QLabel* makVrv::DtDateAndTimeWidget::myCurrentTimeLabel
protected
QLabel* makVrv::DtDateAndTimeWidget::myTimeScaleLabel
protected
QLabel* makVrv::DtDateAndTimeWidget::myHelpLabel
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)