Radium Engine  1.5.0
MainWindowInterface.hpp
1 #pragma once
2 
3 #include <Gui/RaGui.hpp>
4 
5 #include <QMainWindow>
6 #include <QMessageBox>
7 #include <memory>
8 
9 namespace Ra {
10 namespace Engine {
11 namespace Rendering {
12 class Renderer;
13 }
14 } // namespace Engine
15 
16 namespace Plugins {
17 class RadiumPluginInterface;
18 }
19 
20 namespace Gui {
21 class Viewer;
22 class SelectionManager;
23 class Timeline;
24 
27 class RA_GUI_API MainWindowInterface : public QMainWindow
28 {
29  Q_OBJECT
30 
31  public:
33  explicit MainWindowInterface( QWidget* parent = nullptr ) : QMainWindow( parent ) {};
34  virtual ~MainWindowInterface() {};
35 
37  virtual Ra::Gui::Viewer* getViewer() = 0;
38 
40  virtual Gui::SelectionManager* getSelectionManager() = 0;
41 
43  virtual Gui::Timeline* getTimeline() = 0;
44 
46  virtual void updateUi( Plugins::RadiumPluginInterface* plugin ) = 0;
47 
50  virtual void onFrameComplete() = 0;
51 
53  virtual void addRenderer( const std::string& name,
54  std::shared_ptr<Engine::Rendering::Renderer> e ) = 0;
55 
57  virtual void configure() {};
58  public slots:
63  virtual void prepareDisplay() = 0;
64 
66  virtual void cleanup() = 0;
67 
68  virtual void displayHelpDialog() {
69  QMessageBox helpMsg;
70  helpMsg.setText( "No help for this application yet !" );
71  helpMsg.exec();
72  }
73 
74  signals:
76  void closed();
77 
80 };
81 
82 } // namespace Gui
83 } // namespace Ra
virtual Ra::Gui::Viewer * getViewer()=0
Access the viewer, i.e. the rendering widget.
void closed()
Emitted when the closed button has been hit.
virtual void onFrameComplete()=0
virtual Gui::Timeline * getTimeline()=0
Access the timeline.
MainWindowInterface(QWidget *parent=nullptr)
Constructor and destructor.
virtual void cleanup()=0
Cleanup resources.
virtual void prepareDisplay()=0
virtual void addRenderer(const std::string &name, std::shared_ptr< Engine::Rendering::Renderer > e)=0
Add render in the application: UI, viewer.
virtual void updateUi(Plugins::RadiumPluginInterface *plugin)=0
Update the ui from the plugins loaded.
void requestEngineOpenGLInitialization()
Emitted when the viewer request OpenGL initialization of the engine.
virtual Gui::SelectionManager * getSelectionManager()=0
Access the selection manager.
virtual void configure()
finalize configuration once engine viewer and connection are set.
The Timeline class provides display and management of time, as well as keyframes.
Definition: Timeline.hpp:38
Interface class for Radiums plugins.
Definition: Cage.cpp:3