X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftrackview.h;h=e3fecfccd9c4d78d4291bcc1831afbead21229e0;hb=0c566f1bf663a28f62aa7bddcfef6cd1d33b7d04;hp=2defee005c97dff256b5daf8c9832b90d8f85829;hpb=2cba564f9ef9cbf4599d7ae011a474f82572841d;p=kdenlive diff --git a/src/trackview.h b/src/trackview.h index 2defee00..e3fecfcc 100644 --- a/src/trackview.h +++ b/src/trackview.h @@ -17,20 +17,27 @@ * 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 -#include #include #include #include #include +#include #include "customtrackscene.h" +#include "effectslist.h" #include "ui_timeline_ui.h" +#include "definitions.h" class ClipItem; class Transition; @@ -59,6 +66,16 @@ public: int inPoint() const; int fitZoom() const; + /** @brief Updates (redraws) the ruler. + * + * Used to change from displaying frames to timecode or vice versa. */ + void updateRuler(); + + /** @brief Parse tracks to see if project has audio in it. + * + * Parses all tracks to check if there is audio data. */ + bool checkProjectAudio() const; + protected: virtual void keyPressEvent(QKeyEvent * event); @@ -66,7 +83,7 @@ public slots: void slotDeleteClip(const QString &clipId); void slotChangeZoom(int horizontal, int vertical = -1); void setDuration(int dur); - void slotSetZone(QPoint p); + void slotSetZone(QPoint p, bool updateDocumentProperties = true); private: CustomRuler *m_ruler; @@ -84,29 +101,45 @@ private: int slotAddProjectTrack(int ix, QDomElement xml, bool locked); DocClipBase *getMissingProducer(const QString id) const; void adjustTrackHeaders(); + void slotAddProjectEffects(QDomNodeList effects, QDomElement parentNode, ClipItem *clip, int trackIndex); 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); + void slotShowTrackEffects(int); + /** @brief Update the track label showing applied effects.*/ + void slotUpdateTrackEffectState(int); + 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); + void showTrackEffects(int, TrackInfo); }; #endif