refactor(arch): split the app into a logic core and per-screen pages
All the business logic now lives in AppCore (providers, workers, history, plugins, sudo and pacman-lock handling), freed from any widget so it runs headless and is testable on its own. The Qt window becomes a thin frame around one file per screen under pages/, wired through a common Page contract and a shared ui-kit. CMake gains the app-core-test target, which links Qt Core only to enforce the headless guarantee. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
1 parent
576daf2fae
commit
897c174925
24 files changed
+4322
-3056
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "page.h"
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
class QTableWidget;
|
||||
|
||||
// Plugins: the add-on store. Lists every plugin known to the application
|
||||
// (package-manager providers and generic addons, built-in and external), lets
|
||||
// the user enable/disable one, install the tool behind an unavailable provider
|
||||
// and rescan the plugin directories.
|
||||
class PluginsPage : public Page {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PluginsPage(AppCore* core, QWidget* parent = nullptr);
|
||||
|
||||
QString navTitle() const override { return QStringLiteral("Plugins"); }
|
||||
QString navSubtitle() const override {
|
||||
return QStringLiteral("Gestionnaires de paquets et extensions");
|
||||
}
|
||||
|
||||
void refresh() override;
|
||||
|
||||
private:
|
||||
void refreshTable();
|
||||
void onSelected(int row);
|
||||
|
||||
QTableWidget* m_table = nullptr;
|
||||
QLabel* m_description = nullptr;
|
||||
QPushButton* m_toggleButton = nullptr;
|
||||
QPushButton* m_installButton = nullptr;
|
||||
std::string m_selectedId;
|
||||
};
|
||||
Reference in new issue
Block a user