VR-Forces 4.2 Class Documentation
pointConfigWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: pointConfigWidget.h,v $ $Revision: 1.26 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef POINTCONFIGWIDGET_H
13 #define POINTCONFIGWIDGET_H
14 
15 #include "tmqt/ui_pointConfigWidgetUi.h"
16 #include "ngutil/entityMapperKey.h"
17 
18 #include "geometry/point.h"
19 
20 #include "drawerNative/convUtils.h"
21 #include <QtCore/QHash>
22 #include <QtCore/QList>
23 
24 class DtTMMapArea;
25 class DtSymbol;
26 class DtModelData;
28 class DtArchivableObject;
30 
34 
35 #include "tmqt/tmqtDefines.h"
37 {
38 
39  Q_OBJECT
40 
41 public:
42 
44  DtPointConfigWidget(QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
45 
47  virtual ~DtPointConfigWidget();
48 
49  virtual bool init
50  (
51  const DtTMMapArea* converter,
52  QVector<DtPoint>* list,
53  QString* name,
54  QString* label,
55  int forceType,
56  const DtModelData* data,
57  bool editNotCreate = 0,
58  DtSymbol* workingSymbol = NULL,
59  const DtEntityMapperKey* key = NULL,
60  DtArchivableObject* userData = NULL
61  );
62 
63  virtual double heightOffset() const;
64 
65  virtual void setNameLabel(const QString& name);
66 
67  static QWidget* create(QWidget* parent = NULL, const Qt::WindowFlags& f = 0);
68 
69  bool editNotCreate() const;
70  const DtEntityMapperKey& entityMapperKey() const;
71 
75  void setUpdateSymbolOnChange(bool);
76  bool updateSymbolOnChange() const;
77 
78 signals:
79 
80  void updateSymbol();
81  void cancelActivated();
82  void createActivated(QVector<DtPoint>& points, QString name,
83  QString label, QColor color, int forceType,
84  int appearance, bool publish, QString attachTo, DtArchivableObject* userData, bool lastOne = true);
85  void editActivated(QString name, QString label, QColor color, int forceType,
86  int appearance, bool publish, DtArchivableObject* userData);
87  void heightOffsetChanged(double);
88 
90  void nameChanged();
91 
92 public slots:
93 
94  virtual void updateUnits(const QString&, const QString&, const QString&);
95  virtual void addPoint(const DtPoint& p);
96  virtual void editPoint(const DtPoint& p);
97  virtual void redisplayPoints();
98  virtual void cancelAndClose();
99  virtual void createAndClose();
100  virtual void editAndClose();
101  virtual void changePoint();
102  virtual void changeName(const QString& s);
103  virtual void changeDefaultZPoint(double h);
104  virtual void setHeightOffset(double h);
105 
110  virtual void userComplete(bool finish);
111 
112 private:
113 
116 
118  DtPointConfigWidget& operator=(const DtPointConfigWidget& orig);
119 
120 protected:
121 
123  virtual void keyPressEvent(QKeyEvent *e);
124  virtual bool initConnections(const DtTMMapArea* area);
125  virtual void addPointToList(const DtPoint& p);
126  virtual bool passNameCheck();
127  virtual bool shouldPublish() const;
128 
129  virtual void closeEvent(QCloseEvent* c);
130 
133  virtual void symbolUpdated();
134 
135 public:
136  Ui::PointConfigWidgetUi myUiImpl;
137 
138 protected:
139  QVector<DtPoint> myDisplayPoints;
140 
143 
145 
146  QVector<DtPoint>* myPointList;
147 
148  QString* myObjectNamePtr;
149  QString* myLabelPtr;
150 
153 
156 
159 
160  bool myClosing;
161 
164 
167 };
168 
170 {
171  return myEntityMapperKey;
172 }
173 
175 {
176  return myEditNotCreate;
177 }
178 
180 {
182 }
183 
185 {
186  return myUpdateSymbolOnChange;
187 }
188 
189 #endif

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)