diff options
| author | Silarn <jrim@rimpo.org> | 2019-12-31 02:42:00 -0600 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-21 17:11:59 -0500 |
| commit | 2f7478f8fc3ab047eaab44cd666bcc06bf15a127 (patch) | |
| tree | 3788291a5fd73032263fdf0eb5649e8590bd060e /src/mainwindow.cpp | |
| parent | f764271b1f1fa457af9dd4f7d044005d46fcd84b (diff) | |
WIP: Fix data storage and fix loading
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2b653059..76b7e37f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -419,7 +419,7 @@ MainWindow::MainWindow(Settings& settings, OrganizerCore& organizerCore, connect(&NexusInterface::instance(), SIGNAL(needLogin()), &m_OrganizerCore, SLOT(nexusApi())); - connect(CategoryFactory::instance(), SIGNAL(requestNexusCategories()), &m_OrganizerCore, SLOT(requestNexusCategories())); + connect(CategoryFactory::instance(), SIGNAL(requestNexusCategories()), this, SLOT(requestNexusCategories())); connect( NexusInterface::instance(&pluginContainer)->getAccessManager(), @@ -3913,6 +3913,65 @@ void MainWindow::originModified(int originID) DirectoryRefresher::cleanStructure(m_OrganizerCore.directoryStructure()); } + +void MainWindow::enableSelectedPlugins_clicked() +{ + m_OrganizerCore.pluginList()->enableSelected(ui->espList->selectionModel()); +} + + +void MainWindow::disableSelectedPlugins_clicked() +{ + m_OrganizerCore.pluginList()->disableSelected(ui->espList->selectionModel()); +} + +void MainWindow::sendSelectedPluginsToTop_clicked() +{ + m_OrganizerCore.pluginList()->sendToPriority(ui->espList->selectionModel(), 0); +} + +void MainWindow::sendSelectedPluginsToBottom_clicked() +{ + m_OrganizerCore.pluginList()->sendToPriority(ui->espList->selectionModel(), INT_MAX); +} + +void MainWindow::sendSelectedPluginsToPriority_clicked() +{ + bool ok; + int newPriority = QInputDialog::getInt(this, + tr("Set Priority"), tr("Set the priority of the selected plugins"), + 0, 0, INT_MAX, 1, &ok); + if (!ok) return; + + m_OrganizerCore.pluginList()->sendToPriority(ui->espList->selectionModel(), newPriority); +} + +void MainWindow::requestNexusCategories() +{ + CategoriesDialog dialog(&m_PluginContainer, this); + + if (dialog.exec() == QDialog::Accepted) { + dialog.commitChanges(); + } +} + +void MainWindow::enableSelectedMods_clicked() +{ + m_OrganizerCore.modList()->enableSelected(ui->modList->selectionModel()); + if (m_ModListSortProxy != nullptr) { + m_ModListSortProxy->invalidate(); + } +} + + +void MainWindow::disableSelectedMods_clicked() +{ + m_OrganizerCore.modList()->disableSelected(ui->modList->selectionModel()); + if (m_ModListSortProxy != nullptr) { + m_ModListSortProxy->invalidate(); + } +} + void MainWindow::updateAvailable() { ui->actionUpdate->setEnabled(true); |
