DockWidget: decouple more from QtWidgets
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "controllers/Stack.h"
|
||||
#include "controllers/TitleBar.h"
|
||||
#include "controllers/TabBar.h"
|
||||
#include "controllers/MainWindow.h"
|
||||
|
||||
#include <QWidget> // TODOv2 remove
|
||||
|
||||
@@ -229,6 +230,14 @@ Controllers::DockWidget *View::asDockWidgetController() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Controllers::MainWindow *View::asMainWindowController() const
|
||||
{
|
||||
if (m_controller && m_controller->is(Type::MainWindow))
|
||||
return qobject_cast<Controllers::MainWindow *>(m_controller);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool View::equals(const View *other) const
|
||||
{
|
||||
return other && handle() == other->handle();
|
||||
|
||||
Reference in New Issue
Block a user