VR-Forces 4.1 Class Documentation
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 #include <vrvCore/DtObserver.h>
20 
21 namespace makVrv
22 {
23  class DtDe;
24  class DtAttachWidgetInterface;
25  class DtAttachManager;
26  class DtDriverManager;
27  class DtInputDriver;
28  class DtObserver;
29 
33  {
34 
35  public:
36 
38  {
41  MultipleAttached
42  };
43 
45  {
48  MultipleSelection
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 enableMultipleAttachModes();
138 
140  void determineAttachState();
141 
143  void updateAttachStateToWidget();
144 
146  void determineSelectionState();
147 
149  void updateSelectionStateToWidget();
150 
151  const DtAttachManager::ElementTypeList& indexToAttachFilterType( int index );
152  int attachFilterTypeToIndex( const DtAttachManager::ElementTypeList& filterType );
153 
154  void updateAttachableParts();
155 
156  protected:
157 
164  };
165 
169  {
170  public:
171 
173  static DtAttachWidgetLogicCreator& instance(DtDe&);
174 
176  static void registerInstance(DtDe& de, DtAttachWidgetLogicCreator* instance);
177 
180 
182  virtual ~DtAttachWidgetLogicCreator();
183 
185  virtual DtVirtualBaseClass* create(DtDe& de, DtAttachWidgetInterface& iFace );
186  };
187 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)