Simplify XDMA types and add fullscreen preview
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QKeyEvent;
|
||||
class QMouseEvent;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui
|
||||
{
|
||||
@@ -18,15 +21,24 @@ public:
|
||||
~PreviewWindow() override;
|
||||
|
||||
void *nativePreviewHandle() const;
|
||||
void setSourceSize(int sourceWidth, int sourceHeight);
|
||||
void closePreview();
|
||||
|
||||
public slots:
|
||||
void showPreview();
|
||||
void showPreview(int sourceWidth = 0, int sourceHeight = 0);
|
||||
void showFullscreenPreview(int sourceWidth = 0, int sourceHeight = 0);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
void enterFullscreen();
|
||||
void exitFullscreen();
|
||||
|
||||
Ui::PreviewWindow *ui_ = nullptr;
|
||||
bool closeAllowed_ = false;
|
||||
int sourceWidth_ = 0;
|
||||
int sourceHeight_ = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user