feat(app): add --simulate flag for headless demo captures
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4f6fe37b4d
commit
730d0fa7a7
@ -229,6 +229,11 @@ void MainWindow::loadSample()
|
||||
m_view->zoomToFit();
|
||||
}
|
||||
|
||||
void MainWindow::setSimulationRunning(bool running)
|
||||
{
|
||||
m_simulateAction->setChecked(running);
|
||||
}
|
||||
|
||||
void MainWindow::runSimulation(bool enabled)
|
||||
{
|
||||
if (enabled) {
|
||||
|
||||
@ -22,6 +22,7 @@ public:
|
||||
NetworkModel* model() const { return m_model; }
|
||||
|
||||
void loadSample();
|
||||
void setSimulationRunning(bool running);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
@ -14,6 +14,8 @@ int main(int argc, char** argv)
|
||||
const QStringList args = app.arguments();
|
||||
if (args.contains(QStringLiteral("--sample")))
|
||||
window.loadSample();
|
||||
if (args.contains(QStringLiteral("--simulate")))
|
||||
window.setSimulationRunning(true);
|
||||
|
||||
// Headless smoke check: --screenshot <file.png> renders and exits.
|
||||
const int shotIdx = args.indexOf(QStringLiteral("--screenshot"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user