]> git.sesse.net Git - kdenlive/blobdiff - src/trackview.h
Start porting timeline to QGraphicsView
[kdenlive] / src / trackview.h
index 410ecef0a208854b47b73a69744b23444a2e8562..8f82af1f15eeecad614f08b401165e9b4cad879e 100644 (file)
@@ -1,3 +1,23 @@
+/***************************************************************************
+ *   Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org)        *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program; if not, write to the                         *
+ *   Free Software Foundation, Inc.,                                       *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
+ ***************************************************************************/
+
+
 #ifndef TRACKVIEW_H
 #define TRACKVIEW_H
 
@@ -5,6 +25,8 @@
 #include <QVBoxLayout>
 #include <KRuler>
 #include <QGroupBox>
+#include <QGraphicsScene>
+#include <QGraphicsLineItem>
 
 #define FRAME_SIZE 90
 
@@ -14,6 +36,7 @@
 #include "documenttrack.h"
 #include "trackpanelfunctionfactory.h"
 #include "trackpanelfunction.h"
+#include "customtrackview.h"
 
 class TrackView : public QWidget
 {
@@ -30,6 +53,10 @@ class TrackView : public QWidget
     const int mapLocalToValue(int x) const;
     void setEditMode(const QString & editMode);
     const QString & editMode() const;
+    QGraphicsScene *projectScene();
+    CustomTrackView *projectView();
+    int duration();
+    int tracksNumber();
 
   public slots:
     KdenliveDoc *document();
@@ -37,14 +64,19 @@ class TrackView : public QWidget
   private:
     Ui::TimeLine_UI *view;
     CustomRuler *m_ruler;
+    CustomTrackView *m_trackview;
     double m_scale;
     QList <DocumentTrack*> documentTracks;
     int m_projectDuration;
+    int m_projectTracks;
     TrackPanelFunctionFactory m_factory;
     DocumentTrack *m_panelUnderMouse;
        /** The currently applied function. This lasts from mousePressed until mouseRelease. */
     TrackPanelFunction *m_function;
     QString m_editMode;
+    QGraphicsScene *m_scene;
+    uint m_currentZoom;
+    QGraphicsLineItem *m_cursorLine;
 
     KdenliveDoc *m_doc;
     QVBoxLayout *m_tracksLayout;
@@ -60,6 +92,7 @@ class TrackView : public QWidget
 
   private slots:
     void slotChangeZoom(int factor);
+    void slotCursorMoved(int pos);
 };
 
 #endif