VR-Forces 5.0.3 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 
39  {
40  }
41 
44  {
45  }
46 
50  virtual void setHasMapFocus(bool) = 0;
51  virtual void setCanTakeMapFocus(bool) = 0;
52  virtual bool canTakeMapFocus() const = 0;
53  virtual bool hasMapFocus() const = 0;
54 
56  virtual makVrv::DtQtCursor cursorForSelectionStatus(SelectionStatus) const = 0;
57 
59  virtual bool compactMode() const = 0;
60 
62  virtual SelectionStatus selectionStatusFor(makVrv::DtUniqueID id) const = 0;
63 
64  boost::signals2::signal<void (DtMapFocusHandlerInterface*, bool)> signal_canTakeMapFocusChanged;
65  boost::signals2::signal<void (DtMapFocusHandlerInterface*)> signal_selectionChangedByMapSelection;
67  };
68 
75  {
76  public:
77  //CTOR
79 
80  //DTOR
81  virtual ~DtMapFocusHandler();
82 
86  virtual void addMapFocusHandler(DtMapFocusHandlerInterface*, int index = -1);
87 
91  virtual void removeMapFocusHandler(DtMapFocusHandlerInterface*);
92 
95  virtual void focusToNext();
96 
98  virtual void removeAndDisconnectAll();
99 
101  virtual void resetFocus();
102 
104  virtual void takeMapFocus(DtMapFocusHandlerInterface*);
105 
106  std::vector<DtMapFocusHandlerInterface*>& managedViews() { return myManagedViews; };
107  const std::vector<DtMapFocusHandlerInterface*>& managedViews() const { return myManagedViews; };
108 
109  virtual DtMapFocusHandlerInterface* hasMapFocus() const;
110 
111  virtual void setAllowCursorChange(bool);
112  bool allowCursorChange() const
113  {
114  return myAllowCursorChange;
115  }
116 
118  virtual DtMapFocusHandlerInterface::SelectionStatus selectionStatusFor(makVrv::DtUniqueID id) const;
119 
121  virtual makVrv::DtQtCursor cursorForSelectionStatus(DtMapFocusHandlerInterface::SelectionStatus) const;
122 
123  protected:
124  virtual void onCanTakeMapFocusChanged(DtMapFocusHandlerInterface*, bool);
125  virtual void onSelectionChangedByMapSelection(DtMapFocusHandlerInterface*);
126  virtual void updateMainMapFocusHandler();
127 
128  protected:
129  std::vector<DtMapFocusHandlerInterface*> myManagedViews;
132  };
133 }
SelectionStatus
Definition: mapFocusHandler.h:30
makVrv::DtDe & myDe
Definition: mapFocusHandler.h:130
bool myAllowCursorChange
Definition: mapFocusHandler.h:131
std::vector< DtMapFocusHandlerInterface * > & managedViews()
Definition: mapFocusHandler.h:106
std::vector< DtMapFocusHandlerInterface * > myManagedViews
Definition: mapFocusHandler.h:129
virtual ~DtMapFocusHandlerInterface()
DTOR.
Definition: mapFocusHandler.h:43
DtMapFocusHandlerInterface()
CTOR.
Definition: mapFocusHandler.h:38
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:65
bool allowCursorChange() const
Definition: mapFocusHandler.h:112
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
Contains makVrv::DtQtCursor class.
const std::vector< DtMapFocusHandlerInterface * > & managedViews() const
Definition: mapFocusHandler.h:107
This class will manage filtered list views for the basic purpose of allowing a single list view in th...
Definition: mapFocusHandler.h:74
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:64
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:70

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)