47 #ifndef _MIRA_WORKBENCH_H_ 48 #define _MIRA_WORKBENCH_H_ 52 #include <QSignalMapper> 53 #include <QMainWindow> 68 class PerspectiveTabWidget;
94 virtual void saveWorkspace(
const std::string&
file);
95 virtual void loadWorkspace(
const std::string&
file);
98 void cleanupWorkspace();
108 const std::string
getName()
const {
return mName; }
109 void setName(
const std::string& name) { mName = name; }
113 template <
typename Reflector>
116 r.member(
"Name", mName,
"");
117 r.member(
"State", mState,
"");
130 void setupNewViewPart(
ViewPart* viewPart);
131 void setupNewEditorPart(
EditorPart* editorPart);
133 void clearWorkspaceParts();
134 void storeCurrentPerspective();
135 void storeCurrentPerspective(
Perspective* perspective);
140 bool isDockAreaMinimized(Qt::DockWidgetArea area);
141 void minimizeDockArea(Qt::DockWidgetArea area);
142 void restoreDockArea(Qt::DockWidgetArea area);
171 void createMinimizedDockArea(Qt::DockWidgetArea area);
175 QMenu* createPopupMenu();
181 void activatePerspective(
Perspective* perspective);
185 bool onChangedPerspective(
Perspective* perspective);
186 void onMovedPerspective(
int from,
int to);
187 void onViewDestroyed(
ViewPart* view);
188 void onViewActivated(
ViewPart* view);
189 void onViewMinimizedRequested(
ViewPart* view);
190 void onViewDockLocationChanged(Qt::DockWidgetArea area);
191 void onViewRestore(QWidget* view);
194 virtual void onEditorCreated(
EditorPart* editor);
195 virtual void onEditorDestroyed(
EditorPart* editor);
209 virtual std::list<IWorkbenchPart*> getEditors(
bool backToFront =
false);
213 std::set<IPartListener*> mPartListeners;
218 void savePartMemory();
219 void loadPartMemory();
223 void storePartMemory(
ViewPart* part);
boost::shared_ptr< XMLDom > XMLDomPtr
Definition: Workbench.h:228
A STL conform wrapper for libxml2 to read XML files as DOM.
Definition: XMLDom.h:73
#define MIRA_DEFINE_EXCEPTION(Ex, Base)
Macro for easily defining a new compatible exception class.
Definition: Exception.h:165
The class proxy assures that the pointer to the class object is always valid.
Definition: Class.h:400
PropertyHint file(const std::string &filters=std::string(), bool save=false)
Tells the property editor that the path is for a file, and that it should show a "File Open"/"File Sa...
Definition: Path.h:247
std::list< EditorPart * > mEditorParts
Definition: Workbench.h:147
Definition: XMLSerializer.h:121
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
An editor is typically used to edit or browse data or objects.
Definition: EditorPart.h:69
Definition: Workbench.h:102
bool minimized
Definition: Workbench.h:158
boost::shared_ptr< Perspective > PerspectivePtr
Definition: Workbench.h:126
Perspective * mCurrentPerspective
Definition: Workbench.h:152
void setName(const std::string &name)
Definition: Workbench.h:109
const std::string getName() const
Definition: Workbench.h:108
Perspective(const std::string &name)
Definition: Workbench.h:106
std::map< std::string, ViewPart * > mCreatedViews
Definition: Workbench.h:149
Definition: Workbench.h:154
Declaration of the ViewPart.
std::list< ViewPart * > mViewParts
Definition: Workbench.h:146
$Header file containing base classes to enable class creation using a class factory$ ...
Perspective()
Definition: Workbench.h:105
Definition: EditorPartWindow.h:63
Definition: PartListener.h:56
Definition: Workbench.h:70
QDockWidget * dock
Definition: Workbench.h:155
void reflect(Reflector &r)
Definition: Workbench.h:114
void reflect(Reflector &r, LogRecord &record)
Non-intrusive reflector for LogRecord.
Definition: LoggingCore.h:136
A view is typically used to display information or properties.
Definition: ViewPart.h:69
Base class for exceptions.
Definition: Exception.h:194
QBoxLayout * layout
Definition: Workbench.h:157
Definition: WorkbenchPart.h:89
std::map< QDockWidget *, MinimizedDockWidgetState > mMinimizedDockWidgetStates
Definition: Workbench.h:169
The primary interface between a workbench part and the workbench.
Definition: WorkbenchPart.h:68
std::list< PerspectivePtr > mPerspectives
Definition: Workbench.h:151
XMLSerializer and XMLDeserializer.
QWidget * widget
Definition: Workbench.h:156
#define MIRA_GUI_RCP_EXPORT
Definition: GuiRCPExports.h:61
QSignalMapper * mDockRestoreMapper
Definition: Workbench.h:162
Generic buffer class that can be used as a replacement for std::vector.
std::map< Qt::DockWidgetArea, MinimizedDockArea > mMinimizedDockAreas
Definition: Workbench.h:161
std::map< std::string, XMLDomPtr > mPartMemory
Definition: Workbench.h:229
Declaration of the EditorPart class.
Declaration of WorkbenchPart and related interfaces.
Deserializer for serializing objects from XML format.
Definition: XMLSerializer.h:313