Files
Sourcetrail/src/app/qt/element/QtMainWindow.h
T
Eberhard Graether fdba1b2a84 ui: Abstracting the UI on view level instead of element level
This change switches the view creation architecture from element based creation in the lib to view based creation in the
app. This avoids wrapping of the Qt elements and instead defines interfaces for the different View implementations.

* GuiElementFactory was renamed to GuiFactory and is now responsible for View creation instead of Element creation.
* WidgetWrappers are now used on Views to access their root widget.
* Removed DummyView and DummyController.
* Removed GuiElement and corresponding QtElement files.
* Removed ViewManager, functionality is now handled via MainView.
* Added MainView, where Views are registered via the ViewLayout interface.
* Added QtMainWindow, derived from QMainWindow and instantiated by QtMainView, which displays the Views as QDockWidgets.

fortune cookie message = All your hard work will soon pay off.
2014-07-02 12:25:51 +02:00

28 lines
410 B
C++

#ifndef QT_MAIN_WINDOW_H
#define QT_MAIN_WINDOW_H
#include <utility>
#include <vector>
#include <QtWidgets/QMainWindow>
class QDockWidget;
class View;
class QtMainWindow: public QMainWindow
{
Q_OBJECT
public:
QtMainWindow();
~QtMainWindow();
void addView(View* view);
void removeView(View* view);
private:
std::vector<std::pair<View*, QDockWidget*> > m_dockWidgets;
};
#endif // QT_MAIN_WINDOW_H