mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-08 21:17:53 +00:00
Editor: Remove now unnecessary qOverload instances
These used to be necessary on older versions of Qt
This commit is contained in:
@@ -50,15 +50,15 @@ CCharacterEditor::CCharacterEditor(CAnimSet *pSet, QWidget *parent)
|
||||
connect(ui->ActionFastForward, &QAction::triggered, this, &CCharacterEditor::FastForward);
|
||||
connect(ui->ActionPrevAnim, &QAction::triggered, this, &CCharacterEditor::PrevAnim);
|
||||
connect(ui->ActionNextAnim, &QAction::triggered, this, &CCharacterEditor::NextAnim);
|
||||
connect(mpCharComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &CCharacterEditor::SetActiveCharacterIndex);
|
||||
connect(mpAnimComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &CCharacterEditor::SetActiveAnimation);
|
||||
connect(mpCharComboBox, &QComboBox::currentIndexChanged, this, &CCharacterEditor::SetActiveCharacterIndex);
|
||||
connect(mpAnimComboBox, &QComboBox::currentIndexChanged, this, &CCharacterEditor::SetActiveAnimation);
|
||||
|
||||
connect(ui->AnimSlider, qOverload<int>(&QSlider::valueChanged), this, qOverload<int>(&CCharacterEditor::SetAnimTime));
|
||||
connect(ui->AnimSlider, &QSlider::valueChanged, this, qOverload<int>(&CCharacterEditor::SetAnimTime));
|
||||
connect(ui->PlayPauseButton, &QPushButton::pressed, this, &CCharacterEditor::TogglePlay);
|
||||
connect(ui->LoopButton, &QPushButton::toggled, this, &CCharacterEditor::ToggleLoop);
|
||||
connect(ui->RewindButton, &QPushButton::pressed, this, &CCharacterEditor::Rewind);
|
||||
connect(ui->FastForwardButton, &QPushButton::pressed, this, &CCharacterEditor::FastForward);
|
||||
connect(ui->AnimSpeedSpinBox, qOverload<double>(&WDraggableSpinBox::valueChanged), this, &CCharacterEditor::AnimSpeedSpinBoxChanged);
|
||||
connect(ui->AnimSpeedSpinBox, &WDraggableSpinBox::valueChanged, this, &CCharacterEditor::AnimSpeedSpinBoxChanged);
|
||||
|
||||
// Init skeleton tree view
|
||||
ui->SkeletonHierarchyTreeView->setModel(&mSkeletonModel);
|
||||
|
||||
@@ -38,7 +38,7 @@ INodeEditor::INodeEditor(QWidget *pParent)
|
||||
connect(mGizmoActions[1], &QAction::triggered, this, &INodeEditor::OnTranslateTriggered);
|
||||
connect(mGizmoActions[2], &QAction::triggered, this, &INodeEditor::OnRotateTriggered);
|
||||
connect(mGizmoActions[3], &QAction::triggered, this, &INodeEditor::OnScaleTriggered);
|
||||
connect(mpTransformCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &INodeEditor::OnTransformSpaceChanged);
|
||||
connect(mpTransformCombo, &QComboBox::currentIndexChanged, this, &INodeEditor::OnTransformSpaceChanged);
|
||||
connect(mpSelection, &CNodeSelection::Modified, this, &INodeEditor::OnSelectionModified);
|
||||
}
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ CModelEditorWindow::CModelEditorWindow(CModel *pModel, QWidget *pParent)
|
||||
connect(ui->CameraModeButton, &QPushButton::clicked, this, &CModelEditorWindow::ToggleCameraMode);
|
||||
connect(ui->ToggleGridButton, &QPushButton::toggled, this, &CModelEditorWindow::ToggleGrid);
|
||||
|
||||
connect(ui->SetSelectionComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateUI));
|
||||
connect(ui->MatSelectionComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateUI));
|
||||
connect(ui->SetSelectionComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateUI));
|
||||
connect(ui->MatSelectionComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateUI));
|
||||
connect(ui->EnableTransparencyCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->EnablePunchthroughCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->EnableReflectionCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
@@ -107,33 +107,33 @@ CModelEditorWindow::CModelEditorWindow(CModel *pModel, QWidget *pParent)
|
||||
connect(ui->EnableOccluderCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->EnableLightmapCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->EnableDynamicLightingCheck, &QCheckBox::toggled, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->SourceBlendComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->DestBlendComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->SourceBlendComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->DestBlendComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->KonstColorPickerA, &WColorPicker::ColorChanged, this, qOverload<const QColor&>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->KonstColorPickerB, &WColorPicker::ColorChanged, this, qOverload<const QColor&>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->KonstColorPickerC, &WColorPicker::ColorChanged, this, qOverload<const QColor&>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->KonstColorPickerD, &WColorPicker::ColorChanged, this, qOverload<const QColor&>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->PassTable, &QTableWidget::cellClicked, this, qOverload<int, int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevKColorSelComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevKAlphaSelComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevRasSelComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TexCoordSrcComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevKColorSelComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevKAlphaSelComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevRasSelComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TexCoordSrcComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->PassTextureResSelector, SIGNAL(ResourceChanged(QString)), this, SLOT(UpdateMaterial(QString)));
|
||||
connect(ui->TevColor1ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor2ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor3ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor4ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColorOutputComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha1ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha2ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha3ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha4ComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlphaOutputComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimTypeComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamASpinBox, qOverload<double>(&WDraggableSpinBox::valueChanged), this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamBSpinBox, qOverload<double>(&WDraggableSpinBox::valueChanged), this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamCSpinBox, qOverload<double>(&WDraggableSpinBox::valueChanged), this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamDSpinBox, qOverload<double>(&WDraggableSpinBox::valueChanged), this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor1ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor2ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor3ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColor4ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevColorOutputComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha1ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha2ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha3ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlpha4ComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->TevAlphaOutputComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimTypeComboBox, &QComboBox::currentIndexChanged, this, qOverload<int>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamASpinBox, &WDraggableSpinBox::valueChanged, this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamBSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamCSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
connect(ui->AnimParamDSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload<double>(&CModelEditorWindow::UpdateMaterial));
|
||||
// That was fun
|
||||
|
||||
SetActiveModel(pModel);
|
||||
|
||||
@@ -57,7 +57,7 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
|
||||
case EPropertyType::Bool:
|
||||
{
|
||||
QCheckBox *pCheckBox = new QCheckBox(pParent);
|
||||
auto* pCheckBox = new QCheckBox(pParent);
|
||||
CONNECT_RELAY(pCheckBox, rkIndex, &QCheckBox::toggled);
|
||||
pOut = pCheckBox;
|
||||
break;
|
||||
@@ -65,39 +65,39 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
|
||||
case EPropertyType::Short:
|
||||
{
|
||||
WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent);
|
||||
auto* pSpinBox = new WIntegralSpinBox(pParent);
|
||||
pSpinBox->setMinimum(INT16_MIN);
|
||||
pSpinBox->setMaximum(INT16_MAX);
|
||||
pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix()));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, qOverload<int>(&WIntegralSpinBox::valueChanged));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged);
|
||||
pOut = pSpinBox;
|
||||
break;
|
||||
}
|
||||
|
||||
case EPropertyType::Int:
|
||||
{
|
||||
WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent);
|
||||
auto* pSpinBox = new WIntegralSpinBox(pParent);
|
||||
pSpinBox->setMinimum(INT32_MIN);
|
||||
pSpinBox->setMaximum(INT32_MAX);
|
||||
pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix()));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, qOverload<int>(&WIntegralSpinBox::valueChanged));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged);
|
||||
pOut = pSpinBox;
|
||||
break;
|
||||
}
|
||||
|
||||
case EPropertyType::Float:
|
||||
{
|
||||
WDraggableSpinBox *pSpinBox = new WDraggableSpinBox(pParent);
|
||||
auto* pSpinBox = new WDraggableSpinBox(pParent);
|
||||
pSpinBox->setSingleStep(0.1);
|
||||
pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix()));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, qOverload<double>(&WDraggableSpinBox::valueChanged));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, &WDraggableSpinBox::valueChanged);
|
||||
pOut = pSpinBox;
|
||||
break;
|
||||
}
|
||||
|
||||
case EPropertyType::Color:
|
||||
{
|
||||
WColorPicker *pColorPicker = new WColorPicker(pParent);
|
||||
auto* pColorPicker = new WColorPicker(pParent);
|
||||
CONNECT_RELAY(pColorPicker, rkIndex, &WColorPicker::ColorChanged);
|
||||
pOut = pColorPicker;
|
||||
break;
|
||||
@@ -105,17 +105,17 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
|
||||
case EPropertyType::Sound:
|
||||
{
|
||||
WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent);
|
||||
auto* pSpinBox = new WIntegralSpinBox(pParent);
|
||||
pSpinBox->setMinimum(-1);
|
||||
pSpinBox->setMaximum(0xFFFF);
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, qOverload<int>(&WIntegralSpinBox::valueChanged));
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged);
|
||||
pOut = pSpinBox;
|
||||
break;
|
||||
}
|
||||
|
||||
case EPropertyType::String:
|
||||
{
|
||||
QLineEdit *pLineEdit = new QLineEdit(pParent);
|
||||
auto* pLineEdit = new QLineEdit(pParent);
|
||||
CONNECT_RELAY(pLineEdit, rkIndex, &QLineEdit::textEdited);
|
||||
pOut = pLineEdit;
|
||||
break;
|
||||
@@ -124,23 +124,23 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
case EPropertyType::Enum:
|
||||
case EPropertyType::Choice:
|
||||
{
|
||||
QComboBox *pComboBox = new QComboBox(pParent);
|
||||
CEnumProperty* pEnum = TPropCast<CEnumProperty>(pProp);
|
||||
auto* pComboBox = new QComboBox(pParent);
|
||||
auto* pEnum = TPropCast<CEnumProperty>(pProp);
|
||||
|
||||
for (size_t ValueIdx = 0; ValueIdx < pEnum->NumPossibleValues(); ValueIdx++)
|
||||
pComboBox->addItem(TO_QSTRING(pEnum->ValueName(ValueIdx)));
|
||||
|
||||
CONNECT_RELAY(pComboBox, rkIndex, qOverload<int>(&QComboBox::currentIndexChanged));
|
||||
CONNECT_RELAY(pComboBox, rkIndex, &QComboBox::currentIndexChanged);
|
||||
pOut = pComboBox;
|
||||
break;
|
||||
}
|
||||
|
||||
case EPropertyType::Asset:
|
||||
{
|
||||
CResourceSelector *pSelector = new CResourceSelector(pParent);
|
||||
auto* pSelector = new CResourceSelector(pParent);
|
||||
pSelector->SetFrameVisible(false);
|
||||
|
||||
CAssetProperty *pAsset = TPropCast<CAssetProperty>(pProp);
|
||||
auto* pAsset = TPropCast<CAssetProperty>(pProp);
|
||||
pSelector->SetTypeFilter(pAsset->GetTypeFilter());
|
||||
|
||||
CONNECT_RELAY(pSelector, rkIndex, &CResourceSelector::ResourceChanged);
|
||||
@@ -151,7 +151,7 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
case EPropertyType::Array:
|
||||
{
|
||||
// No relay here, would prefer user to be sure of their change before it's reflected on the UI
|
||||
WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent);
|
||||
auto* pSpinBox = new WIntegralSpinBox(pParent);
|
||||
pSpinBox->setMinimum(0);
|
||||
pSpinBox->setMaximum(999);
|
||||
pOut = pSpinBox;
|
||||
@@ -170,12 +170,13 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie
|
||||
|
||||
// Handle character
|
||||
if (Type == EPropertyType::AnimationSet)
|
||||
{
|
||||
pOut = CreateCharacterEditor(pParent, rkIndex);
|
||||
|
||||
// Handle flags
|
||||
}
|
||||
else if (Type == EPropertyType::Flags)
|
||||
{
|
||||
QCheckBox *pCheckBox = new QCheckBox(pParent);
|
||||
// Handle flags
|
||||
auto* pCheckBox = new QCheckBox(pParent);
|
||||
CONNECT_RELAY(pCheckBox, rkIndex, &QCheckBox::toggled);
|
||||
pOut = pCheckBox;
|
||||
}
|
||||
@@ -565,7 +566,7 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel
|
||||
// Create widget
|
||||
if (Type == EPropertyType::Asset)
|
||||
{
|
||||
CResourceSelector* pSelector = new CResourceSelector(pParent);
|
||||
auto* pSelector = new CResourceSelector(pParent);
|
||||
pSelector->SetFrameVisible(false);
|
||||
|
||||
if (Params.Version() <= EGame::Echoes)
|
||||
@@ -579,8 +580,8 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel
|
||||
|
||||
if (Type == EPropertyType::Enum || Type == EPropertyType::Choice)
|
||||
{
|
||||
QComboBox* pComboBox = new QComboBox(pParent);
|
||||
CAnimSet* pAnimSet = Params.AnimSet();
|
||||
auto* pComboBox = new QComboBox(pParent);
|
||||
auto* pAnimSet = Params.AnimSet();
|
||||
|
||||
if (pAnimSet)
|
||||
{
|
||||
@@ -588,14 +589,14 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel
|
||||
pComboBox->addItem(TO_QSTRING(pAnimSet->Character(CharIdx)->Name));
|
||||
}
|
||||
|
||||
CONNECT_RELAY(pComboBox, rkIndex, qOverload<int>(&QComboBox::currentIndexChanged));
|
||||
CONNECT_RELAY(pComboBox, rkIndex, &QComboBox::currentIndexChanged);
|
||||
return pComboBox;
|
||||
}
|
||||
|
||||
if (Type == EPropertyType::Int)
|
||||
{
|
||||
WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent);
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, qOverload<int>(&WIntegralSpinBox::valueChanged));
|
||||
auto* pSpinBox = new WIntegralSpinBox(pParent);
|
||||
CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged);
|
||||
return pSpinBox;
|
||||
}
|
||||
|
||||
@@ -612,12 +613,10 @@ void CPropertyDelegate::SetCharacterEditorData(QWidget *pEditor, const QModelInd
|
||||
{
|
||||
static_cast<CResourceSelector*>(pEditor)->SetResource(Params.AnimSet());
|
||||
}
|
||||
|
||||
else if (Type == EPropertyType::Enum || Type == EPropertyType::Choice)
|
||||
{
|
||||
static_cast<QComboBox*>(pEditor)->setCurrentIndex(Params.CharacterIndex());
|
||||
}
|
||||
|
||||
else if (Type == EPropertyType::Int && !pEditor->hasFocus())
|
||||
{
|
||||
int UnkIndex = (Params.Version() <= EGame::Echoes ? rkIndex.row() - 2 : rkIndex.row() - 1);
|
||||
@@ -637,12 +636,10 @@ void CPropertyDelegate::SetCharacterModelData(QWidget *pEditor, const QModelInde
|
||||
CResourceEntry *pEntry = static_cast<CResourceSelector*>(pEditor)->Entry();
|
||||
Params.SetResource( pEntry ? pEntry->ID() : CAssetID::InvalidID(gpEdApp->CurrentGame()) );
|
||||
}
|
||||
|
||||
else if (Type == EPropertyType::Enum || Type == EPropertyType::Choice)
|
||||
{
|
||||
Params.SetCharIndex( static_cast<QComboBox*>(pEditor)->currentIndex() );
|
||||
}
|
||||
|
||||
else if (Type == EPropertyType::Int)
|
||||
{
|
||||
int UnkIndex = (Params.Version() <= EGame::Echoes ? rkIndex.row() - 2 : rkIndex.row() - 1);
|
||||
|
||||
@@ -150,7 +150,7 @@ CResourceBrowser::CResourceBrowser(QWidget *pParent)
|
||||
connect(mpUI->SearchBar, &CTimedLineEdit::StoppedTyping, this, &CResourceBrowser::OnSearchStringChanged);
|
||||
connect(mpUI->ResourceTreeButton, &QPushButton::pressed, this, &CResourceBrowser::SetResourceTreeView);
|
||||
connect(mpUI->ResourceListButton, &QPushButton::pressed, this, &CResourceBrowser::SetResourceListView);
|
||||
connect(mpUI->SortComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &CResourceBrowser::OnSortModeChanged);
|
||||
connect(mpUI->SortComboBox, &QComboBox::currentIndexChanged, this, &CResourceBrowser::OnSortModeChanged);
|
||||
connect(mpUI->ClearButton, &QPushButton::pressed, this, &CResourceBrowser::OnClearButtonPressed);
|
||||
|
||||
connect(mpUI->DirectoryTreeView, &CVirtualDirectoryTreeView::clicked, this, &CResourceBrowser::OnDirectorySelectionChanged);
|
||||
|
||||
@@ -8,8 +8,8 @@ TestDialog::TestDialog(QWidget *pParent)
|
||||
, ui(std::make_unique<Ui::TestDialog>())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->spinBox, qOverload<int>(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged);
|
||||
connect(ui->spinBox_2, qOverload<int>(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged);
|
||||
connect(ui->spinBox, &QSpinBox::valueChanged, this, &TestDialog::OnSpinBoxChanged);
|
||||
connect(ui->spinBox_2, &QSpinBox::valueChanged, this, &TestDialog::OnSpinBoxChanged);
|
||||
connect(ui->pushButton, &QPushButton::clicked, this, &TestDialog::OnFind);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,9 +175,9 @@ void WVectorEditor::SetupUI()
|
||||
mpSpinBoxX->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
mpSpinBoxY->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
mpSpinBoxZ->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
connect(mpSpinBoxX, qOverload<double>(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetX);
|
||||
connect(mpSpinBoxY, qOverload<double>(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetY);
|
||||
connect(mpSpinBoxZ, qOverload<double>(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetZ);
|
||||
connect(mpSpinBoxX, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetX);
|
||||
connect(mpSpinBoxY, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetY);
|
||||
connect(mpSpinBoxZ, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetZ);
|
||||
connect(mpSpinBoxX, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone);
|
||||
connect(mpSpinBoxY, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone);
|
||||
connect(mpSpinBoxZ, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone);
|
||||
|
||||
@@ -12,7 +12,7 @@ CLayerEditor::CLayerEditor(QWidget *parent)
|
||||
ui->setupUi(this);
|
||||
ui->LayerSelectComboBox->setModel(mpModel);
|
||||
|
||||
connect(ui->LayerSelectComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &CLayerEditor::SetCurrentIndex);
|
||||
connect(ui->LayerSelectComboBox, &QComboBox::currentIndexChanged, this, &CLayerEditor::SetCurrentIndex);
|
||||
connect(ui->NameLineEdit, &QLineEdit::textEdited, this, &CLayerEditor::EditLayerName);
|
||||
connect(ui->ActiveCheckBox, &QCheckBox::toggled, this, &CLayerEditor::EditLayerActive);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent)
|
||||
|
||||
connect(mpEditor, &CWorldEditor::LayersModified, this, &WCreateTab::OnLayersChanged);
|
||||
connect(gpEdApp, &CEditorApplication::ActiveProjectChanged, this, &WCreateTab::OnActiveProjectChanged);
|
||||
connect(ui->SpawnLayerComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &WCreateTab::OnSpawnLayerChanged);
|
||||
connect(ui->SpawnLayerComboBox, &QComboBox::currentIndexChanged, this, &WCreateTab::OnSpawnLayerChanged);
|
||||
}
|
||||
|
||||
WCreateTab::~WCreateTab() = default;
|
||||
|
||||
@@ -51,7 +51,7 @@ WEditorProperties::WEditorProperties(QWidget *pParent)
|
||||
connect(mpActiveCheckBox, &QCheckBox::clicked, this, &WEditorProperties::OnActiveChanged);
|
||||
connect(mpInstanceNameLineEdit, &QLineEdit::textEdited, this, &WEditorProperties::OnInstanceNameEdited);
|
||||
connect(mpInstanceNameLineEdit, &QLineEdit::editingFinished, this, &WEditorProperties::OnInstanceNameEditFinished);
|
||||
connect(mpLayersComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this, &WEditorProperties::OnLayerChanged);
|
||||
connect(mpLayersComboBox, &QComboBox::currentIndexChanged, this, &WEditorProperties::OnLayerChanged);
|
||||
}
|
||||
|
||||
void WEditorProperties::SyncToEditor(CWorldEditor *pEditor)
|
||||
|
||||
Reference in New Issue
Block a user