VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
mapFocusHandler.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vrvCoreQt/DtQtCursor.h>
15 #include <vrvCore/DtUniqueID.h>
16 
17 #include <vector>
18 
19 namespace makVrv
20 {
21  class DtDe;
22 }
23 
24 namespace makVrf
25 {
28  {
29  public:
31  {
32  Unknown = 0,
33  Valid = 1,
34  Invalid = 2
35  };
36 
38  {
40  MapArea = 1
41  };
42 
45  {
46  }
47 
50  {
51  }
52 
56  virtual void setHasMapFocus(bool) = 0;
57  virtual void setCanTakeMapFocus(bool) = 0;
58  virtual bool canTakeMapFocus() const = 0;
59  virtual bool hasMapFocus() const = 0;
60 
62  virtual makVrv::DtQtCursor cursorForSelectionStatus(SelectionStatus, CursorOver) const = 0;
63 
65  virtual SelectionStatus selectionStatusFor(makVrv::DtUniqueID id, CursorOver) const = 0;
66 
67  boost::signals2::signal<void (DtMapFocusHandlerInterface*, bool)> signal_canTakeMapFocusChanged;
68  boost::signals2::signal<void (DtMapFocusHandlerInterface*)> signal_selectionChangedByMapSelection;
70  };
71 
78  {
79  public:
80  //CTOR
82 
83  //DTOR
84  virtual ~DtMapFocusHandler();
85 
89  virtual void addMapFocusHandler(DtMapFocusHandlerInterface*, int index = -1);
90 
94  virtual void removeMapFocusHandler(DtMapFocusHandlerInterface*);
95 
98  virtual void focusToNext(bool becauseOfRightClick = false);
99 
101  virtual void removeAndDisconnectAll();
102 
104  virtual void setAutoChangeToNext(bool);
105  bool autoChangeToNext() const
106  {
107  return myAutoChangeToNext;
108  }
109 
111  virtual void resetFocus();
112 
114  virtual void takeMapFocus(DtMapFocusHandlerInterface*);
115 
116  std::vector<DtMapFocusHandlerInterface*>& managedViews() { return myManagedViews; };
117  const std::vector<DtMapFocusHandlerInterface*>& managedViews() const { return myManagedViews; };
118 
119  virtual DtMapFocusHandlerInterface* hasMapFocus() const;
120 
121  virtual void setAllowCursorChange(bool);
122  bool allowCursorChange() const
123  {
124  return myAllowCursorChange;
125  }
126 
129 
132 
133  protected:
134  virtual void onCanTakeMapFocusChanged(DtMapFocusHandlerInterface*, bool);
135  virtual void onSelectionChangedByMapSelection(DtMapFocusHandlerInterface*);
136  virtual void updateMainMapFocusHandler();
137 
138  protected:
139  std::vector<DtMapFocusHandlerInterface*> myManagedViews;
143  };
144 }
SelectionStatus
Definition: mapFocusHandler.h:30
makVrv::DtDe & myDe
Definition: mapFocusHandler.h:140
bool autoChangeToNext() const
Definition: mapFocusHandler.h:105
bool myAllowCursorChange
Definition: mapFocusHandler.h:141
std::vector< DtMapFocusHandlerInterface * > & managedViews()
Definition: mapFocusHandler.h:116
std::vector< DtMapFocusHandlerInterface * > myManagedViews
Definition: mapFocusHandler.h:139
virtual ~DtMapFocusHandlerInterface()
DTOR.
Definition: mapFocusHandler.h:49
CursorOver
Definition: mapFocusHandler.h:37
DtMapFocusHandlerInterface()
CTOR.
Definition: mapFocusHandler.h:44
boost::signals2::signal< void(DtMapFocusHandlerInterface *)> signal_selectionChangedByMapSelection
Methods implemented on behalf of being a map focus handler Sets whether or not the focus button has a...
Definition: mapFocusHandler.h:68
bool allowCursorChange() const
Definition: mapFocusHandler.h:122
Qt implementation of the cursor class. Will keep track of the Qt cursor.
Definition: DtQtCursor.h:24
#define DT_DLL_VRFGUICOMMONQT
Definition: vrfGuiCommonQt.h:20
Base class that must be implemented by items that wish to be part of a map focus handler chain...
Definition: mapFocusHandler.h:27
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtQtCursor class.
const std::vector< DtMapFocusHandlerInterface * > & managedViews() const
Definition: mapFocusHandler.h:117
std::vector< ObjectInformation * > ObjectList
Map by name of objects in the scenario.
Definition: createObjectParser.h:42
bool myAutoChangeToNext
Definition: mapFocusHandler.h:142
This class will manage filtered list views for the basic purpose of allowing a single list view in th...
Definition: mapFocusHandler.h:77
Contains makVrv::DtUniqueID type.
boost::signals2::signal< void(DtMapFocusHandlerInterface *, bool)> signal_canTakeMapFocusChanged
Methods implemented on behalf of being a map focus handler Sets whether or not the focus button has a...
Definition: mapFocusHandler.h:67
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

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)