Files
libopenshot/src/Qt/VideoRenderWidget.h
Frank Dana 59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00

52 lines
1.0 KiB
C++

/**
* @file
* @brief Header file for Video RendererWidget class
* @author Jonathan Thomas <jonathan@openshot.org>
*
* @ref License
*/
// Copyright (c) 2008-2019 OpenShot Studios, LLC
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#ifndef OPENSHOT_VIDEO_RENDERER_WIDGET_H
#define OPENSHOT_VIDEO_RENDERER_WIDGET_H
#include "../Fraction.h"
#include "VideoRenderer.h"
#include <QWidget>
#include <QImage>
#include <QPaintEvent>
#include <QRect>
class VideoRenderWidget : public QWidget
{
Q_OBJECT
private:
VideoRenderer *renderer;
QImage image;
openshot::Fraction aspect_ratio;
openshot::Fraction pixel_ratio;
public:
VideoRenderWidget(QWidget *parent = 0);
~VideoRenderWidget();
VideoRenderer *GetRenderer() const;
void SetAspectRatio(openshot::Fraction new_aspect_ratio, openshot::Fraction new_pixel_ratio);
protected:
void paintEvent(QPaintEvent *event);
QRect centeredViewport(int width, int height);
private slots:
void present(const QImage &image);
};
#endif // OPENSHOT_VIDEO_RENDERER_WIDGET_H