mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-28 16:59:00 -04:00
The Status enum is renamed to Category as it's more appropriate. Adds handling for plugins in safe mode by always putting them in the Installed category since we can't know if they're Errored or Missing. Also displays the Disabled indicator for all plugins in safe mode.
65 lines
1.9 KiB
C++
65 lines
1.9 KiB
C++
/******************************************************************************
|
|
Copyright (C) 2025 by FiniteSingularity <finitesingularityttv@gmail.com>
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
******************************************************************************/
|
|
|
|
#pragma once
|
|
|
|
#include "PluginManager.hpp"
|
|
|
|
#include <QDialog>
|
|
#include <QWidget>
|
|
|
|
#include "ui_PluginManagerWindow.h"
|
|
|
|
namespace OBS {
|
|
|
|
class PluginManagerWindow : public QDialog {
|
|
Q_OBJECT
|
|
std::unique_ptr<Ui::PluginManagerWindow> ui;
|
|
|
|
public:
|
|
enum class Category { Invalid = 0, Installed, Error, Missing };
|
|
|
|
struct Entry {
|
|
OBS::ModuleInfo *module{nullptr};
|
|
QString name{};
|
|
Category category{Category::Invalid};
|
|
bool isLegacy{false};
|
|
};
|
|
|
|
enum class Page { Installed };
|
|
|
|
explicit PluginManagerWindow(std::vector<ModuleInfo> const &modules,
|
|
std::vector<std::string> const &failedModules, QWidget *parent = nullptr);
|
|
|
|
std::vector<ModuleInfo> const getModules() { return modules_; }
|
|
bool isEnabledPluginsChanged();
|
|
|
|
void setPage(Page page);
|
|
|
|
private:
|
|
std::vector<ModuleInfo> modules_;
|
|
std::vector<Entry> installedPluginEntries;
|
|
|
|
void setupInstalledPage(std::vector<std::string> failedModules);
|
|
|
|
void sectionSelectionChanged();
|
|
QPersistentModelIndex activeSectionIndex;
|
|
void setSection(int sidebarRow);
|
|
};
|
|
|
|
}; // namespace OBS
|