cisst-saw
Loading...
Searching...
No Matches
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 Author(s): Praneeth Sadda, Anton Deguet
6 Created on: 2011-11-11
7
8 (C) Copyright 2011-2023 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19#ifndef _mtsQtWidgetGenericObjectProxy_h
20#define _mtsQtWidgetGenericObjectProxy_h
21
23
24class QLabel;
25class QSpinBox;
26class QComboBox;
27class QDoubleSpinBox;
28class QLineEdit;
29class QTableWidget;
30
31// Always include last
33
34// -- mtsInt
36{
37 Q_OBJECT;
39 private:
40 QLabel * Label;
41 public:
43 bool SetValue(const mtsGenericObject & value) override;
44};
46
48{
49 Q_OBJECT;
51 private:
52 QSpinBox * SpinBox;
53 public:
55 bool SetValue(const mtsGenericObject & value) override;
56 bool GetValue(mtsGenericObject & placeHolder) const override;
57};
59
60
61// -- mtsBool
63{
64 Q_OBJECT;
66 private:
67 QLabel * Label;
68 public:
70 bool SetValue(const mtsGenericObject & value) override;
71};
73
75{
76 Q_OBJECT;
78 private:
79 QComboBox * ComboBox;
80 public:
82 bool SetValue(const mtsGenericObject & value) override;
83 bool GetValue(mtsGenericObject & placeHolder) const override;
84};
86
87
88// -- mtsDouble
90{
91 Q_OBJECT;
93 private:
94 QLabel * Label;
95 public:
97 bool SetValue(const mtsGenericObject & value) override;
98};
100
102{
103 Q_OBJECT;
104 CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
105 private:
106 QDoubleSpinBox * DoubleSpinBox;
107 public:
109 bool SetValue(const mtsGenericObject & value) override;
110 bool GetValue(mtsGenericObject & placeHolder) const override;
111};
113
114
115// -- mtsStdString
117{
118 Q_OBJECT;
119 CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
120 private:
121 QLabel * Label;
122 public:
124 bool SetValue(const mtsGenericObject & value) override;
125};
127
129{
130 Q_OBJECT;
131 CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
132 private:
133 QLineEdit * LineEdit;
134 public:
136 bool SetValue(const mtsGenericObject & value) override;
137 bool GetValue(mtsGenericObject & placeHolder) const override;
138};
140
141
142// -- mtsStateIndex
144{
145 Q_OBJECT;
146 CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
147 private:
148 QLabel * Label;
149 public:
151 bool SetValue(const mtsGenericObject & value) override;
152};
154
156{
157 Q_OBJECT;
158 CMN_DECLARE_SERVICES(CMN_NO_DYNAMIC_CREATION, CMN_LOG_ALLOW_DEFAULT);
159 private:
160 QTableWidget * TableWidget;
161 QSpinBox * IndexSpinBox;
162 QDoubleSpinBox * TicksSpinBox;
163 QDoubleSpinBox * LengthSpinBox;
164 static QWidget * MakeSpinBox();
165 static QWidget * MakeDoubleSpinBox();
166 public:
168 bool SetValue(const mtsGenericObject & value) override;
169 bool GetValue(mtsGenericObject & placeHolder) const override;
170};
172
173#endif // _mtsQtWidgetGenericObject_h
Base class for data object in cisstMultiTask.
Definition mtsGenericObject.h:52
Definition mtsQtWidgetGenericObjectProxy.h:63
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:75
bool GetValue(mtsGenericObject &placeHolder) const override
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:90
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:102
bool GetValue(mtsGenericObject &placeHolder) const override
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:36
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:48
bool GetValue(mtsGenericObject &placeHolder) const override
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:144
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:156
bool GetValue(mtsGenericObject &placeHolder) const override
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:117
bool SetValue(const mtsGenericObject &value) override
Definition mtsQtWidgetGenericObjectProxy.h:129
bool GetValue(mtsGenericObject &placeHolder) const override
bool SetValue(const mtsGenericObject &value) override
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_NO_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:325
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
Rules of exporting.