VR-Forces Development_Version 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 
105  protected:
106  virtual void onCanTakeMapFocusChanged(DtMapFocusHandler*, bool);
107  virtual void onSelectionChangedByMapSelection(DtMapFocusHandler*);
108 
109  protected:
110  std::vector<DtMapFocusHandler*> myManagedViews;
112  };
113 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)