1 /*** 2 3 Olive - Non-Linear Video Editor 4 Copyright (C) 2019 Olive Team 5 6 This program is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 19 ***/ 20 21 #ifndef SEQUENCE_H 22 #define SEQUENCE_H 23 24 #include <memory> 25 #include <QVector> 26 27 #include "clip.h" 28 #include "marker.h" 29 #include "selection.h" 30 31 class Sequence { 32 public: 33 Sequence(); 34 ~Sequence(); 35 SequencePtr copy(); 36 QString name; 37 void getTrackLimits(int* video_tracks, int* audio_tracks); 38 long getEndFrame(); 39 int width; 40 int height; 41 double frame_rate; 42 int audio_frequency; 43 int audio_layout; 44 45 void RefreshClips(Media* m = nullptr); 46 QVector<Clip*> SelectedClips(bool containing = true); 47 QVector<int> SelectedClipIndexes(); 48 49 Effect* GetSelectedGizmo(); 50 51 bool IsClipSelected(int clip_index, bool containing = true); 52 bool IsClipSelected(Clip* clip, bool containing = true); 53 bool IsTransitionSelected(Transition* t); 54 55 QVector<Selection> selections; 56 long playhead; 57 58 bool using_workarea; 59 long workarea_in; 60 long workarea_out; 61 62 bool wrapper_sequence; 63 64 int save_id; 65 66 QVector<Marker> markers; 67 QVector<ClipPtr> clips; 68 }; 69 70 using SequencePtr = std::shared_ptr<Sequence>; 71 72 // static variable for the currently active sequence 73 namespace olive { 74 extern SequencePtr ActiveSequence; 75 } 76 77 #endif // SEQUENCE_H 78