25 #ifndef IMG_GUI_OVERLAY_MANAGER_HH
26 #define IMG_GUI_OVERLAY_MANAGER_HH
44 namespace ost {
namespace img {
namespace gui {
46 class DataViewerPanel;
52 ov(),id(0),visible(
true),locked(
false) {}
54 OverlayInfo(
const OverlayPtr& o,
int i,
bool v):
55 ov(o), id(i), visible(v),locked(
false) {}
63 typedef std::vector<OverlayInfo> OverlayList;
65 typedef std::list<OverlayManagerObserver*> ObserverList;
78 int AddOverlay(
const OverlayPtr& ov,
bool make_active=
true);
81 void ActivateOverlay(
const String& name);
83 void ActivateOverlay(
int id);
86 void SetOverlayVisibility(
const String& name,
bool visible);
88 void SetOverlayVisibility(
int id,
bool visible);
91 void SetOverlayLock(
const String& name,
bool visible);
93 void SetOverlayLock(
int id,
bool visible);
104 std::vector<int> GetIDList()
const;
107 void DeleteOverlay(
const String& name);
109 void DeleteOverlay(
int id);
111 void DeleteAllOverlays();
113 void DeleteActiveOverlay();
117 bool OnMouseEvent(QMouseEvent* e,
DataViewerPanel* dvp,
const QPoint& lastmouse)
const;
121 bool IsVisible(
const String& name);
122 bool IsVisible(
int id);
123 bool IsLocked(
const String& name);
124 bool IsLocked(
int id);
125 bool IsActive(
const String& name);
126 bool IsActive(
int id);
127 String GetOverlayName(
int id);
128 int GetOverlayId(
const String& name);
130 void RequestRedraw();
134 OverlayList ov_list_;
139 ObserverList obs_list_;
141 OverlayList::iterator find_ov(
int id);
142 OverlayList::iterator find_ov(
const String& name);
143 OverlayList::iterator find_ov(
OverlayPtr anoverlay);
boost::shared_ptr< Overlay > OverlayPtr
#define DLLEXPORT_OST_GUI
Abstract observer base class for the OverlayManager.