OpenShot Library | libopenshot
0.2.7
Qt
VideoRenderWidget.h
Go to the documentation of this file.
1
/**
2
* @file
3
* @brief Header file for Video RendererWidget class
4
* @author Jonathan Thomas <jonathan@openshot.org>
5
*
6
* @ref License
7
*/
8
9
/* LICENSE
10
*
11
* Copyright (c) 2008-2019 OpenShot Studios, LLC
12
* <http://www.openshotstudios.com/>. This file is part of
13
* OpenShot Library (libopenshot), an open-source project dedicated to
14
* delivering high quality video editing and animation solutions to the
15
* world. For more information visit <http://www.openshot.org/>.
16
*
17
* OpenShot Library (libopenshot) is free software: you can redistribute it
18
* and/or modify it under the terms of the GNU Lesser General Public License
19
* as published by the Free Software Foundation, either version 3 of the
20
* License, or (at your option) any later version.
21
*
22
* OpenShot Library (libopenshot) is distributed in the hope that it will be
23
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
24
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
* GNU Lesser General Public License for more details.
26
*
27
* You should have received a copy of the GNU Lesser General Public License
28
* along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
29
*/
30
31
#ifndef OPENSHOT_VIDEO_RENDERER_WIDGET_H
32
#define OPENSHOT_VIDEO_RENDERER_WIDGET_H
33
34
#include "../Fraction.h"
35
#include "
VideoRenderer.h
"
36
37
#include <QWidget>
38
#include <QImage>
39
#include <QPaintEvent>
40
#include <QRect>
41
42
class
VideoRenderWidget
:
public
QWidget
43
{
44
Q_OBJECT
45
46
private
:
47
VideoRenderer
*renderer;
48
QImage image;
49
openshot::Fraction
aspect_ratio;
50
openshot::Fraction
pixel_ratio;
51
52
public
:
53
VideoRenderWidget
(QWidget *parent = 0);
54
~VideoRenderWidget
();
55
56
VideoRenderer
*
GetRenderer
()
const
;
57
void
SetAspectRatio
(
openshot::Fraction
new_aspect_ratio,
openshot::Fraction
new_pixel_ratio);
58
59
protected
:
60
void
paintEvent
(QPaintEvent *event);
61
62
QRect
centeredViewport
(
int
width,
int
height);
63
64
private
slots:
65
void
present(
const
QImage &image);
66
67
};
68
69
#endif
// OPENSHOT_VIDEO_RENDERER_WIDGET_H
VideoRenderer.h
Header file for Video Renderer class.
VideoRenderWidget
Definition:
VideoRenderWidget.h:43
VideoRenderWidget::centeredViewport
QRect centeredViewport(int width, int height)
Definition:
VideoRenderWidget.cpp:73
VideoRenderWidget::GetRenderer
VideoRenderer * GetRenderer() const
Definition:
VideoRenderWidget.cpp:62
VideoRenderWidget::~VideoRenderWidget
~VideoRenderWidget()
Definition:
VideoRenderWidget.cpp:58
VideoRenderWidget::paintEvent
void paintEvent(QPaintEvent *event)
Definition:
VideoRenderWidget.cpp:87
VideoRenderWidget::SetAspectRatio
void SetAspectRatio(openshot::Fraction new_aspect_ratio, openshot::Fraction new_pixel_ratio)
Definition:
VideoRenderWidget.cpp:67
VideoRenderWidget::VideoRenderWidget
VideoRenderWidget(QWidget *parent=0)
Definition:
VideoRenderWidget.cpp:40
VideoRenderer
Definition:
VideoRenderer.h:43
openshot::Fraction
This class represents a fraction.
Definition:
Fraction.h:48
Generated on Sat Jul 29 2023 19:54:27 for OpenShot Library | libopenshot by
1.9.4