You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
* 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
52 lines
1.0 KiB
C++
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
|