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,36 @@
|
||||
#pragma once
|
||||
|
||||
#include "page.h"
|
||||
|
||||
class QLabel;
|
||||
class QListWidget;
|
||||
class QListWidgetItem;
|
||||
|
||||
// Tableau de bord: the four figures of the system, the shortcuts to the pages
|
||||
// used most often, and the last recorded actions.
|
||||
class DashboardPage : public Page {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DashboardPage(AppCore* core, QWidget* parent = nullptr);
|
||||
|
||||
QString navTitle() const override { return QStringLiteral("Tableau de bord"); }
|
||||
QString navSubtitle() const override {
|
||||
return QStringLiteral("Vue d'ensemble de votre système");
|
||||
}
|
||||
|
||||
void refresh() override;
|
||||
|
||||
signals:
|
||||
// A click on a recent action opens that package on the Installed screen.
|
||||
void openPackage(const QString& name);
|
||||
|
||||
private:
|
||||
void refreshRecentActivity();
|
||||
void onActivityClicked(QListWidgetItem* item);
|
||||
|
||||
QLabel* m_statInstalled = nullptr;
|
||||
QLabel* m_statUpdates = nullptr;
|
||||
QLabel* m_statHistory = nullptr;
|
||||
QLabel* m_statManager = nullptr;
|
||||
QListWidget* m_recentList = nullptr;
|
||||
};
|
||||
Reference in new issue
Block a user