OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
QtHtmlReader.h
Go to the documentation of this file.
1
10
11
// Copyright (c) 2008-2019 OpenShot Studios, LLC
12
//
13
// SPDX-License-Identifier: LGPL-3.0-or-later
14
15
#ifndef OPENSHOT_QT_HTML_READER_H
16
#define OPENSHOT_QT_HTML_READER_H
17
18
#include "
ReaderBase.h
"
19
20
#include <cmath>
21
#include <ctime>
22
#include <iostream>
23
#include <omp.h>
24
#include <stdio.h>
25
#include <memory>
26
#include "
CacheMemory.h
"
27
#include "
Enums.h
"
28
29
30
class
QImage;
31
32
namespace
openshot
33
{
34
// Forward decls
35
class
CacheBase
;
36
69
class
QtHtmlReader
:
public
ReaderBase
70
{
71
private
:
72
int
width;
73
int
height;
74
int
x_offset;
75
int
y_offset;
76
std::string html;
77
std::string css;
78
std::string background_color;
79
std::shared_ptr<QImage> image;
80
bool
is_open;
81
openshot::GravityType
gravity;
82
public
:
83
85
QtHtmlReader
();
86
96
QtHtmlReader
(
int
width,
int
height,
int
x_offset,
int
y_offset,
GravityType
gravity, std::string html, std::string css, std::string background_color);
97
99
void
Close
()
override
;
100
102
CacheBase
*
GetCache
()
override
{
return
NULL; };
103
109
std::shared_ptr<openshot::Frame>
GetFrame
(int64_t requested_frame)
override
;
110
112
bool
IsOpen
()
override
{
return
is_open; };
113
115
std::string
Name
()
override
{
return
"QtHtmlReader"
; };
116
117
// Get and Set JSON methods
118
std::string
Json
()
const override
;
119
void
SetJson
(
const
std::string value)
override
;
120
Json::Value
JsonValue
()
const override
;
121
void
SetJsonValue
(
const
Json::Value root)
override
;
122
124
void
Open
()
override
;
125
};
126
127
}
128
129
#endif
CacheMemory.h
Header file for CacheMemory class.
Enums.h
Header file for TextReader class.
ReaderBase.h
Header file for ReaderBase class.
openshot::CacheBase
All cache managers in libopenshot are based on this CacheBase class.
Definition
CacheBase.h:35
openshot::QtHtmlReader::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
QtHtmlReader.cpp:219
openshot::QtHtmlReader::GetFrame
std::shared_ptr< openshot::Frame > GetFrame(int64_t requested_frame) override
Definition
QtHtmlReader.cpp:146
openshot::QtHtmlReader::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
QtHtmlReader.cpp:183
openshot::QtHtmlReader::GetCache
CacheBase * GetCache() override
Get the cache object used by this reader (always returns NULL for this object).
Definition
QtHtmlReader.h:102
openshot::QtHtmlReader::Json
std::string Json() const override
Generate JSON string of this object.
Definition
QtHtmlReader.cpp:176
openshot::QtHtmlReader::Close
void Close() override
Close Reader.
Definition
QtHtmlReader.cpp:129
openshot::QtHtmlReader::QtHtmlReader
QtHtmlReader()
Default constructor (blank text).
Definition
QtHtmlReader.cpp:28
openshot::QtHtmlReader::IsOpen
bool IsOpen() override
Determine if reader is open or closed.
Definition
QtHtmlReader.h:112
openshot::QtHtmlReader::Open
void Open() override
Open Reader - which is called by the constructor automatically.
Definition
QtHtmlReader.cpp:44
openshot::QtHtmlReader::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
QtHtmlReader.cpp:202
openshot::QtHtmlReader::Name
std::string Name() override
Return the type name of the class.
Definition
QtHtmlReader.h:115
openshot::ReaderBase::ReaderBase
ReaderBase()
Constructor for the base reader, where many things are initialized.
Definition
ReaderBase.cpp:27
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
openshot::GravityType
GravityType
This enumeration determines how clips are aligned to their parent container.
Definition
Enums.h:22
QtHtmlReader.h
Generated by
1.17.0