VR-Forces 4.1.1 Class Documentation
overlayPublisherHandler.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: overlayPublisherHandler.h,v $ $Revision: 1.17 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef DTOVERLAYPUBLISHERHANDLER_H_
13 #define DTOVERLAYPUBLISHERHANDLER_H_
14 
15 #include "tmqt/eventHandler.h"
16 #include "ngutil/entityMapperKey.h"
17 #include "geometry/point.h"
18 
19 #include <QtCore/QStringList>
20 
21 class DtEntityMapperKey;
22 class DtEntityIdentifier;
23 class DtModelData;
25 class DtTerrainModelData;
26 class DtList;
27 class DtSymbol;
28 
31 {
32  Q_OBJECT
33 
34 public:
35 
38 
40  virtual ~DtOverlayPublisherHandler();
41 
42 public:
50  virtual void create(const DtOverlaySymbolDescriptor* desc, QString name, QString label, QColor color,
51  QVector<DtPoint>& pnts, const DtEntityMapperKey& key, int force, int appearance, bool publish,
52  const QString& attachTo, DtArchivableObject* userData, const DtTerrainModelData* data = NULL);
53 
54  virtual void edit(QString name, QString label, QColor color, QVector<DtPoint>& pnts,
55  DtModelData* data, int force, int appearance, bool publish, DtArchivableObject* userData);
56 
57  virtual bool canPublish() const;
58  virtual bool isPublished(const DtModelData* data) const;
59 
62  virtual QString generateName(const QString& baseName, const DtOverlaySymbolDescriptor* desc = NULL) const;
63 
64  virtual void getVertices(QVector<DtPoint>& modelPoints, const DtModelData* data) const;
65 
68  virtual void reparentOverlayObject(const QString& oldParent, const QString& newParent,
69  const DtModelKey& objectKey, int iIndex);
70 
73  void setEmitCreateSignal(bool);
74  bool emitCreateSignal() const;
75 
76  void setObjectType(const DtEntityMapperKey&);
77 
78 public:
80  static DtEventHandler* create(DtEventController* owner, void* usr);
81  static QString generateKey();
82 
89  virtual QStringList parents(const DtEntityMapperKey& key, bool published, QString overlayName = "");
90 
91 signals:
93  void creationSignal(const DtString& name,
94  const DtEntityMapperKey& type,
95  const DtList& vertices,
96  const DtString& label,
97  int appearance,
98  int force,
99  bool projection,
100  bool closedFigure,
101  DtReal heading,
102  bool createSubObjects,
103  DtSymbol* tempSymbol);
104 
105  void editSignal(const DtString& name,
106  const DtEntityMapperKey& type,
107  const DtList& vertices,
108  const DtString& label,
109  int appearance,
110  int force,
111  DtReal heading,
112  DtSymbol* tempSymbol);
113 
114 protected:
115  static int gNumObjectsCreated;
116  static int gNumKeysGenerated;
117 
119 
122 };
123 
125 {
127 }
128 
130 {
131  myEmitCreateSignal = b;
132 }
133 
135 {
136  return myEmitCreateSignal;
137 }
138 
139 #endif //DTOVERLAYPUBLISHERHANDLER_H_

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)