cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsQtWidgetGenericObjectProxy.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Praneeth Sadda, Anton Deguet
7  Created on: 2011-11-11
8 
9  (C) Copyright 2011 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 #ifndef _mtsQtWidgetGenericObjectProxy_h
23 #define _mtsQtWidgetGenericObjectProxy_h
24 
26 
27 class QLabel;
28 class QSpinBox;
29 class QComboBox;
30 class QDoubleSpinBox;
31 class QLineEdit;
32 class QTableWidget;
33 
34 // Always include last
36 
37 // -- mtsInt
39 {
40  Q_OBJECT;
42  private:
43  QLabel * Label;
44  public:
45  mtsQtWidgetIntRead(void);
46  virtual bool SetValue(const mtsGenericObject & value);
47 };
49 
51 {
52  Q_OBJECT;
54  private:
55  QSpinBox * SpinBox;
56  public:
57  mtsQtWidgetIntWrite(void);
58  virtual bool SetValue(const mtsGenericObject & value);
59  virtual bool GetValue(mtsGenericObject & placeHolder) const;
60 };
62 
63 
64 // -- mtsBool
66 {
67  Q_OBJECT;
69  private:
70  QLabel * Label;
71  public:
72  mtsQtWidgetBoolRead(void);
73  virtual bool SetValue(const mtsGenericObject & value);
74 };
76 
78 {
79  Q_OBJECT;
81  private:
82  QComboBox * ComboBox;
83  public:
85  virtual bool SetValue(const mtsGenericObject & value);
86  virtual bool GetValue(mtsGenericObject & placeHolder) const;
87 };
89 
90 
91 // -- mtsDouble
93 {
94  Q_OBJECT;
96  private:
97  QLabel * Label;
98  public:
100  virtual bool SetValue(const mtsGenericObject & value);
101 };
103 
105 {
106  Q_OBJECT;
108  private:
109  QDoubleSpinBox * DoubleSpinBox;
110  public:
112  virtual bool SetValue(const mtsGenericObject & value);
113  virtual bool GetValue(mtsGenericObject & placeHolder) const;
114 };
116 
117 
118 // -- mtsStdString
120 {
121  Q_OBJECT;
123  private:
124  QLabel * Label;
125  public:
127  virtual bool SetValue(const mtsGenericObject & value);
128 };
130 
132 {
133  Q_OBJECT;
135  private:
136  QLineEdit * LineEdit;
137  public:
139  virtual bool SetValue(const mtsGenericObject & value);
140  virtual bool GetValue(mtsGenericObject & placeHolder) const;
141 };
143 
144 
145 // -- mtsStateIndex
147 {
148  Q_OBJECT;
150  private:
151  QLabel * Label;
152  public:
154  virtual bool SetValue(const mtsGenericObject & value);
155 };
157 
159 {
160  Q_OBJECT;
162  private:
163  QTableWidget * TableWidget;
164  QSpinBox * IndexSpinBox;
165  QDoubleSpinBox * TicksSpinBox;
166  QDoubleSpinBox * LengthSpinBox;
167  static QWidget * MakeSpinBox();
168  static QWidget * MakeDoubleSpinBox();
169  public:
171  virtual bool SetValue(const mtsGenericObject & value);
172  virtual bool GetValue(mtsGenericObject & placeHolder) const;
173 };
175 
176 #endif // _mtsQtWidgetGenericObject_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: mtsQtWidgetGenericObjectProxy.h:92
Definition: mtsQtWidgetGenericObjectProxy.h:104
Definition: mtsQtWidgetGenericObjectProxy.h:77
Definition: mtsQtWidgetGenericObjectProxy.h:119
CMN_DECLARE_SERVICES_INSTANTIATION(mtsQtWidgetIntRead)
Base class for data object in cisstMultiTask.
Definition: mtsGenericObject.h:56
Definition: mtsQtWidgetGenericObjectProxy.h:158
Definition: mtsQtWidgetGenericObjectProxy.h:50
Definition: mtsQtWidgetGenericObjectProxy.h:65
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
virtual bool GetValue(mtsGenericObject &placeHolder) const =0
Definition: mtsQtWidgetGenericObject.h:35
Definition: mtsQtWidgetGenericObjectProxy.h:131
virtual bool SetValue(const mtsGenericObject &value)=0
Definition: mtsQtWidgetGenericObjectProxy.h:146
Definition: mtsQtWidgetGenericObject.h:48
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
Rules of exporting.
Definition: mtsQtWidgetGenericObjectProxy.h:38
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76