mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-02 19:26:03 +00:00
CLayerEditor: Make use of in-class initializers where applicable
This commit is contained in:
parent
86bca47221
commit
d537cfd4b2
@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
CLayerEditor::CLayerEditor(QWidget *parent)
|
CLayerEditor::CLayerEditor(QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::CLayerEditor)
|
|
||||||
, mpArea(nullptr)
|
|
||||||
, mpModel(new CLayerModel(this))
|
, mpModel(new CLayerModel(this))
|
||||||
|
, ui(std::make_unique<Ui::CLayerEditor>())
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->LayerSelectComboBox->setModel(mpModel);
|
ui->LayerSelectComboBox->setModel(mpModel);
|
||||||
@ -18,10 +17,7 @@ CLayerEditor::CLayerEditor(QWidget *parent)
|
|||||||
connect(ui->ActiveCheckBox, SIGNAL(toggled(bool)), this, SLOT(EditLayerActive(bool)));
|
connect(ui->ActiveCheckBox, SIGNAL(toggled(bool)), this, SLOT(EditLayerActive(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
CLayerEditor::~CLayerEditor()
|
CLayerEditor::~CLayerEditor() = default;
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLayerEditor::SetArea(CGameArea *pArea)
|
void CLayerEditor::SetArea(CGameArea *pArea)
|
||||||
{
|
{
|
||||||
|
@ -13,10 +13,10 @@ class CLayerEditor : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
TResPtr<CGameArea> mpArea;
|
TResPtr<CGameArea> mpArea;
|
||||||
CLayerModel *mpModel;
|
CLayerModel *mpModel;
|
||||||
CScriptLayer *mpCurrentLayer;
|
CScriptLayer *mpCurrentLayer = nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CLayerEditor(QWidget *parent = 0);
|
explicit CLayerEditor(QWidget *parent = nullptr);
|
||||||
~CLayerEditor();
|
~CLayerEditor();
|
||||||
void SetArea(CGameArea *pArea);
|
void SetArea(CGameArea *pArea);
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ public slots:
|
|||||||
void EditLayerActive(bool Active);
|
void EditLayerActive(bool Active);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CLayerEditor *ui;
|
std::unique_ptr<Ui::CLayerEditor> ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CLAYEREDITOR_H
|
#endif // CLAYEREDITOR_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user