1 /***************************************************************************
2 * Copyright (C) 2007 by Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef COMPONENTTIMELINEWIDGET_H
22 #define COMPONENTTIMELINEWIDGET_H
27 class QTreeWidgetItem
;
36 * @author Jorge Cuadrado <kuadrosxx@gmail.com>
38 class TimeLineWidget
: public QSplitter
49 ChangeFrameVisibility
,
58 ChangeLayerVisibility
,
78 TimeLineWidget(QWidget
* parent
= 0);
86 void insertScene(int position
, const QString
&name
);
87 void removeScene(int position
);
88 void renameScene(int position
, const QString
&name
);
89 void moveScene(int from
, int to
);
90 void setScene(int position
);
91 void closeAllScenes();
93 void insertLayer(int scenePos
, int position
, const QString
&name
);
94 void insertAudioLayer(int scenePos
, int position
, const QString
&name
, int startFrame
= 0);
95 void removeLayer(int scenePos
, int position
);
96 void renameLayer(int scenePos
, int layerPos
, const QString
&name
);
98 void setLayerVisibility(int scenePos
, int position
, bool isVisible
);
99 void setLayerLocked(int scenePos
, int position
, bool locked
);
100 void moveLayer(int scenePos
, int from
, int to
);
101 void setLayer(int scenePos
, int position
);
103 void insertFrame(int scenePos
, int layerPos
, int position
, const QString
&name
);
104 void removeFrame(int scenePos
, int layerPos
, int position
);
105 void renameFrame(int scenePos
, int layerPos
, int position
, const QString
&name
);
106 void moveFrame(int scenePos
, int layerPos
, int from
, int to
);
107 void setFrame(int scenePos
, int layerPos
, int position
);
108 void setFrameVisibility(int scenePos
, int layerPos
, int position
, bool isVisible
);
109 void setFrameLocked(int scenePos
, int layerPos
, int position
, bool locked
);
110 void groupFrames(int scenePos
, int layerPos
, int from
, int to
);
111 void expandFrame(int scenePos
, int layerPos
, int position
, int size
);
112 void destroyGroupFrames(int scenePos
, int layerPos
, int position
, int size
);
117 void frameSelected(int scenePos
, int layerPos
, int framePos
);
118 void postEvent(const TimeLineWidget::Event
& event
);
121 void onItemClicked(QTreeWidgetItem
*item
, int column
);
122 void onItemChanged(QTreeWidgetItem
*, int);
123 void onFrameSelected(int layerPosition
, int framePosition
);
124 void onLayerSelected(int layerPosition
);
125 void onLayerRenamed(int layerPosition
, const QString
&newName
);
126 void onLayerLocked(int layerPosition
, bool locked
);
127 void onLayerVisibilityChanged(int layerPosition
, bool isVisible
);
128 void onButtonClicked(int action
);
130 void onRequestInsertFrame(int layerPosition
, int framePosition
);
131 void onRequestRemoveFrame(int layerPosition
, int framePosition
);
132 void onRequestLockFrame(int layerPosition
, int framePosition
, bool locked
);
133 void onRequestChangeFrameVisibility(int layerPosition
, int framePosition
, bool visibility
);
134 void onRequestExpandFrame(int layerPosition
, int framePosition
, int size
);
139 LayerManager
*layerManager(int sceneIndex
);
140 FramesTable
*framesTable(int sceneIndex
);