2022-11-26 18:24:38 +00:00
|
|
|
/*##############################################################################
|
|
|
|
## Author: Shaun Reed ##
|
|
|
|
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
|
|
|
|
## About: MainWindow for creating an example Qt application ##
|
|
|
|
## ##
|
|
|
|
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
|
|
|
##############################################################################*/
|
|
|
|
|
2022-03-13 22:00:00 +00:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2022-08-21 19:37:42 +00:00
|
|
|
#include <unordered_map>
|
|
|
|
|
2022-03-13 22:00:00 +00:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
2022-08-21 19:37:42 +00:00
|
|
|
#include <examplescene.h>
|
2022-11-24 22:26:53 +00:00
|
|
|
#include "qtk-widget_export.h"
|
2022-03-13 22:00:00 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
2022-11-26 18:24:38 +00:00
|
|
|
/**
|
|
|
|
* MainWindow class to provide an example of using a QtkWidget within a Qt
|
|
|
|
* window application.
|
|
|
|
*/
|
|
|
|
class QTK_WIDGET_EXPORT MainWindow : public QMainWindow {
|
2022-11-24 22:26:53 +00:00
|
|
|
Q_OBJECT
|
2022-03-13 22:00:00 +00:00
|
|
|
|
2022-11-24 22:26:53 +00:00
|
|
|
public:
|
2022-11-26 18:24:38 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Contructors / Destructors
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This ctor also initializes the Scene for each QtkWidget in the window.
|
|
|
|
* To load a different scene this would need to be updated.
|
|
|
|
*
|
|
|
|
* @param parent The parent for this QMainWindow
|
|
|
|
*/
|
2022-11-24 22:26:53 +00:00
|
|
|
explicit MainWindow(QWidget * parent = nullptr);
|
|
|
|
~MainWindow() override;
|
2022-03-13 22:00:00 +00:00
|
|
|
|
2022-11-24 22:26:53 +00:00
|
|
|
private:
|
2022-11-26 18:24:38 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Private Members
|
|
|
|
**************************************************************************/
|
|
|
|
|
2022-11-24 22:26:53 +00:00
|
|
|
Ui::MainWindow * ui {};
|
|
|
|
std::unordered_map<std::string, Qtk::Scene *> mScenes {};
|
2022-03-13 22:00:00 +00:00
|
|
|
};
|
|
|
|
|
2022-11-24 22:26:53 +00:00
|
|
|
#endif // MAINWINDOW_H
|