qtk/app/mainwindow.h

54 lines
1.7 KiB
C
Raw Normal View History

2022-11-25 19:36:12 +00:00
/*##############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2022 Shaun Reed, all rights reserved ##
## About: MainWindow for creating an example Qt application ##
2022-11-25 19:36:12 +00:00
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <unordered_map>
#include <QMainWindow>
#include <examplescene.h>
2022-11-24 22:26:53 +00:00
#include "qtk-widget_export.h"
namespace Ui {
class MainWindow;
}
2022-11-25 19:36:12 +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-11-24 22:26:53 +00:00
public:
2022-11-25 19:36:12 +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-11-24 22:26:53 +00:00
private:
2022-11-25 19:36:12 +00:00
/***************************************************************************
* Private Members
**************************************************************************/
2022-11-24 22:26:53 +00:00
Ui::MainWindow * ui {};
std::unordered_map<std::string, Qtk::Scene *> mScenes {};
};
2022-11-24 22:26:53 +00:00
#endif // MAINWINDOW_H