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>
14 lines
331 B
C++
14 lines
331 B
C++
#include "page.h"
|
|
|
|
#include <QMainWindow>
|
|
|
|
Page::Page(AppCore* core, QWidget* parent) : QWidget(parent), m_core(core) {}
|
|
|
|
QMainWindow* Page::mainWindow() const {
|
|
return qobject_cast<QMainWindow*>(window());
|
|
}
|
|
|
|
void Page::start(const AppCore::StartResult& result, const QString& title) {
|
|
emit requestStart(result, title);
|
|
}
|