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 * @brief Esta clase representa la interfaz gráfica del componente "TimeLine".
37 * @author Jorge Cuadrado <kuadrosxx@gmail.com>
39 class TimeLineWidget
: public QSplitter
53 ChangeFrameVisibility
,
62 ChangeLayerVisibility
,
81 TimeLineWidget(QWidget
* parent
= 0);
89 void insertScene(int position
, const QString
&name
);
90 void removeScene(int position
);
91 void renameScene(int position
, const QString
&name
);
92 void moveScene(int from
, int to
);
93 void setScene(int position
);
94 void closeAllScenes();
96 void insertLayer(int scenePos
, int position
, const QString
&name
);
97 void insertAudioLayer(int scenePos
, int position
, const QString
&name
, int startFrame
= 0);
98 void removeLayer(int scenePos
, int position
);
99 void renameLayer(int scenePos
, int layerPos
, const QString
&name
);
101 void setLayerVisibility(int scenePos
, int position
, bool isVisible
);
102 void setLayerLocked(int scenePos
, int position
, bool locked
);
103 void moveLayer(int scenePos
, int from
, int to
);
104 void setLayer(int scenePos
, int position
);
106 void insertFrame(int scenePos
, int layerPos
, int position
, const QString
&name
);
107 void removeFrame(int scenePos
, int layerPos
, int position
);
108 void renameFrame(int scenePos
, int layerPos
, int position
, const QString
&name
);
109 void moveFrame(int scenePos
, int layerPos
, int from
, int to
);
110 void setFrame(int scenePos
, int layerPos
, int position
);
111 void setFrameVisibility(int scenePos
, int layerPos
, int position
, bool isVisible
);
112 void setFrameLocked(int scenePos
, int layerPos
, int position
, bool locked
);
113 void groupFrames(int scenePos
, int layerPos
, int from
, int to
);
114 void expandFrame(int scenePos
, int layerPos
, int position
, int size
);
115 void destroyGroupFrames(int scenePos
, int layerPos
, int position
, int size
);
120 void onItemClicked(QTreeWidgetItem
*item
, int column
);
121 void onItemChanged(QTreeWidgetItem
*, int);
122 void onFrameSelected(int layerPosition
, int framePosition
);
123 void onLayerSelected(int layerPosition
);
124 void onLayerRenamed(int layerPosition
, const QString
&newName
);
125 void onLayerLocked(int layerPosition
, bool locked
);
126 void onLayerVisibilityChanged(int layerPosition
, bool isVisible
);
127 void onButtonClicked(int action
);
129 void onRequestInsertFrame(int layerPosition
, int framePosition
);
130 void onRequestRemoveFrame(int layerPosition
, int framePosition
);
132 void onRequestCopyFrame(int layerPosition
, int framePosition
);
133 void onRequestPasteFrame(int layerPosition
, int framePosition
);
134 void onRequestCutFrame(int layerPosition
, int framePosition
);
136 void onRequestLockFrame(int layerPosition
, int framePosition
, bool locked
);
137 void onRequestChangeFrameVisibility(int layerPosition
, int framePosition
, bool visibility
);
138 void onRequestExpandFrame(int layerPosition
, int framePosition
, int size
);
143 LayerManager
*layerManager(int sceneIndex
);
144 FramesTable
*framesTable(int sceneIndex
);
150 void frameSelected(int scenePos
, int layerPos
, int framePos
);
151 void postEvent(const TimeLineWidget::Event
& event
);