VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
setStatePropertiesDialog.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include <vrfutil/rwProperties.h>
16 #include <QtGui/QCheckBox>
17 #include <QtGui/QScrollArea>
18 #include <QtGui/QSlider>
20 #include <vrfutil/rwProperties.h>
21 
22 class QLabel;
23 class QVBoxLayout;
24 class QGridLayout;
25 class QWidget;
26 class QComboBox;
27 class QLineEdit;
29 class QValidator;
30 class DtReaderWriter;
32 
33 namespace makVrf
34 {
37  {
38  Q_OBJECT
39 
40  public:
42  virtual ~DtPropertySlider();
43 
45  virtual double percent() const;
46 
48  virtual void setPercent(double);
49 
50  virtual void setValue(double);
51  virtual double value() const;
52 
53  virtual void setRange(double lower, double upper);
54 
55  virtual void setValuesArePercentages(bool);
56 
57  protected slots:
58  virtual void sliderChanged();
59  virtual void textChanged();
60 
61  signals:
62  void percentChanged();
63 
64  public:
65  QSlider* slider;
67 
68  protected:
70  };
71 
75  {
76  Q_OBJECT
77 
78  public:
79  //CTOR
80  DtSetStatePropertiesDialog(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
81 
82  //DTOR
83  virtual ~DtSetStatePropertiesDialog();
84 
89  virtual void addProperty(const DtPropertyInterface*, bool merge = false);
90 
92  virtual void setupGui(const std::vector<makVrv::DtSimEntry*>& data);
93 
94  protected:
95  virtual QWidget* contents(const std::vector<makVrv::DtSimEntry*>& data);
96 
97  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& s);
98 
99  virtual void sendRequest();
100 
101  struct PropertyItem;
102  virtual void cleanupPropertyItem(PropertyItem&) const;
103 
104  virtual void clearProperties();
105 
107  virtual void markAsReadOnly(PropertyItem&);
108 
112  virtual bool addPropertyItemForDataEntry(PropertyItem&, const DtReaderWriter*, const DtString& pathSoFar, int level,
113  bool updateExistingValue = false);
114 
116  virtual int addPropertyItemToDataSheet(PropertyItem&, const DtReaderWriter*, const DtString& pathSoFar, int level);
117 
118  protected slots:
120  virtual void modifyStateProperty();
121  virtual void updateOkButton();
122 
123  protected:
124  virtual void setupStatement(const DtSimStatement*);
125  virtual DtRwProperties modifiedProperties() const;
126  virtual bool modifiedProperties(const PropertyItem&, DtReaderWriter* rw, bool parentItList = false) const;
127  virtual void setupStateProperties(DtSetStateProperties* col);
128 
129  virtual const DtReaderWriter* baseValueFor(const DtString& pathSoFar) const;
130 
132  virtual bool hasValue(const DtRwProperties& props, const DtString& val) const;
133 
135  virtual void extract(std::vector<DtReaderWriter*>& allCounts, const DtString& extractionType, DtReaderWriter* curItem,
136  const DtString& pathSoFar) const;
137 
139  virtual void extractItemsFor(DtReaderWriter*, const DtString& extractionType,
140  const DtString& title, DtRwProperties* container) const;
141 
142  virtual void addDataEntryIfModifiableValue(PropertyItem& item, const DtReaderWriter* rw, const DtString& pathSoFar,
143  int level, bool updateExistingValue, int row);
144 
146  virtual void valueFromWidget(const PropertyItem& item, DtReaderWriter* rw) const;
147 
149  virtual DtString properties() const;
150 
154  virtual bool replace() const;
155 
157  virtual DtString translationModule() const;
158 
160  virtual bool valuesArePercentages(const std::vector<makVrv::DtSimEntry*>& data) const;
161 
164  virtual bool sendValuesAsPercentages() const;
165 
166  public:
168  QVBoxLayout* myMainLayout;
169  QScrollArea* myScrollArea;
171  QGridLayout* myGridLayout;
173 
174  protected:
176  typedef std::map<DtString, PropertyItem> PropertyItems;
177 
179  {
180  PropertyItem() : labelLayout(0), label(0), validator(0), modify(0), properties(0), added(false) { widgets.widget = 0; };
181  PropertyItem(const PropertyItem& orig) : label(orig.label), validator(orig.validator),
182  labelLayout(orig.labelLayout), modify(orig.modify), properties(orig.properties),
183  children(orig.children), added(orig.added) { widgets.widget = orig.widgets.widget; };
184 
185  QHBoxLayout* labelLayout;
188 
189  union Widgets
190  {
195  };
196 
200  bool added;
202  };
203 
206 
209 
213 
216  };
217 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)