|
|
@ -29,8 +29,8 @@ void ContentSelectorView::ContentSelector::buildGameFileView()
|
|
|
|
ui.gameFileView->addItem("<No game file>");
|
|
|
|
ui.gameFileView->addItem("<No game file>");
|
|
|
|
ui.gameFileView->setVisible(true);
|
|
|
|
ui.gameFileView->setVisible(true);
|
|
|
|
|
|
|
|
|
|
|
|
connect (ui.gameFileView, SIGNAL (currentIndexChanged(int)),
|
|
|
|
connect (ui.gameFileView, qOverload<int>(&ComboBox::currentIndexChanged),
|
|
|
|
this, SLOT (slotCurrentGameFileIndexChanged(int)));
|
|
|
|
this, &ContentSelector::slotCurrentGameFileIndexChanged);
|
|
|
|
|
|
|
|
|
|
|
|
ui.gameFileView->setCurrentIndex(0);
|
|
|
|
ui.gameFileView->setCurrentIndex(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -63,20 +63,21 @@ void ContentSelectorView::ContentSelector::buildAddonView()
|
|
|
|
mAddonProxyModel->setDynamicSortFilter (true);
|
|
|
|
mAddonProxyModel->setDynamicSortFilter (true);
|
|
|
|
mAddonProxyModel->setSourceModel (mContentModel);
|
|
|
|
mAddonProxyModel->setSourceModel (mContentModel);
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui.searchFilter, SIGNAL(textEdited(QString)), mAddonProxyModel, SLOT(setFilterWildcard(QString)));
|
|
|
|
connect(ui.searchFilter, &QLineEdit::textEdited, mAddonProxyModel, &QSortFilterProxyModel::setFilterWildcard);
|
|
|
|
connect(ui.searchFilter, SIGNAL(textEdited(QString)), this, SLOT(slotSearchFilterTextChanged(QString)));
|
|
|
|
connect(ui.searchFilter, &QLineEdit::textEdited, this, &ContentSelector::slotSearchFilterTextChanged);
|
|
|
|
|
|
|
|
|
|
|
|
ui.addonView->setModel(mAddonProxyModel);
|
|
|
|
ui.addonView->setModel(mAddonProxyModel);
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui.addonView, SIGNAL(activated(const QModelIndex&)), this, SLOT(slotAddonTableItemActivated(const QModelIndex&)));
|
|
|
|
connect(ui.addonView, &QTableView::activated, this, &ContentSelector::slotAddonTableItemActivated);
|
|
|
|
connect(mContentModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SIGNAL(signalAddonDataChanged(QModelIndex,QModelIndex)));
|
|
|
|
connect(mContentModel, &ContentSelectorModel::ContentModel::dataChanged,
|
|
|
|
|
|
|
|
this, &ContentSelector::signalAddonDataChanged);
|
|
|
|
buildContextMenu();
|
|
|
|
buildContextMenu();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ContentSelectorView::ContentSelector::buildContextMenu()
|
|
|
|
void ContentSelectorView::ContentSelector::buildContextMenu()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui.addonView->setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
|
ui.addonView->setContextMenuPolicy(Qt::CustomContextMenu);
|
|
|
|
connect(ui.addonView, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(slotShowContextMenu(const QPoint&)));
|
|
|
|
connect(ui.addonView, &QTableView::customContextMenuRequested, this, &ContentSelector::slotShowContextMenu);
|
|
|
|
|
|
|
|
|
|
|
|
mContextMenu = new QMenu(ui.addonView);
|
|
|
|
mContextMenu = new QMenu(ui.addonView);
|
|
|
|
mContextMenu->addAction(tr("&Check Selected"), this, SLOT(slotCheckMultiSelectedItems()));
|
|
|
|
mContextMenu->addAction(tr("&Check Selected"), this, SLOT(slotCheckMultiSelectedItems()));
|
|
|
|