#ifndef MODELVIEW_H #define MODELVIEW_H #include #include #include #include #include "ProjectModel.h" #include "Segment.h" #include "Episode.h" class ModelView: public QWidget { Q_OBJECT public: ModelView(ProjectModel *project, int nVignettes = 5, QWidget *parent = 0); void adjust(); void initPlayer(); QString getCurrentEpisodeFName() const; void setDepth(int depth); public slots: void updatePlayer(const QModelIndex ¤t, const QModelIndex &previous); void positionChanged(qint64 position); void playerPaused(bool pause); void initShotAnnot(bool checked); signals: void setPlayer(const QString &fName, const QSize &resolution); void setPlayerPosition(qint64); void initShotLevel(Segment *segment); void insertShot(Segment *segment); void removeShot(Segment *segment); void editSimShots(Segment *segment); void currentShot(QList); void displaySubtitle(const QString &subtitle); protected: void keyPressEvent(QKeyEvent *event); private: void updateCurrentEpisode(Segment *segment); QList genPositionList(Segment *segment); Episode *m_currEpisode; ProjectModel *m_project; QTreeView *m_treeView; QItemSelectionModel *m_selection; int m_depth; int m_nVignettes; bool m_playerPaused; }; #endif