Automatisierte Screenshot Aufnahme per [SCREENSHOT] datei implementiert
This commit is contained in:
@@ -27,10 +27,27 @@ public:
|
||||
|
||||
public:
|
||||
void shutdown(); // safe to call multiple times, called from MainWindow::closeEvent
|
||||
// Folder that saveAutoScreenshot() writes into. Empty = not configured
|
||||
// (saveAutoScreenshot() will report an error instead of silently
|
||||
// dropping the request).
|
||||
void setAutoScreenshotDir(const QString &dir) { m_autoScreenshotDir = dir; }
|
||||
|
||||
public slots:
|
||||
void onNewFrame(const QImage &frame);
|
||||
void clearFrame(); // blanks the preview (used on ANSI clear-screen)
|
||||
// Saves whichever frame is currently in m_frame under `filename` inside
|
||||
// m_autoScreenshotDir. Triggered by a [SCREENSHOT] control tag from the
|
||||
// firmware - the point is to grab the frame that's already in flight
|
||||
// the instant the tag arrives (no dialog, no user reaction time), e.g.
|
||||
// to reliably catch a video frame showing a memory dump.
|
||||
void saveAutoScreenshot(const QString &filename);
|
||||
|
||||
signals:
|
||||
// Emitted after every saveAutoScreenshot() attempt so the caller (the
|
||||
// main window) can surface a transient status message. Never blocks/
|
||||
// pops a dialog itself, since this can fire in rapid succession from
|
||||
// firmware-driven triggers.
|
||||
void autoScreenshotResult(bool success, const QString &message);
|
||||
|
||||
private slots:
|
||||
void onStartStop();
|
||||
@@ -76,4 +93,8 @@ private:
|
||||
QProcess *m_recordProcess = nullptr;
|
||||
bool m_recording = false;
|
||||
QSize m_recordSize;
|
||||
|
||||
// Folder for saveAutoScreenshot() ([SCREENSHOT] tag). Set via
|
||||
// setAutoScreenshotDir(), persisted/restored by MainWindow.
|
||||
QString m_autoScreenshotDir;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user