mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-02 03:13:38 +00:00
CQuickplayPropertyEditor: Make use of Qt 5 signals and slots
This commit is contained in:
parent
22372fe33e
commit
30428614c4
@ -39,31 +39,31 @@ CQuickplayPropertyEditor::CQuickplayPropertyEditor(SQuickplayParameters& Paramet
|
|||||||
mpUI->SpawnAtCameraLocationCheckBox->setChecked( Parameters.Features.HasFlag(EQuickplayFeature::SetSpawnPosition) );
|
mpUI->SpawnAtCameraLocationCheckBox->setChecked( Parameters.Features.HasFlag(EQuickplayFeature::SetSpawnPosition) );
|
||||||
mpUI->GiveAllItemsCheckBox->setChecked( Parameters.Features.HasFlag(EQuickplayFeature::GiveAllItems) );
|
mpUI->GiveAllItemsCheckBox->setChecked( Parameters.Features.HasFlag(EQuickplayFeature::GiveAllItems) );
|
||||||
|
|
||||||
connect(mpUI->DolphinPathLineEdit, SIGNAL(textChanged(QString)),
|
connect(mpUI->DolphinPathLineEdit, &QLineEdit::textChanged,
|
||||||
this, SLOT(OnDolphinPathChanged(QString)));
|
this, &CQuickplayPropertyEditor::OnDolphinPathChanged);
|
||||||
|
|
||||||
connect(mpUI->DolphinBrowseButton, SIGNAL(pressed()),
|
connect(mpUI->DolphinBrowseButton, &QPushButton::pressed,
|
||||||
this, SLOT(BrowseForDolphin()));
|
this, &CQuickplayPropertyEditor::BrowseForDolphin);
|
||||||
|
|
||||||
connect(mpUI->BootToAreaCheckBox, SIGNAL(toggled(bool)),
|
connect(mpUI->BootToAreaCheckBox, &QCheckBox::toggled,
|
||||||
this, SLOT(OnBootToAreaToggled(bool)));
|
this, &CQuickplayPropertyEditor::OnBootToAreaToggled);
|
||||||
|
|
||||||
connect(mpUI->SpawnAtCameraLocationCheckBox, SIGNAL(toggled(bool)),
|
connect(mpUI->SpawnAtCameraLocationCheckBox, &QCheckBox::toggled,
|
||||||
this, SLOT(OnSpawnAtCameraLocationToggled(bool)));
|
this, &CQuickplayPropertyEditor::OnSpawnAtCameraLocationToggled);
|
||||||
|
|
||||||
connect(mpUI->GiveAllItemsCheckBox, SIGNAL(toggled(bool)),
|
connect(mpUI->GiveAllItemsCheckBox, &QCheckBox::toggled,
|
||||||
this, SLOT(OnGiveAllItemsToggled(bool)));
|
this, &CQuickplayPropertyEditor::OnGiveAllItemsToggled);
|
||||||
|
|
||||||
connect(mpUI->LayerList, SIGNAL(itemChanged(QListWidgetItem*)),
|
connect(mpUI->LayerList, &QListWidget::itemChanged,
|
||||||
this, SLOT(OnLayerListItemChanged(QListWidgetItem*)));
|
this, &CQuickplayPropertyEditor::OnLayerListItemChanged);
|
||||||
|
|
||||||
// Connect to World Editor signals
|
// Connect to World Editor signals
|
||||||
CWorldEditor* pWorldEditor = qobject_cast<CWorldEditor*>(pParent);
|
CWorldEditor* pWorldEditor = qobject_cast<CWorldEditor*>(pParent);
|
||||||
|
|
||||||
if (pWorldEditor)
|
if (pWorldEditor)
|
||||||
{
|
{
|
||||||
connect(pWorldEditor, SIGNAL(MapChanged(CWorld*,CGameArea*)),
|
connect(pWorldEditor, &CWorldEditor::MapChanged,
|
||||||
this, SLOT(OnWorldEditorAreaChanged(CWorld*,CGameArea*)));
|
this, &CQuickplayPropertyEditor::OnWorldEditorAreaChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user