VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtAttachWidgetLogic.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtAttachWidgetLogic.h,v $ $Revision: 1.29 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #pragma once
14 
15 #include <vrvCoreQt/vrvCoreQt.h>
16 
21 
22 namespace makVrv
23 {
24  class DtDe;
25  class DtAttachWidgetInterface;
26  class DtAttachManager;
27  class DtDriverManager;
28  class DtInputDriver;
29  class DtObserver;
30 
34  {
35 
36  public:
37 
39  {
43  ObserverAttached
44  };
45 
47  {
51  ObserverSelection
52  };
53 
55 
57  virtual ~DtAttachWidgetLogic();
58 
59  protected:
60 
62  virtual void detach();
63 
65  virtual void attachNext();
66 
68  virtual void attachPrevious();
69 
71  virtual void attachToPart(const std::string& partName);
72 
74  virtual void setHideAttachedModel( bool hide );
75 
77  virtual void setAttachFilterType( int filterType );
78 
80  virtual void setCurrentObserver( const std::string& observerName );
81 
83  virtual void attachToSelected();
84 
86  virtual void attachSelectedByMode( int mode );
87 
89  virtual void setAttachMode( int mode );
90 
91  virtual void observerChanged( const std::string& observerName,
92  const DtUniqueID& id );
93 
94  virtual void slot_activate(DtDe* subject);
95 
96  virtual void slot_deactivate(DtDe* subject);
97 
98  protected:
99 
102 
104  void setCurrentObserver( DtObserver* observer );
105 
107  void onAttachedToChanged( DtObserver* observer );
108 
110  void onHideModelChanged( DtObserver* observer );
111 
113  void updateAttachedNames();
114 
116  virtual void onObserverAboutToBeDestroyed( DtInputDriver* driver,
117  DtObserver* observer );
118 
119  virtual void onCurrentObserverChanged( DtInputDriver* driver,
120  DtObserver* observer );
121 
123  void onAttachTypeChanged( DtObserver* observer );
124 
125  void onCurrentAttachFilterTypeChanged(
126  const DtAttachManager::ElementTypeList& filterType );
127 
129  virtual void onSelectionChanged( const DtSelectionManager::IdSet& selected,
130  const DtSelectionManager::IdSet& deselected );
131 
132  virtual void onIs2DChanged( int mode );
133 
134  virtual void onObserverModeChanged( DtObserver*, int mode );
135 
137  virtual void enableSingleAttachModes();
138 
140  virtual void enableObserverAttachModes();
141 
143  virtual void enableMultipleAttachModes();
144 
146  void determineAttachState();
147 
149  void updateAttachStateToWidget();
150 
152  void determineSelectionState();
153 
155  void updateSelectionStateToWidget();
156 
157  const DtAttachManager::ElementTypeList& indexToAttachFilterType( int index );
158  int attachFilterTypeToIndex( const DtAttachManager::ElementTypeList& filterType );
159 
160  void updateAttachableParts();
161 
162  protected:
163 
172  };
173 
177  {
178  public:
179 
181  static DtAttachWidgetLogicCreator& instance(DtDe&);
182 
184  static void registerInstance(DtDe& de, DtAttachWidgetLogicCreator* instance);
185 
188 
190  virtual ~DtAttachWidgetLogicCreator();
191 
193  virtual DtVirtualBaseClass* create(DtDe& de, DtAttachWidgetInterface& iFace );
194  };
195 }
Contains makVrv:DtAttachManager class.
Virtual base class.
Definition: DtVirtualBaseClass.h:22
Contains makVrv::DtSubjectObserver class.
DtSignalConnectionManager myConnections
Definition: DtAttachWidgetLogic.h:171
Contains makVrv:DtSelectionManager class.
Definition: DtAttachWidgetLogic.h:50
Definition: DtAttachWidgetLogic.h:49
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Definition: DtAttachWidgetLogic.h:42
Abstract interface for the attach widget.
Definition: DtAttachWidgetInterface.h:25
Contains DLL export macros.
SelectionState
Definition: DtAttachWidgetLogic.h:46
Definition: DtAttachWidgetLogic.h:40
A facade for a DtObserverObject.
Definition: DtObserver.h:37
AttachState myAttachState
Definition: DtAttachWidgetLogic.h:167
DtDe & myDe
Definition: DtAttachWidgetLogic.h:164
Definition: DtAttachWidgetLogic.h:41
DtObserverObject::AttachType myAttachMode
Definition: DtAttachWidgetLogic.h:170
AttachState
Definition: DtAttachWidgetLogic.h:38
Contains makVrv::DtObserverObject class.
SelectionState mySelectionState
Definition: DtAttachWidgetLogic.h:168
The creator class.
Definition: DtAttachWidgetLogic.h:176
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:44
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
DtObserver * myCurrentObserver
Definition: DtAttachWidgetLogic.h:166
DtAttachWidgetInterface & myInterface
Definition: DtAttachWidgetLogic.h:165
const char int mode
Definition: ioapi.h:38
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
The logic for driving an attach widget.
Definition: DtAttachWidgetLogic.h:33
DtAttachManager::ElementTypeList myCurrentAttachFilterType
Definition: DtAttachWidgetLogic.h:169
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
Definition: DtAttachWidgetLogic.h:48
std::vector< DtElementEntry::ElementType > ElementTypeList
An Attach Manager Filter is a list of DtElementEntry::ElementType.
Definition: DtAttachManager.h:35
AttachType
Definition: DtObserverObject.h:36

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)