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
managers
layermanager.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
18
#ifndef LAYER_MANAGER_H
19
#define LAYER_MANAGER_H
20
21
#include "basemanager.h"
22
23
class
Layer
;
24
class
LayerBitmap
;
25
class
LayerVector
;
26
class
LayerCamera
;
27
class
LayerSound
;
28
29
30
class
LayerManager
:
public
BaseManager
31
{
32
Q_OBJECT
33
34
public
:
35
LayerManager
( QObject* pParant );
36
~
LayerManager
();
37
bool
init()
override
;
38
Status
load(
Object
* )
override
;
39
Status
save(
Object
* )
override
;
40
41
// Layer Management
42
Layer
* currentLayer();
43
Layer
* currentLayer(
int
offset );
44
Layer
* getLayer(
int
index );
45
int
getLastCameraLayer();
46
int
currentLayerIndex();
47
void
setCurrentLayer(
int
nIndex );
48
void
setCurrentLayer(
Layer
* layer );
49
int
count();
50
51
bool
deleteCurrentLayer();
52
53
void
gotoNextLayer();
54
void
gotoPreviouslayer();
55
56
LayerBitmap
* createBitmapLayer(
const
QString& strLayerName );
57
LayerVector
* createVectorLayer(
const
QString& strLayerName );
58
LayerCamera
* createCameraLayer(
const
QString& strLayerName );
59
LayerSound
* createSoundLayer(
const
QString& strLayerName );
60
61
// KeyFrame Management
62
int
LastFrameAtFrame(
int
frameIndex );
63
int
firstKeyFrameIndex();
64
int
lastKeyFrameIndex();
65
66
int
projectLength();
67
68
void
layerUpdated(
int
layerId );
69
70
Q_SIGNALS:
71
void
currentLayerChanged(
int
n );
72
void
layerCountChanged(
int
count );
73
74
private
:
75
int
mCurrentLayerIndex = 0;
// the current layer to be edited/displayed
76
int
lastCameraLayer = 0;
77
};
78
79
#endif
LayerCamera
Definition:
layercamera.h:45
LayerManager
Definition:
layermanager.h:30
LayerBitmap
Definition:
layerbitmap.h:24
LayerVector
Definition:
layervector.h:25
BaseManager
Definition:
basemanager.h:26
Layer
Definition:
layer.h:32
Status
Definition:
pencilerror.h:24
Object
Definition:
object.h:71
LayerSound
Definition:
layersound.h:24
Generated on Fri Sep 1 2017 16:48:40 for Pencil2D by
1.8.6