17#include <ads/DockWidget.h>
20#include <QtCore/qobject.h>
21#include <QtCore/qbytearray.h>
30 class CDockAreaWidget;
44 typedef std::pair<BasicServiceInformation, ot::WidgetView*>
ViewEntry;
48 InputFocusCentralViewOnFocusChange = 1 << 0,
49 InputFocusSideViewOnFocusChange = 1 << 1,
50 InputFocusToolViewOnFocusChange = 1 << 2,
51 IgnoreInputFocusOnViewInsert = 1 << 3,
54 InputFocusOnAnyViewFocusChange = InputFocusCentralViewOnFocusChange | InputFocusSideViewOnFocusChange | InputFocusToolViewOnFocusChange,
57 InputFocusOnFocusChangeMask = ~InputFocusOnAnyViewFocusChange,
64 UseBestAreaFinderOnViewInsert = 1 << 4
97 WidgetView* findViewFromTitle(
const std::string& _viewTitle)
const;
104 WidgetView* getViewFromDockWidget(ads::CDockWidget* _dock)
const;
122 void closeViews(
void);
143 void setCurrentViewFromTitle(
const std::string& _viewTitle);
147 std::string saveState(
int _version = 0)
const;
152 bool restoreState(std::string _state,
int _version = 0);
168 WidgetView* findViewFromWidget(QWidget* _widget)
const;
176 bool getViewTitleExists(
const std::string& _title)
const;
185 bool getAnyViewContentModified(
void);
190 WidgetView* getCurrentlyFocusedView(
void)
const;
204 void slotViewFocused(ads::CDockWidget* _oldFocus, ads::CDockWidget* _newFocus);
205 void slotViewCloseRequested(
void);
206 void slotUpdateViewVisibility(
void);
207 void slotViewTabClicked(
void);
208 void slotViewDataModifiedChanged(
void);
212 DefaultState = 0 << 0,
213 InsertViewState = 1 << 0,
214 CloseViewState = 1 << 1,
215 MulticloseViewState = 1 << 2
227 ~WidgetViewManager();
229 bool getViewExists(
const ViewNameTypeListEntry& _entry)
const;
231 WidgetView* findView(
const ViewNameTypeListEntry& _entry)
const;
237 bool addViewImpl(
const BasicServiceInformation& _owner, WidgetView* _view,
const WidgetView::InsertFlags& _insertFlags, WidgetView* _parentView);
239 ads::CDockAreaWidget* getBestDockArea(
const WidgetView* _view)
const;
240 ads::CDockAreaWidget* getFirstMatchingView(WidgetViewBase::ViewFlag _viewTypeFlag)
const;
242 ViewNameTypeList* findViewNameTypeList(
const BasicServiceInformation& _owner);
243 ViewNameTypeList* findOrCreateViewNameTypeList(
const BasicServiceInformation& _owner);
245 WidgetViewDockManager* m_dockManager;
246 QAction* m_dockToggleRoot;
248 ManagerStateFlags m_state;
249 ManagerConfigFlags m_config;
251 FocusInfo m_focusInfo;
253 std::map<BasicServiceInformation, ViewNameTypeList*> m_viewOwnerMap;
254 std::list<ViewEntry> m_views;
#define OT_ADD_FRIEND_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided private 32/64 bit bitfield....
Definition Flags.h:182
#define OT_ADD_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided private 32/64 bit bitfield....
Definition Flags.h:129
This file contains defines that may be used simplyfy class creation.
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
The Flags class is a wrapper around a enum that allows bitwise operations (flags)....
Definition Flags.h:214
Definition WidgetView.h:23