VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
timeEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
16 class QTimeEdit;
17 class QLabel;
18 class QSpinBox;
19 class QHBoxLayout;
20 class QLineEdit;
21 class QIntValidator;
22 
23 namespace makVrf
24 {
27  {
28  Q_OBJECT
29 
30  public:
31  DtTimeEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
32 
33  //DTOR
34  virtual ~DtTimeEntryWidget();
35 
37  virtual void setLabel(const std::string&);
38 
40  virtual void setRange(double bottom, double top);
41 
43  virtual void setDayShown(bool);
44 
47  virtual void setTimeOfDayMode(bool);
48  virtual bool timeOfDayMode() const;
49 
52  virtual void setDefaultValue(const std::string&);
53 
55  virtual void setVariableData(const std::string&);
56 
58  virtual void setSecondsOnlyMode(bool);
59 
61  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
62 
64  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
65 
67  virtual void setTimeInSeconds(int);
68  virtual int timeInSeconds() const;
69 
70  static makVrv::DtUnicode codeVariableType()
71  {
72  return makVrv::DtUnicode::tr("Integer Unit: seconds");
73  }
74 
76  boost::signal<void ()> signal_changed;
77 
78  protected slots:
79  virtual void onTimeChanged();
80 
81  protected:
83  virtual void parseTime(const std::string& s, int& days, int& hours, int& minutes, int& seconds) const;
84  virtual void timezoneChanged(const std::string& oldTimezone, const std::string& newTimezone);
85  virtual void dateTimeFormatChanged(const std::string&);
86 
87  public:
89  QTimeEdit* myTime;
91  QIntValidator* myIntValidator;
93  QHBoxLayout* myContentLayout;
94 
95  protected:
98  bool myDayShown;
100  };
101 
103 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)