47 #ifndef _MIRA_WORKBENCH_H_ 48 #define _MIRA_WORKBENCH_H_ 52 #include <QSignalMapper> 53 #include <QMainWindow> 68 class PerspectiveTabWidget;
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);
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);
209 virtual std::list<IWorkbenchPart*>
getEditors(
bool backToFront =
false);
213 std::set<IPartListener*> mPartListeners;
void activatePerspective(Perspective *perspective)
void createMinimizedDockArea(Qt::DockWidgetArea area)
boost::shared_ptr< XMLDom > XMLDomPtr
Definition: Workbench.h:228
A STL conform wrapper for libxml2 to read XML files as DOM.
Definition: XMLDom.h:74
virtual void onEditorDestroyed(EditorPart *editor)
#define MIRA_DEFINE_EXCEPTION(Ex, Base)
Macro for easily defining a new compatible exception class.
Definition: Exception.h:166
The class proxy assures that the pointer to the class object is always valid.
Definition: Class.h:400
virtual IWorkbenchPart * getActiveEditor()
Returns the currently active editor part, or NULL, if no editor is active.
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:230
std::list< EditorPart * > mEditorParts
Definition: Workbench.h:147
Definition: XMLSerializer.h:122
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void reflect(XMLSerializer &r)
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
virtual void onEditorCreated(EditorPart *editor)
virtual void loadWorkspace(const std::string &file)
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
void cleanupWorkspace()
removes all perspectives
Perspective(const std::string &name)
Definition: Workbench.h:106
std::map< std::string, ViewPart * > mCreatedViews
Definition: Workbench.h:149
QMenu * createPopupMenu()
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$ ...
bool isDockAreaMinimized(Qt::DockWidgetArea area)
virtual void onWindowTitleChanged(EditorPartWindow *editor)
Perspective()
Definition: Workbench.h:105
Definition: EditorPartWindow.h:61
Definition: PartListener.h:56
Definition: Workbench.h:70
void restoreDockArea(Qt::DockWidgetArea area)
Perspective * addPerspective(std::string name)
QDockWidget * dock
Definition: Workbench.h:155
QWidget * restorePart(ClassProxy partClass, const XMLDom &xml)
virtual void removePartListener(IPartListener *listener)
void reflect(Reflector &r)
Definition: Workbench.h:114
QWidget * createPart(ClassProxy partClass)
A view is typically used to display information or properties.
Definition: ViewPart.h:69
void storePartMemory(ViewPart *part)
virtual void saveWorkspace(const std::string &file)
Base class for exceptions.
Definition: Exception.h:195
void minimizeDockArea(Qt::DockWidgetArea area)
QBoxLayout * layout
Definition: Workbench.h:157
Definition: WorkbenchPart.h:88
std::map< QDockWidget *, MinimizedDockWidgetState > mMinimizedDockWidgetStates
Definition: Workbench.h:169
The primary interface between a workbench part and the workbench.
Definition: WorkbenchPart.h:67
std::list< PerspectivePtr > mPerspectives
Definition: Workbench.h:151
XMLSerializer and XMLDeserializer.
virtual std::list< IWorkbenchPart * > getEditors(bool backToFront=false)
Returns a list of all editors of this workbench site.
QWidget * widget
Definition: Workbench.h:156
QSignalMapper * mDockRestoreMapper
Definition: Workbench.h:162
virtual void onEditorWindowActivated(EditorPartWindow *window)
Generic buffer class that can be used as a replacement for std::vector.
void removePerspective(Perspective *perspective)
Workbench(bool setupUi=true)
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.
virtual void addPartListener(IPartListener *listener)
Deserializer for serializing objects from XML format.
Definition: XMLSerializer.h:314