mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-11 14:41:57 +00:00
Created application class to manage editor windows, improved camera AABox orbit
This commit is contained in:
33
src/Editor/CEditorApplication.h
Normal file
33
src/Editor/CEditorApplication.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef CEDITORAPPLICATION_H
|
||||
#define CEDITORAPPLICATION_H
|
||||
|
||||
#include <QApplication>
|
||||
#include <QTimer>
|
||||
#include <QVector>
|
||||
|
||||
class CBasicViewport;
|
||||
class IEditor;
|
||||
|
||||
class CEditorApplication : public QApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QTimer mRefreshTimer;
|
||||
QVector<IEditor*> mEditorWindows;
|
||||
double mLastUpdate;
|
||||
|
||||
public:
|
||||
CEditorApplication(int& rArgc, char **ppArgv);
|
||||
|
||||
public slots:
|
||||
void TickEditors();
|
||||
|
||||
// Accessors
|
||||
public:
|
||||
inline void AddEditor(IEditor *pEditor) { mEditorWindows << pEditor; }
|
||||
inline void RemoveEditor(IEditor *pEditor) { mEditorWindows.removeOne(pEditor); }
|
||||
};
|
||||
|
||||
#define gpEdApp static_cast<CEditorApplication*>(qApp)
|
||||
|
||||
#endif // CEDITORAPPLICATION_H
|
||||
Reference in New Issue
Block a user