pages/ was a flat row of eight screens, so a change to one meant scanning the whole folder to see what else was in it. The screens now sit in packages/ (browse, cleanup), overview/ (dashboard, history), system/ (logs, settings) and extensions/ (plugins), with the scaffolding they all build on — the Page base and the shared widgets — in base/.
37 lines
999 B
C++
37 lines
999 B
C++
#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;
|
|
};
|