VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
overlayParentEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
16 
17 #include <QtWidgets/QWidget>
18 
19 class QLabel;
20 class QComboBox;
21 class QHBoxLayout;
22 class QSpacerItem;
23 
24 namespace makVrv
25 {
26  class DtDe;
27 }
28 
29 namespace makVrf
30 {
33  {
34  Q_OBJECT
35 
36  public:
37  DtOverlayParentEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
38 
39  //DTOR
40  virtual ~DtOverlayParentEntryWidget();
41 
43  virtual void setLabel(const QString&);
44 
46  virtual void setLabel(const std::string&);
47  virtual QString label() const;
48 
50  virtual void setRange(double bottom, double top);
51 
54  virtual void setDefaultValue(const std::string&);
55 
57  virtual void setVariableData(const std::string&);
58 
60  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& data);
61 
63  virtual void setToolTip(const QString&);
64 
66  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
67 
69  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
70 
72  virtual void setOverlay(const QString&);
73 
75  virtual std::string overlay() const;
76 
78  virtual QString overlayTextTranslated() const;
79 
81  virtual QString currentText() const;
82 
84  virtual void addOverlay(const QString& name, bool translate = true);
85 
87  virtual void removeOverlay(const QString& name);
88 
90  virtual void renameOverlay(const QString& oldName, const QString& newName);
91 
93  virtual void setIndent(int);
94 
96  virtual bool isValid() const
97  {
98  return true;
99  }
100 
101  static makVrv::DtUnicode codeVariableType()
102  {
103  return makVrv::DtUnicode::tr("String (overlay)");
104  }
105 
106  boost::signal<void (int)> signal_overlaySelectionChanged;
107 
108  virtual void clearOverlays();
109  virtual void populateOverlays();
110 
111  static std::string designerGroup()
112  {
113  return tr("VR-Forces Data Entry").toUtf8().constData();
114  }
115 
116  static std::string headerFile()
117  {
118  return tr("<vrfGuiCoreQt/overlayParentEntryWidget.h>").toUtf8().constData();
119  }
120 
121  static std::string variableName()
122  {
123  return tr("overlay").toUtf8().constData();
124  }
125 
126  static bool includeInQtDesigner()
127  {
128  return true;
129  }
130 
132  virtual std::string variableDataFromUiDesigner(const QDomElement&, const DtScriptedTaskVariableLayoutConverter&) const;
133 
134  virtual std::string scriptedTaskVariableName() const;
135 
136  protected:
137  virtual int indexOfOverlay(const QString&) const;
138 
140  virtual void slot_overlayAdded(const std::string&);
141 
143  virtual void slot_overlayRemoved(const std::string&);
144 
146  virtual void slot_overlayRenamed(const std::string&, const std::string&);
147 
148  virtual void slot_overlayFlagsChanged(const std::string&, int f);
149 
150  protected slots:
151  virtual void activated(int);
152 
153  public:
156  QHBoxLayout* myContentLayout;
157  QSpacerItem* mySpacerItem;
158 
159  protected:
162  };
163 
165 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)