- Auto-scroll standard aktiv

- Tag-Filter wird gespeichert
- Tag Monitor kann bei einem Tag jetzt pro Key mehrere Werte in einer Tabelle anzeigen
- Bug für Clear behoben
This commit is contained in:
2026-06-23 23:19:06 +02:00
parent 92168ee5dc
commit d3229c7b64
29 changed files with 342 additions and 380 deletions

View File

@@ -7,18 +7,9 @@
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QThread>
#include <QTimer>
#include "v4l2worker.h"
// VideoWidget shows a live preview of a V4L2 capture device.
// It lives in the right-side panel, below the Tag Monitor.
// Features:
// - Device selector (auto-enumerates /dev/video*)
// - Start / Stop capture
// - Freeze-frame toggle
// - Screenshot (saves current frame as PNG/JPG)
// - Frame is scaled to fit the widget while keeping aspect ratio
class VideoWidget : public QWidget
{
Q_OBJECT
@@ -28,12 +19,11 @@ public:
~VideoWidget();
public:
// Called by MainWindow::closeEvent to guarantee orderly shutdown before
// widget destruction. Safe to call multiple times.
void shutdown();
void shutdown(); // safe to call multiple times, called from MainWindow::closeEvent
public slots:
void onNewFrame(const QImage &frame);
void clearFrame(); // blanks the preview (used on ANSI clear-screen)
private slots:
void onStartStop();
@@ -51,21 +41,18 @@ private:
void stopCapture();
void updateScaled();
// Worker
QThread *m_thread = nullptr;
V4l2Worker *m_worker = nullptr;
// Current frame
QImage m_frame;
QImage m_scaled;
bool m_frozen = false;
bool m_running = false;
bool m_shutdownDone = false;
// UI
QComboBox *m_deviceCombo = nullptr;
QPushButton *m_startBtn = nullptr;
QPushButton *m_freezeBtn = nullptr;
QPushButton *m_screenshotBtn= nullptr;
QLabel *m_infoLabel = nullptr;
QComboBox *m_deviceCombo = nullptr;
QPushButton *m_startBtn = nullptr;
QPushButton *m_freezeBtn = nullptr;
QPushButton *m_screenshotBtn = nullptr;
QLabel *m_infoLabel = nullptr;
};