Files
SceneSwitcher/plugins/video/screenshot-dialog.hpp
WarmUpTill 107d77f1b8
Some checks failed
debian-build / build (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled
Split macro-condition-video.cpp UI into per-widget files
This makes it easier to conditionally exclude video-edit-object.cpp
from the build when OpenCV >= 5 drops CascadeClassifier support.
2026-08-01 22:34:01 +02:00

45 lines
849 B
C++

#pragma once
#include "parameter-wrappers.hpp"
#include "screenshot-helper.hpp"
#include <obs.h>
#include <QDialog>
#include <QDialogButtonBox>
#include <QImage>
#include <QLabel>
#include <QRubberBand>
#include <QScrollArea>
#include <optional>
namespace advss {
class ScreenshotDialog : public QDialog {
Q_OBJECT
public:
static std::optional<QImage> AskForScreenshot(const VideoInput &,
const AreaParameters &);
private:
ScreenshotDialog(obs_source_t *source, const AreaParameters &area);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
QScrollArea *_scrollArea;
QLabel *_imageLabel;
QPoint _origin;
QRubberBand *_rubberBand = nullptr;
QDialogButtonBox *_buttonBox;
QImage _result;
Screenshot _screenshot;
};
} // namespace advss