WCreateTab: Make use of Qt 5 signals and slots
This commit is contained in:
parent
e083526aee
commit
981d74e820
|
@ -5,7 +5,7 @@
|
||||||
#include "Editor/Undo/UndoCommands.h"
|
#include "Editor/Undo/UndoCommands.h"
|
||||||
#include <Core/Resource/Script/NGameList.h>
|
#include <Core/Resource/Script/NGameList.h>
|
||||||
|
|
||||||
WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent /*= 0*/)
|
WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent)
|
||||||
: QWidget(pParent)
|
: QWidget(pParent)
|
||||||
, ui(std::make_unique<Ui::WCreateTab>())
|
, ui(std::make_unique<Ui::WCreateTab>())
|
||||||
{
|
{
|
||||||
|
@ -14,9 +14,9 @@ WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent /*= 0*/)
|
||||||
mpEditor = pEditor;
|
mpEditor = pEditor;
|
||||||
mpEditor->Viewport()->installEventFilter(this);
|
mpEditor->Viewport()->installEventFilter(this);
|
||||||
|
|
||||||
connect(mpEditor, SIGNAL(LayersModified()), this, SLOT(OnLayersChanged()));
|
connect(mpEditor, &CWorldEditor::LayersModified, this, &WCreateTab::OnLayersChanged);
|
||||||
connect(gpEdApp, SIGNAL(ActiveProjectChanged(CGameProject*)), this, SLOT(OnActiveProjectChanged(CGameProject*)));
|
connect(gpEdApp, &CEditorApplication::ActiveProjectChanged, this, &WCreateTab::OnActiveProjectChanged);
|
||||||
connect(ui->SpawnLayerComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSpawnLayerChanged(int)));
|
connect(ui->SpawnLayerComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &WCreateTab::OnSpawnLayerChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
WCreateTab::~WCreateTab() = default;
|
WCreateTab::~WCreateTab() = default;
|
||||||
|
|
Loading…
Reference in New Issue