VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mapFocusHandlerManager.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 
13 #include <vrvUtil/signalslib.h>
14 
16 
17 #include <QtCore/QObject>
18 #include <vector>
19 
20 namespace makVrv
21 {
22  class DtDe;
23 }
24 
25 namespace makVrf
26 {
29  {
30  public:
33  : myMapFocusSelectedByUser(false)
34  {
35  }
36 
38  virtual ~DtMapFocusHandler()
39  {
40  }
41 
45  virtual void setHasMapFocus(bool) = 0;
46  virtual void setCanTakeMapFocus(bool) = 0;
47  virtual bool canTakeMapFocus() const = 0;
48  virtual bool hasMapFocus() const = 0;
49 
51  virtual void clearMapFocusSelectedByUser()
52  {
53  myMapFocusSelectedByUser = false;
54  }
55 
56  virtual bool mapFocusSelectedByUser() const
57  {
58  return myMapFocusSelectedByUser;
59  }
60 
61  boost::signal<void (DtMapFocusHandler*, bool)> signal_canTakeMapFocusChanged;
62  boost::signal<void (DtMapFocusHandler*)> signal_selectionChangedByMapSelection;
64 
65  protected:
67  };
68 
75  {
76  Q_OBJECT
77 
78  public:
79  //CTOR
81 
82  //DTOR
83  virtual ~DtMapFocusHandlerManager();
84 
88  virtual void addMapFocusHandler(DtMapFocusHandler*, int index = -1);
89 
93  virtual void removeMapFocusHandler(DtMapFocusHandler*);
94 
97  virtual void focusToNext();
98 
100  virtual void removeAndDisconnectAll();
101 
103  virtual void resetFocus();
104 
106  virtual void takeMapFocus(DtMapFocusHandler*);
107 
108  std::vector<DtMapFocusHandler*>& managedViews() { return myManagedViews; };
109  const std::vector<DtMapFocusHandler*>& managedViews() const { return myManagedViews; };
110 
111  protected:
112  virtual void onCanTakeMapFocusChanged(DtMapFocusHandler*, bool);
113  virtual void onSelectionChangedByMapSelection(DtMapFocusHandler*);
114  virtual bool eventFilter(QObject *obj, QEvent *ev);
115 
116  protected:
117  std::vector<DtMapFocusHandler*> myManagedViews;
119  };
120 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)