CWorldInfoSidebar: Make use of Qt 5 signals and slots

This commit is contained in:
Lioncash 2020-07-03 06:51:41 -04:00
parent 9c8749d5b0
commit 66a6ff3e86
1 changed files with 5 additions and 5 deletions

View File

@ -16,11 +16,11 @@ CWorldInfoSidebar::CWorldInfoSidebar(CWorldEditor *pEditor)
QHeaderView *pHeader = mpUI->WorldTreeView->header(); QHeaderView *pHeader = mpUI->WorldTreeView->header();
pHeader->resizeSection(0, pHeader->width() * 2); // I really have no idea how this works, I just got this from trial & error pHeader->resizeSection(0, pHeader->width() * 2); // I really have no idea how this works, I just got this from trial & error
connect(gpEdApp, SIGNAL(ActiveProjectChanged(CGameProject*)), this, SLOT(OnActiveProjectChanged(CGameProject*))); connect(gpEdApp, &CEditorApplication::ActiveProjectChanged, this, &CWorldInfoSidebar::OnActiveProjectChanged);
connect(mpUI->ProjectSettingsButton, SIGNAL(pressed()), pEditor, SLOT(OpenProjectSettings())); connect(mpUI->ProjectSettingsButton, &QPushButton::pressed, pEditor, &CWorldEditor::OpenProjectSettings);
connect(mpUI->AreaSearchLineEdit, SIGNAL(StoppedTyping(QString)), this, SLOT(OnAreaFilterStringChanged(QString))); connect(mpUI->AreaSearchLineEdit, &CTimedLineEdit::StoppedTyping, this, &CWorldInfoSidebar::OnAreaFilterStringChanged);
connect(mpUI->WorldTreeView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(OnWorldTreeClicked(QModelIndex))); connect(mpUI->WorldTreeView->selectionModel(), &QItemSelectionModel::currentChanged, this, &CWorldInfoSidebar::OnWorldTreeClicked);
connect(mpUI->WorldTreeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OnWorldTreeDoubleClicked(QModelIndex))); connect(mpUI->WorldTreeView, &QTreeView::doubleClicked, this, &CWorldInfoSidebar::OnWorldTreeDoubleClicked);
// Set up UI for world/area info; disable editing for now // Set up UI for world/area info; disable editing for now
mpUI->ProjectInfoWidget->setHidden(true); mpUI->ProjectInfoWidget->setHidden(true);