X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftrackview.h;h=a46530ddc4f73b0b747bbd52ed83b0cb907a2d00;hb=58ca041a8b3c7a88d4d1df6ad03c1299ca74956c;hp=85374ec94e2faaf99623961d94c2275225ba3624;hpb=a62d4880e5aeccf3fca7d334ce43b55a467a9d0c;p=kdenlive diff --git a/src/trackview.h b/src/trackview.h index 85374ec9..a46530dd 100644 --- a/src/trackview.h +++ b/src/trackview.h @@ -17,20 +17,25 @@ * 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 #include "customtrackscene.h" +#include "effectslist.h" #include "ui_timeline_ui.h" class ClipItem; @@ -40,7 +45,7 @@ class KdenliveDoc; class CustomRuler; class DocClipBase; -class TrackView : public QWidget +class TrackView : public QWidget, public Ui::TimeLine_UI { Q_OBJECT @@ -60,6 +65,19 @@ 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); + public slots: void slotDeleteClip(const QString &clipId); void slotChangeZoom(int horizontal, int vertical = -1); @@ -67,7 +85,6 @@ public slots: void slotSetZone(QPoint p); private: - Ui::TimeLine_UI m_view; CustomRuler *m_ruler; CustomTrackView *m_trackview; QList m_invalidProducers; @@ -78,7 +95,6 @@ private: KdenliveDoc *m_doc; int m_verticalZoom; - QVBoxLayout *m_headersLayout; QString m_documentErrors; void parseDocument(QDomDocument doc); int slotAddProjectTrack(int ix, QDomElement xml, bool locked); @@ -88,11 +104,27 @@ private: private slots: void setCursorPos(int pos); void moveCursorPos(int pos); + /** @brief Rebuilds the track headers */ void slotRebuildTrackHeaders(); + /** @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); signals: void mousePosition(int); @@ -100,8 +132,10 @@ signals: void zoneMoved(int, int); void insertTrack(int); void deleteTrack(int); - void changeTrack(int); - void renameTrack(int); + void configTrack(int); + void updateTracksInfo(); + void setZoom(int); + void showTrackEffects(int, EffectsList); }; #endif