VR-Forces 4.6 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 
171  };
172 
176  {
177  public:
178 
180  static DtAttachWidgetLogicCreator& instance(DtDe&);
181 
183  static void registerInstance(DtDe& de, DtAttachWidgetLogicCreator* instance);
184 
187 
189  virtual ~DtAttachWidgetLogicCreator();
190 
192  virtual DtVirtualBaseClass* create(DtDe& de, DtAttachWidgetInterface& iFace );
193  };
194 }

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)