1#include <Gui/RadiumWindow/SimpleWindow.hpp>
3#include <Engine/Rendering/ForwardRenderer.hpp>
4#include <Gui/SelectionManager/SelectionManager.hpp>
5#include <Gui/TreeModel/EntityTreeModel.hpp>
6#include <Gui/Viewer/CameraManipulator.hpp>
7#include <Gui/Viewer/Viewer.hpp>
11using namespace Engine;
12using namespace Engine::Rendering;
17 if ( objectName().isEmpty() ) setObjectName( QString::fromUtf8(
"RadiumSimpleWindow" ) );
21 m_viewer = std::make_unique<Viewer>();
22 m_viewer->setObjectName( QStringLiteral(
"m_viewer" ) );
26 std::make_unique<Ra::Gui::ItemModel>( Ra::Engine::RadiumEngine::getInstance(),
this );
27 m_selectionManager = std::make_unique<Ra::Gui::SelectionManager>( m_sceneModel.
get(),
this );
30 auto viewerWidget = QWidget::createWindowContainer( m_viewer.
get() );
31 viewerWidget->setAutoFillBackground(
false );
32 setCentralWidget( viewerWidget );
33 setWindowTitle( QString(
"Radium player" ) );
38SimpleWindow::~SimpleWindow() =
default;
41 return m_viewer.
get();
45 return m_selectionManager.
get();
64 m_selectionManager->clear();
69 m_viewer.
reset(
nullptr );
72void SimpleWindow::createConnections() {}
74void SimpleWindow::displayHelpDialog() {
75 m_viewer->displayHelpDialog();
void updateUi(Ra::Plugins::RadiumPluginInterface *plugin) override
Update the ui from the plugins loaded.
void frameUpdate()
Emitted when frame must be updated.
void onFrameComplete() override
void addRenderer(const std::string &name, std::shared_ptr< Ra::Engine::Rendering::Renderer > e) override
Add render in the application: UI, viewer - this method does not associate a control panel.
Ra::Gui::Timeline * getTimeline() override
Access the timeline.
void prepareDisplay() override
Ra::Gui::Viewer * getViewer() override
Access the viewer, i.e. the rendering widget.
SimpleWindow(uint w=800, uint h=640, QWidget *parent=nullptr)
Ra::Gui::SelectionManager * getSelectionManager() override
Access the selection manager.
void cleanup() override
Cleanup resources.
The Timeline class provides display and management of time, as well as keyframes.
virtual bool prepareDisplay()
int addRenderer(const std::shared_ptr< Engine::Rendering::Renderer > &e)
Interface class for Radiums plugins.
hepler function to manage enum as underlying types in VariableSet