src: replaced gui wording with view wording
Changed gui wording in lib and app to view wording, since MVC views do not necessarily deal with GUIs. And moved files so structure is similar in lib and app.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
|
||||
#include "component/view/View.h"
|
||||
#include "utility/logging/logging.h"
|
||||
|
||||
QWidget* QtViewWidgetWrapper::getWidgetOfView(View* view)
|
||||
{
|
||||
QtViewWidgetWrapper* widgetWrapper = dynamic_cast<QtViewWidgetWrapper*>(view->getWidgetWrapper());
|
||||
|
||||
if (!widgetWrapper)
|
||||
{
|
||||
LOG_ERROR("Trying to get the qt widget of non qt view.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!widgetWrapper->getWidget())
|
||||
{
|
||||
LOG_ERROR("The QtViewWidgetWrapper is not holdling a QWidget.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return widgetWrapper->getWidget();
|
||||
}
|
||||
|
||||
QtViewWidgetWrapper::QtViewWidgetWrapper(std::shared_ptr<QWidget> widget)
|
||||
: m_widget(widget)
|
||||
{
|
||||
}
|
||||
|
||||
QtViewWidgetWrapper::~QtViewWidgetWrapper()
|
||||
{
|
||||
}
|
||||
|
||||
QWidget* QtViewWidgetWrapper::getWidget()
|
||||
{
|
||||
return m_widget.get();
|
||||
}
|
||||
Reference in New Issue
Block a user