VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sphereEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
16 namespace makVrf
17 {
18  class DtRangeEntryWidget;
19  class DtSphereEditor;
20 
24  {
25  Q_OBJECT
26  Q_PROPERTY(QString radiusLabel READ radiusLabel WRITE setRadiusLabel)
27  Q_PROPERTY(bool showSphere READ showSphere WRITE setShowSphere)
28  Q_PROPERTY(double defaultRadius READ defaultRadius WRITE setDefaultRadius)
29 
30  public:
31  DtSphereEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
32 
33  //DTOR
34  virtual ~DtSphereEntryWidget();
35 
40  virtual void setRange(double bottom, double top);
41 
43  virtual void setDefaultValue(const std::string&);
44 
47  virtual void setVariableData(const QString&);
49 
51  virtual double radius() const;
52 
54  virtual void setRadius(double);
55 
57  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
58 
60  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
61 
64  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(QWidget* parent, const Qt::WindowFlags& flags = 0) const;
65 
66  virtual void setRadiusLabel(const QString&);
67  virtual QString radiusLabel() const;
68 
69  virtual void setDefaultRadius(double);
70  virtual double defaultRadius() const;
71 
72  static makVrv::DtUnicode codeVariableType()
73  {
74  return makVrv::DtUnicode::tr("Sphere: variable.center (Location3D), variable.radius (radius in meters)");
75  }
76 
77  virtual void refreshLabels();
78 
80  virtual void setShowSphere(bool);
81  bool showSphere() const { return myShowSphere; };
82 
84  virtual void setupSphere();
85 
88  virtual void setHasMapFocus(bool);
89 
91  virtual void setMaintainCurrentAltitude(bool);
92 
94  virtual void setProcessMouseEvents(bool);
95 
96  virtual void setHasBeenPlaced(bool b);
97  bool hasBeenPlaced() const { return myHasBeenPlaced; };
98 
99  boost::signal<void ()> signal_radiusChanged;
100  boost::signal<void (bool)> signal_hasBeenPlaced;
101 
102  static std::string designerGroup()
103  {
104  return tr("VR-Forces Object Creation").toUtf8().constData();
105  }
106 
107  static std::string headerFile()
108  {
109  return tr("<vrfGuiCoreQt/sphereEntryWidget.h>").toUtf8().constData();
110  }
111 
112  static std::string variableName()
113  {
114  return tr("sphere").toUtf8().constData();
115  }
116 
117  protected:
118 
119  virtual void canTakeMapFocusChanged();
120  virtual void radiusChanged();
121 
122  virtual void slot_onPositionChanged();
123 
124  virtual void updateSphereLocation();
125 
126  virtual std::string variableDataFromUiDesigner(const QDomElement& element, const DtScriptedTaskVariableLayoutConverter& converter) const;
127 
128  public:
130 
131  protected:
136  double myBottom;
137  double myTop;
138  };
139 
143  {
144  Q_OBJECT
145 
146  public:
147  DtSphereEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
149 
150  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow);
151  virtual void setTo(DtScriptedTaskVariable&) const;
152 
153  virtual void setReadOnly(bool);
154 
155  public:
160  };
161 
163 }

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)