VR-Forces Developer's Guide
 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 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
18 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtAttachWidgetInterface;
23  class DtAttachManager;
24  class DtDriverManager;
25  class DtInputDriver;
26  class DtObserver;
27 
31  {
32 
33  public:
34 
36  {
40  ObserverAttached
41  };
42 
44  {
48  ObserverSelection
49  };
50 
52 
54  virtual ~DtAttachWidgetLogic();
55 
56  protected:
57 
59  virtual void detach();
60 
62  virtual void attachNext();
63 
65  virtual void attachPrevious();
66 
68  virtual void attachToPart(const std::string& partName);
69 
71  virtual void setHideAttachedModel( bool hide );
72 
74  virtual void setAttachFilterType( int filterType );
75 
77  virtual void setCurrentObserver( const std::string& observerName );
78 
80  virtual void attachToSelected();
81 
83  virtual void attachSelectedByMode( int mode );
84 
86  virtual void setAttachMode( int mode );
87 
88  virtual void observerChanged( const std::string& observerName,
89  const DtUniqueID& id );
90 
91  virtual void slot_activate(DtDe* subject);
92 
93  virtual void slot_deactivate(DtDe* subject);
94 
95  protected:
96 
99 
101  void setCurrentObserver( DtObserver* observer );
102 
104  void onAttachedToChanged( DtObserver* observer );
105 
107  void onHideModelChanged( DtObserver* observer );
108 
110  void updateAttachedNames();
111 
113  virtual void onObserverAboutToBeDestroyed( DtInputDriver* driver,
114  DtObserver* observer );
115 
116  virtual void onCurrentObserverChanged( DtInputDriver* driver,
117  DtObserver* observer );
118 
120  void onAttachTypeChanged( DtObserver* observer );
121 
122  void onCurrentAttachFilterTypeChanged(
123  const DtAttachManager::ElementTypeList& filterType );
124 
126  virtual void onSelectionChanged( const DtSelectionManager::IdSet& selected,
127  const DtSelectionManager::IdSet& deselected );
128 
129  virtual void onIs2DChanged( int mode );
130 
131  virtual void onObserverModeChanged( DtObserver*, int mode );
132 
134  virtual void enableSingleAttachModes();
135 
137  virtual void enableObserverAttachModes();
138 
140  virtual void enableMultipleAttachModes();
141 
143  void determineAttachState();
144 
146  void updateAttachStateToWidget();
147 
149  void determineSelectionState();
150 
152  void updateSelectionStateToWidget();
153 
154  const DtAttachManager::ElementTypeList& indexToAttachFilterType( int index );
155  int attachFilterTypeToIndex( const DtAttachManager::ElementTypeList& filterType );
156 
157  void updateAttachableParts();
158 
159  protected:
160 
169  };
170 
174  {
175  public:
176 
178  static DtAttachWidgetLogicCreator& instance(DtDe&);
179 
181  static void registerInstance(DtDe& de, DtAttachWidgetLogicCreator* instance);
182 
185 
187  virtual ~DtAttachWidgetLogicCreator();
188 
190  virtual DtVirtualBaseClass* create(DtDe& de, DtAttachWidgetInterface& iFace );
191  };
192 }
Contains makVrv:DtAttachManager class.
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Contains makVrv::DtSubjectObserver class.
DtSignalConnectionManager myConnections
Definition: DtAttachWidgetLogic.h:168
Contains makVrv:DtSelectionManager class.
Definition: DtAttachWidgetLogic.h:47
Definition: DtAttachWidgetLogic.h:46
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Definition: DtAttachWidgetLogic.h:39
Abstract interface for the attach widget.
Definition: DtAttachWidgetInterface.h:22
Contains DLL export macros.
SelectionState
Definition: DtAttachWidgetLogic.h:43
Definition: DtAttachWidgetLogic.h:37
A facade for a DtObserverObject.
Definition: DtObserver.h:37
AttachState myAttachState
Definition: DtAttachWidgetLogic.h:164
DtDe & myDe
Definition: DtAttachWidgetLogic.h:161
Definition: DtAttachWidgetLogic.h:38
DtObserverObject::AttachType myAttachMode
Definition: DtAttachWidgetLogic.h:167
AttachState
Definition: DtAttachWidgetLogic.h:35
Contains makVrv::DtObserverObject class.
SelectionState mySelectionState
Definition: DtAttachWidgetLogic.h:165
The creator class.
Definition: DtAttachWidgetLogic.h:173
This class&#39;s main responsibility is to handle keyboard and mouse events from OSG (Qt events are route...
Definition: DtInputDriver.h:43
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
DtObserver * myCurrentObserver
Definition: DtAttachWidgetLogic.h:163
DtAttachWidgetInterface & myInterface
Definition: DtAttachWidgetLogic.h:162
const char int mode
Definition: ioapi.h:38
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
The logic for driving an attach widget.
Definition: DtAttachWidgetLogic.h:30
DtAttachManager::ElementTypeList myCurrentAttachFilterType
Definition: DtAttachWidgetLogic.h:166
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
Definition: DtAttachWidgetLogic.h:45
std::vector< DtElementEntry::ElementType > ElementTypeList
An Attach Manager Filter is a list of DtElementEntry::ElementType.
Definition: DtAttachManager.h:32
AttachType
Definition: DtObserverObject.h:39

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)