* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
+/**
+* @class TrackView
+* @brief Manages the timline
+* @author Jean-Baptiste Mardelle
+*/
#ifndef TRACKVIEW_H
#define TRACKVIEW_H
#include <QScrollArea>
-#include <KRuler>
#include <QGroupBox>
#include <QGraphicsScene>
#include <QGraphicsLineItem>
#include <QDomElement>
+#include <KRuler>
#include "customtrackscene.h"
#include "ui_timeline_ui.h"
int inPoint() const;
int fitZoom() const;
+ /** @brief Updates (redraws) the ruler.
+ *
+ * Used to change from displaying frames to timecode or vice versa. */
+ void updateRuler();
+
+
+protected:
+ virtual void keyPressEvent(QKeyEvent * event);
+
public slots:
void slotDeleteClip(const QString &clipId);
void slotChangeZoom(int horizontal, int vertical = -1);
private slots:
void setCursorPos(int pos);
void moveCursorPos(int pos);
- /** \brief Rebuild the track headers */
+ /** @brief Rebuilds the track headers */
void slotRebuildTrackHeaders();
- /** \brief The tracks count or a track name changed, rebuild and notify */
+ /** @brief The tracks count or a track name changed, rebuild and notify */
void slotReloadTracks();
void slotChangeTrackLock(int ix, bool lock);
void slotVerticalZoomDown();
void slotVerticalZoomUp();
- void slotRenameTrack(int ix);
+
+ /** @brief Changes the name of a track.
+ * @param ix Number of the track
+ * @param name New name */
+ void slotRenameTrack(int ix, QString name);
void slotRepaintTracks();
+ /** @brief Adjusts the margins of the header area.
+ *
+ * Avoid a shift between header area and trackview if
+ * the horizontal scrollbar is visible and the position
+ * of the vertical scrollbar is maximal */
+ void slotUpdateVerticalScroll(int min, int max);
+
+ /** @brief Parse tracks to see if project has audio in it.
+ *
+ * Parses all tracks to check if there is audio data. */
+ void slotCheckProjectAudio();
+
signals:
void mousePosition(int);
void cursorMoved();
void zoneMoved(int, int);
void insertTrack(int);
void deleteTrack(int);
- void changeTrack(int);
+ void configTrack(int);
void updateTracksInfo();
void setZoom(int);
+ /** @brief Inform render widget if our project has audio */
+ void projectHasAudio(bool);
};
#endif