Pencil2D
ff90c0872e88be3bf81c548cd60f01983012ec49
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
Main Page
Classes
Files
File List
All
Classes
Functions
core_lib
structure
layercamera.h
1
/*
2
3
Pencil - Traditional Animation Software
4
Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5
Copyright (C) 2012-2017 Matthew Chiawen Chang
6
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License
9
as published by the Free Software Foundation; version 2 of the License.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
*/
17
#ifndef LAYERCAMERA_H
18
#define LAYERCAMERA_H
19
20
#include <QList>
21
#include <QDialog>
22
#include "layer.h"
23
24
class
QLineEdit;
25
class
QSpinBox;
26
class
Camera
;
27
28
class
CameraPropertiesDialog
:
public
QDialog
29
{
30
Q_OBJECT
31
public
:
32
CameraPropertiesDialog
(QString name,
int
width,
int
height);
33
~
CameraPropertiesDialog
();
34
QString getName();
35
void
setName(QString);
36
int
getWidth();
37
void
setWidth(
int
);
38
int
getHeight();
39
void
setHeight(
int
);
40
protected
:
41
QLineEdit* nameBox;
42
QSpinBox* widthBox, *heightBox;
43
};
44
45
class
LayerCamera
:
public
Layer
46
{
47
Q_OBJECT
48
49
public
:
50
// constructor
51
LayerCamera
(
Object
*
object
);
52
~
LayerCamera
();
53
54
void
loadImageAtFrame(
int
, QTransform);
55
56
void
editProperties()
override
;
57
QDomElement createDomElement(QDomDocument& doc)
override
;
58
void
loadDomElement(QDomElement element, QString dataDirPath)
override
;
59
60
Camera
* getCameraAtFrame(
int
frameNumber);
61
Camera
* getLastCameraAtFrame(
int
frameNumber,
int
increment);
62
QTransform getViewAtFrame(
int
frameNumber);
63
64
QRect getViewRect();
65
QSize getViewSize();
66
67
protected
:
68
Status
saveKeyFrame(
KeyFrame
*, QString path )
override
;
69
70
QRect viewRect;
71
CameraPropertiesDialog
* dialog;
72
};
73
74
#endif
LayerCamera
Definition:
layercamera.h:45
CameraPropertiesDialog
Definition:
layercamera.h:28
Camera
Definition:
camera.h:24
KeyFrame
Definition:
keyframe.h:29
Layer
Definition:
layer.h:32
Status
Definition:
pencilerror.h:24
Object
Definition:
object.h:71
Generated on Fri Sep 1 2017 16:48:41 for Pencil2D by
1.8.6