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);
172 bool getViewTitleExists(
const std::string& _title)
const;
181 bool getAnyViewContentModified(
void);
186 WidgetView* getCurrentlyFocusedView(
void)
const;
198 void slotViewFocused(ads::CDockWidget* _oldFocus, ads::CDockWidget* _newFocus);
199 void slotViewCloseRequested(
void);
200 void slotUpdateViewVisibility(
void);
204 DefaultState = 0 << 0,
205 InsertViewState = 1 << 0
207 typedef Flags<ManagerState> ManagerStateFlags;
211 WidgetView* lastCentral;
212 WidgetView* lastSide;
213 WidgetView* lastTool;
217 ~WidgetViewManager();
219 bool getViewExists(
const ViewNameTypeListEntry& _entry)
const;
221 WidgetView* findView(
const ViewNameTypeListEntry& _entry)
const;
227 bool addViewImpl(
const BasicServiceInformation& _owner, WidgetView* _view,
const WidgetView::InsertFlags& _insertFlags, WidgetView* _parentView);
229 ads::CDockAreaWidget* getBestDockArea(
const WidgetView* _view)
const;
230 ads::CDockAreaWidget* getFirstMatchingView(WidgetViewBase::ViewFlag _viewTypeFlag)
const;
232 ViewNameTypeList* findViewNameTypeList(
const BasicServiceInformation& _owner);
233 ViewNameTypeList* findOrCreateViewNameTypeList(
const BasicServiceInformation& _owner);
235 WidgetViewDockManager* m_dockManager;
236 QAction* m_dockToggleRoot;
238 ManagerStateFlags m_state;
239 ManagerConfigFlags m_config;
241 FocusInfo m_focusInfo;
243 std::map<BasicServiceInformation, ViewNameTypeList*> m_viewOwnerMap;
244 std::list<ViewEntry> m_views;
#define OT_ADD_PRIVATE_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided private 32 bit bitfield. Use this at the bot...
Definition Flags.h:74
#define OT_ADD_FLAG_FUNCTIONS(___enumName)
Will add the default bitwise operations for the provided 32 bit bitfield. Use this at the bottom of t...
Definition Flags.h:60
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
This class is used to manage flags. Don't forget to add OT_ADD_FLAG_FUNCTIONS and the bottom of your ...
Definition Flags.h:91
Definition WidgetView.h:22
@ NoFlags
Definition FoundationTypes.h:7