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>
33 lines
751 B
C++
33 lines
751 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
|
|
#include "page.h"
|
|
|
|
class QLineEdit;
|
|
class QTextEdit;
|
|
|
|
// Logs pacman: the raw /var/log/pacman.log, filtered in memory so typing stays
|
|
// instant even with a multi-megabyte file (the core reads it, the page keeps a
|
|
// copy).
|
|
class LogsPage : public Page {
|
|
Q_OBJECT
|
|
public:
|
|
explicit LogsPage(AppCore* core, QWidget* parent = nullptr);
|
|
|
|
QString navTitle() const override { return QStringLiteral("Logs pacman"); }
|
|
QString navSubtitle() const override {
|
|
return QStringLiteral("Journal brut du gestionnaire de paquets");
|
|
}
|
|
|
|
void refresh() override;
|
|
|
|
private:
|
|
void load();
|
|
void applyFilter();
|
|
|
|
QLineEdit* m_filter = nullptr;
|
|
QTextEdit* m_text = nullptr;
|
|
QString m_raw;
|
|
};
|