mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-09 14:46:05 +00:00
CScanEditor: Make use of in-class initializers where applicable
This commit is contained in:
parent
8c4e16d51e
commit
145dc11c58
@ -1,9 +1,9 @@
|
|||||||
#include "CScanEditor.h"
|
#include "CScanEditor.h"
|
||||||
#include "ui_CScanEditor.h"
|
#include "ui_CScanEditor.h"
|
||||||
|
|
||||||
CScanEditor::CScanEditor(CScan* pScan, QWidget* pParent /*= 0*/)
|
CScanEditor::CScanEditor(CScan* pScan, QWidget* pParent)
|
||||||
: IEditor(pParent)
|
: IEditor(pParent)
|
||||||
, mpUI(new Ui::CScanEditor)
|
, mpUI(std::make_unique<Ui::CScanEditor>())
|
||||||
, mpScan(pScan)
|
, mpScan(pScan)
|
||||||
{
|
{
|
||||||
mpUI->setupUi(this);
|
mpUI->setupUi(this);
|
||||||
@ -19,10 +19,7 @@ CScanEditor::CScanEditor(CScan* pScan, QWidget* pParent /*= 0*/)
|
|||||||
connect( mpUI->ActionSaveAndCook, SIGNAL(toggled(bool)), this, SLOT(SaveAndRepack()) );
|
connect( mpUI->ActionSaveAndCook, SIGNAL(toggled(bool)), this, SLOT(SaveAndRepack()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
CScanEditor::~CScanEditor()
|
CScanEditor::~CScanEditor() = default;
|
||||||
{
|
|
||||||
delete mpUI;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CScanEditor::Save()
|
bool CScanEditor::Save()
|
||||||
{
|
{
|
||||||
@ -32,6 +29,6 @@ bool CScanEditor::Save()
|
|||||||
setWindowModified(false);
|
setWindowModified(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "Editor/IEditor.h"
|
#include "Editor/IEditor.h"
|
||||||
#include <Core/Resource/Scan/CScan.h>
|
#include <Core/Resource/Scan/CScan.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class CScanEditor;
|
class CScanEditor;
|
||||||
}
|
}
|
||||||
@ -13,17 +15,17 @@ class CScanEditor : public IEditor
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
/** Qt UI */
|
/** Qt UI */
|
||||||
Ui::CScanEditor* mpUI;
|
std::unique_ptr<Ui::CScanEditor> mpUI;
|
||||||
|
|
||||||
/** Scan asset being edited */
|
/** Scan asset being edited */
|
||||||
TResPtr<CScan> mpScan;
|
TResPtr<CScan> mpScan;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CScanEditor(CScan* pScan, QWidget* pParent = 0);
|
explicit CScanEditor(CScan* pScan, QWidget* pParent = nullptr);
|
||||||
~CScanEditor();
|
~CScanEditor() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual bool Save() override;
|
bool Save() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CSCANEDITOR_H
|
#endif // CSCANEDITOR_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user