VR-Forces 4.1 Class Documentation
DtMapFocusHandlerManager.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 <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 
102  protected:
103  virtual void onCanTakeMapFocusChanged(DtMapFocusHandler*, bool);
104  virtual void onSelectionChangedByMapSelection(DtMapFocusHandler*);
105 
106  protected:
107  std::vector<DtMapFocusHandler*> myManagedViews;
109  };
110 }

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)