OpenShot Library | libopenshot
0.4.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
f
g
h
l
m
p
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Functions
Files
File List
File Members
All
_
a
c
e
f
h
i
k
m
n
o
p
q
r
s
t
u
Functions
Variables
Typedefs
Macros
_
a
e
f
h
i
k
m
n
o
p
q
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
TrackedObjectBase.cpp
Go to the documentation of this file.
1
10
// Copyright (c) 2008-2019 OpenShot Studios, LLC
11
//
12
// SPDX-License-Identifier: LGPL-3.0-or-later
13
14
#include "
TrackedObjectBase.h
"
15
16
#include "
Json.h
"
17
18
namespace
openshot
19
{
20
21
// Default constructor, delegating
22
TrackedObjectBase::TrackedObjectBase
() :
TrackedObjectBase
(
""
) {}
23
24
// Constructor
25
TrackedObjectBase::TrackedObjectBase
(std::string _id)
26
: visible(1.0), draw_box(1), id(_id) {}
27
28
Json::Value
TrackedObjectBase::add_property_choice_json
(
29
std::string name,
int
value,
int
selected_value)
const
30
{
31
// Create choice
32
Json::Value new_choice = Json::Value(Json::objectValue);
33
new_choice[
"name"
] = name;
34
new_choice[
"value"
] = value;
35
new_choice[
"selected"
] = (value == selected_value);
36
37
// return JsonValue
38
return
new_choice;
39
}
40
}
// namespace openshot
openshot
This namespace is the default namespace for all code in the openshot library.
Definition:
Compressor.h:28
openshot::TrackedObjectBase
This abstract class is the base class of all Tracked Objects.
Definition:
TrackedObjectBase.h:35
openshot::TrackedObjectBase::add_property_choice_json
Json::Value add_property_choice_json(std::string name, int value, int selected_value) const
Generate JSON choice for a property (dropdown properties)
Definition:
TrackedObjectBase.cpp:28
openshot::TrackedObjectBase::TrackedObjectBase
TrackedObjectBase()
Default constructor.
Definition:
TrackedObjectBase.cpp:22
Json.h
Header file for JSON class.
TrackedObjectBase.h
Header file for the TrackedObjectBase class.
Generated by
1.8.17