several conversions to smart pointers
This commit is contained in:
+11
-11
@@ -100,7 +100,7 @@ void EffectControls::set_zoom(bool in) {
|
||||
void EffectControls::menu_select(QAction* q) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
const ClipPtr& c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
if ((c->track < 0) == (effect_menu_subtype == EFFECT_TYPE_VIDEO)) {
|
||||
const EffectMeta* meta = reinterpret_cast<const EffectMeta*>(q->data().value<quintptr>());
|
||||
if (effect_menu_type == EFFECT_TYPE_TRANSITION) {
|
||||
@@ -140,9 +140,9 @@ void EffectControls::copy(bool del) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
EffectDeleteCommand* del_com = (del) ? new EffectDeleteCommand() : nullptr;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
const ClipPtr& c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
Effect* effect = c->effects.at(j);
|
||||
EffectPtr effect = c->effects.at(j);
|
||||
if (effect->container->selected) {
|
||||
if (!cleared) {
|
||||
clear_clipboard();
|
||||
@@ -150,7 +150,7 @@ void EffectControls::copy(bool del) {
|
||||
clipboard_type = CLIPBOARD_TYPE_EFFECT;
|
||||
}
|
||||
|
||||
clipboard.append(effect->copy(nullptr));
|
||||
clipboard.append(EffectPtr(effect->copy(nullptr)));
|
||||
|
||||
if (del_com != nullptr) {
|
||||
del_com->clips.append(c);
|
||||
@@ -176,7 +176,7 @@ void EffectControls::scroll_to_frame(long frame) {
|
||||
|
||||
void EffectControls::add_effect_paste_action(QMenu *menu) {
|
||||
QAction* paste_action = menu->addAction(tr("&Paste"), panel_timeline, SLOT(paste(bool)));
|
||||
paste_action->setEnabled(clipboard.size() > 0 && clipboard_type == CLIPBOARD_TYPE_EFFECT);
|
||||
paste_action->setEnabled(clipboard.size() > 0 && clipboard_type == CLIPBOARD_TYPE_EFFECT);
|
||||
}
|
||||
|
||||
void EffectControls::cut() {
|
||||
@@ -282,7 +282,7 @@ void EffectControls::clear_effects(bool clear_cache) {
|
||||
|
||||
void EffectControls::deselect_all_effects(QWidget* sender) {
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
const ClipPtr& c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container != sender) {
|
||||
c->effects.at(j)->container->header_click(false, false);
|
||||
@@ -292,7 +292,7 @@ void EffectControls::deselect_all_effects(QWidget* sender) {
|
||||
panel_sequence_viewer->viewer_widget->update();
|
||||
}
|
||||
|
||||
void EffectControls::open_effect(QVBoxLayout* layout, Effect* e) {
|
||||
void EffectControls::open_effect(QVBoxLayout* layout, EffectPtr e) {
|
||||
CollapsibleWidget* container = e->container;
|
||||
layout->addWidget(container);
|
||||
connect(container, SIGNAL(deselect_others(QWidget*)), this, SLOT(deselect_all_effects(QWidget*)));
|
||||
@@ -505,7 +505,7 @@ void EffectControls::load_effects() {
|
||||
if (!multiple) {
|
||||
// load in new clips
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
QVBoxLayout* layout;
|
||||
if (c->track < 0) {
|
||||
vcontainer->setVisible(true);
|
||||
@@ -539,9 +539,9 @@ void EffectControls::delete_effects() {
|
||||
if (mode == TA_NO_TRANSITION) {
|
||||
EffectDeleteCommand* command = new EffectDeleteCommand();
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
Effect* effect = c->effects.at(j);
|
||||
EffectPtr effect = c->effects.at(j);
|
||||
if (effect->container->selected) {
|
||||
command->clips.append(c);
|
||||
command->fx.append(j);
|
||||
@@ -595,7 +595,7 @@ void EffectControls::resizeEvent(QResizeEvent*) {
|
||||
bool EffectControls::is_focused() {
|
||||
if (this->hasFocus()) return true;
|
||||
for (int i=0;i<selected_clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(selected_clips.at(i));
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<c->effects.size();j++) {
|
||||
if (c->effects.at(j)->container->is_focused()) {
|
||||
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
void show_effect_menu(int type, int subtype);
|
||||
void load_effects();
|
||||
void load_keyframes();
|
||||
void open_effect(QVBoxLayout* hlayout, Effect* e);
|
||||
void open_effect(QVBoxLayout* hlayout, EffectPtr e);
|
||||
|
||||
void setup_ui();
|
||||
|
||||
|
||||
+2
-2
@@ -50,7 +50,7 @@ void update_effect_controls() {
|
||||
int mode = TA_NO_TRANSITION;
|
||||
if (olive::ActiveSequence != nullptr) {
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* clip = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr clip = olive::ActiveSequence->clips.at(i);
|
||||
if (clip != nullptr) {
|
||||
for (int j=0;j<olive::ActiveSequence->selections.size();j++) {
|
||||
const Selection& s = olive::ActiveSequence->selections.at(j);
|
||||
@@ -88,7 +88,7 @@ void update_effect_controls() {
|
||||
if (aclip >= 0) selected_clips.append(aclip);
|
||||
if (vclip >= 0 && aclip >= 0) {
|
||||
bool found = false;
|
||||
Clip* vclip_ref = olive::ActiveSequence->clips.at(vclip);
|
||||
ClipPtr vclip_ref = olive::ActiveSequence->clips.at(vclip);
|
||||
for (int i=0;i<vclip_ref->linked.size();i++) {
|
||||
if (vclip_ref->linked.at(i) == aclip) {
|
||||
found = true;
|
||||
|
||||
+66
-62
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "oliveglobal.h"
|
||||
|
||||
#include "panels.h"
|
||||
#include "playback/playback.h"
|
||||
#include "io/previewgenerator.h"
|
||||
#include "project/undo.h"
|
||||
@@ -257,10 +258,10 @@ QString Project::get_next_sequence_name(QString start) {
|
||||
return name;
|
||||
}
|
||||
|
||||
Sequence* create_sequence_from_media(QVector<Media*>& media_list) {
|
||||
Sequence* s = new Sequence();
|
||||
SequencePtr create_sequence_from_media(QVector<Media*>& media_list) {
|
||||
SequencePtr s(new Sequence());
|
||||
|
||||
s->name = panel_project->get_next_sequence_name();
|
||||
s->name = panel_project->get_next_sequence_name();
|
||||
|
||||
// shitty hardcoded default values
|
||||
s->width = 1920;
|
||||
@@ -272,11 +273,11 @@ Sequence* create_sequence_from_media(QVector<Media*>& media_list) {
|
||||
bool got_video_values = false;
|
||||
bool got_audio_values = false;
|
||||
for (int i=0;i<media_list.size();i++) {
|
||||
Media* media = media_list.at(i);
|
||||
Media* media = media_list.at(i);
|
||||
switch (media->get_type()) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
{
|
||||
Footage* m = media->to_footage();
|
||||
FootagePtr m = media->to_footage();
|
||||
if (m->ready) {
|
||||
if (!got_video_values) {
|
||||
for (int j=0;j<m->video_tracks.size();j++) {
|
||||
@@ -304,7 +305,7 @@ Sequence* create_sequence_from_media(QVector<Media*>& media_list) {
|
||||
break;
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
{
|
||||
Sequence* seq = media->to_sequence();
|
||||
SequencePtr seq = media->to_sequence();
|
||||
s->width = seq->width;
|
||||
s->height = seq->height;
|
||||
s->frame_rate = seq->frame_rate;
|
||||
@@ -327,7 +328,7 @@ void Project::duplicate_selected() {
|
||||
bool duped = false;
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int j=0;j<items.size();j++) {
|
||||
Media* i = item_to_media(items.at(j));
|
||||
Media* i = item_to_media(items.at(j));
|
||||
if (i->get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
create_sequence_internal(ca, i->to_sequence()->copy(), false, item_to_media(items.at(j).parent()));
|
||||
duped = true;
|
||||
@@ -343,7 +344,7 @@ void Project::duplicate_selected() {
|
||||
void Project::replace_selected_file() {
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
if (selected_items.size() == 1) {
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
if (item->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
replace_media(item, nullptr);
|
||||
}
|
||||
@@ -373,7 +374,7 @@ void Project::replace_clip_media() {
|
||||
} else {
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
if (selected_items.size() == 1) {
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
if (item->get_type() == MEDIA_TYPE_SEQUENCE && olive::ActiveSequence == item->to_sequence()) {
|
||||
QMessageBox::critical(this,
|
||||
tr("Active sequence selected"),
|
||||
@@ -390,7 +391,7 @@ void Project::replace_clip_media() {
|
||||
void Project::open_properties() {
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
if (selected_items.size() == 1) {
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
switch (item->get_type()) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
{
|
||||
@@ -438,13 +439,16 @@ void Project::new_folder() {
|
||||
|
||||
void Project::new_sequence() {
|
||||
NewSequenceDialog nsd(this);
|
||||
nsd.set_sequence_name(panel_project->get_next_sequence_name());
|
||||
nsd.set_sequence_name(get_next_sequence_name());
|
||||
nsd.exec();
|
||||
}
|
||||
|
||||
Media* Project::create_sequence_internal(ComboAction *ca, Sequence *s, bool open, Media* parent) {
|
||||
if (parent == nullptr) parent = project_model.get_root();
|
||||
Media* item = new Media(parent);
|
||||
Media* Project::create_sequence_internal(ComboAction *ca, SequencePtr s, bool open, Media* parent) {
|
||||
if (parent == nullptr) {
|
||||
parent = project_model.get_root();
|
||||
}
|
||||
|
||||
Media* item(new Media(parent));
|
||||
item->set_sequence(s);
|
||||
|
||||
if (ca != nullptr) {
|
||||
@@ -466,7 +470,7 @@ QString Project::get_file_name_from_path(const QString& path) {
|
||||
}
|
||||
|
||||
/*Media* Project::new_item() {
|
||||
Media* item = new Media(0);
|
||||
Media* item = new Media(0);
|
||||
//item->setFlags(item->flags() | Qt::ItemIsEditable);
|
||||
return item;
|
||||
}*/
|
||||
@@ -476,22 +480,22 @@ bool Project::is_focused() {
|
||||
}
|
||||
|
||||
Media* Project::create_folder_internal(QString name) {
|
||||
Media* item = new Media(nullptr);
|
||||
Media* item = new Media(nullptr);
|
||||
item->set_folder();
|
||||
item->set_name(name);
|
||||
return item;
|
||||
}
|
||||
|
||||
Media *Project::item_to_media(const QModelIndex &index) {
|
||||
return static_cast<Media*>(sorter->mapToSource(index).internalPointer());
|
||||
return static_cast<Media*>(sorter->mapToSource(index).internalPointer());
|
||||
// return static_cast<Media*>(index.internalPointer());
|
||||
}
|
||||
|
||||
void Project::get_all_media_from_table(QList<Media*>& items, QList<Media*>& list, int search_type) {
|
||||
for (int i=0;i<items.size();i++) {
|
||||
Media* item = items.at(i);
|
||||
Media* item = items.at(i);
|
||||
if (item->get_type() == MEDIA_TYPE_FOLDER) {
|
||||
QList<Media*> children;
|
||||
QList<Media*> children;
|
||||
for (int j=0;j<item->childCount();j++) {
|
||||
children.append(item->child(j));
|
||||
}
|
||||
@@ -505,8 +509,8 @@ void Project::get_all_media_from_table(QList<Media*>& items, QList<Media*>& list
|
||||
bool delete_clips_in_clipboard_with_media(ComboAction* ca, Media* m) {
|
||||
int delete_count = 0;
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP) {
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
Clip* c = static_cast<Clip*>(clipboard.at(i));
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
ClipPtr c = std::static_pointer_cast<Clip>(clipboard.at(i));
|
||||
if (c->media == m) {
|
||||
ca->append(new RemoveClipsFromClipboard(i-delete_count));
|
||||
delete_count++;
|
||||
@@ -519,7 +523,7 @@ bool delete_clips_in_clipboard_with_media(ComboAction* ca, Media* m) {
|
||||
void Project::delete_selected_media() {
|
||||
ComboAction* ca = new ComboAction();
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
QList<Media*> items;
|
||||
QList<Media*> items;
|
||||
for (int i=0;i<selected_items.size();i++) {
|
||||
items.append(item_to_media(selected_items.at(i)));
|
||||
}
|
||||
@@ -527,25 +531,25 @@ void Project::delete_selected_media() {
|
||||
bool redraw = false;
|
||||
|
||||
// check if media is in use
|
||||
QVector<Media*> parents;
|
||||
QList<Media*> sequence_items;
|
||||
QList<Media*> all_top_level_items;
|
||||
QVector<Media*> parents;
|
||||
QList<Media*> sequence_items;
|
||||
QList<Media*> all_top_level_items;
|
||||
for (int i=0;i<project_model.childCount();i++) {
|
||||
all_top_level_items.append(project_model.child(i));
|
||||
}
|
||||
get_all_media_from_table(all_top_level_items, sequence_items, MEDIA_TYPE_SEQUENCE); // find all sequences in project
|
||||
if (sequence_items.size() > 0) {
|
||||
QList<Media*> media_items;
|
||||
QList<Media*> media_items;
|
||||
get_all_media_from_table(items, media_items, MEDIA_TYPE_FOOTAGE);
|
||||
for (int i=0;i<media_items.size();i++) {
|
||||
Media* item = media_items.at(i);
|
||||
Footage* media = item->to_footage();
|
||||
Media* item = media_items.at(i);
|
||||
FootagePtr media = item->to_footage();
|
||||
bool confirm_delete = false;
|
||||
for (int j=0;j<sequence_items.size();j++) {
|
||||
Sequence* s = sequence_items.at(j)->to_sequence();
|
||||
SequencePtr s = sequence_items.at(j)->to_sequence();
|
||||
for (int k=0;k<s->clips.size();k++) {
|
||||
Clip* c = s->clips.at(k);
|
||||
if (c != nullptr && c->media == item) {
|
||||
ClipPtr c = s->clips.at(k);
|
||||
if (c != nullptr && c->media == item) {
|
||||
if (!confirm_delete) {
|
||||
// we found a reference, so we know we'll need to ask if the user wants to delete it
|
||||
QMessageBox confirm(this);
|
||||
@@ -562,13 +566,13 @@ void Project::delete_selected_media() {
|
||||
redraw = true;
|
||||
} else if (confirm.clickedButton() == skip_button) {
|
||||
// remove media item and any folders containing it from the remove list
|
||||
Media* parent = item;
|
||||
Media* parent = item;
|
||||
while (parent != nullptr) {
|
||||
parents.append(parent);
|
||||
|
||||
// re-add item's siblings
|
||||
for (int m=0;m<parent->childCount();m++) {
|
||||
Media* child = parent->child(m);
|
||||
Media* child = parent->child(m);
|
||||
bool found = false;
|
||||
for (int n=0;n<items.size();n++) {
|
||||
if (items.at(n) == child) {
|
||||
@@ -628,7 +632,7 @@ void Project::delete_selected_media() {
|
||||
if (items.at(i)->get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
redraw = true;
|
||||
|
||||
Sequence* s = items.at(i)->to_sequence();
|
||||
SequencePtr s = items.at(i)->to_sequence();
|
||||
|
||||
if (s == olive::ActiveSequence) {
|
||||
ca->append(new ChangeSequenceAction(nullptr));
|
||||
@@ -640,8 +644,8 @@ void Project::delete_selected_media() {
|
||||
} else if (items.at(i)->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
if (panel_footage_viewer->seq != nullptr) {
|
||||
for (int j=0;j<panel_footage_viewer->seq->clips.size();j++) {
|
||||
Clip* c = panel_footage_viewer->seq->clips.at(j);
|
||||
if (c != nullptr && c->media == items.at(i)) {
|
||||
ClipPtr c = panel_footage_viewer->seq->clips.at(j);
|
||||
if (c != nullptr && c->media == items.at(i)) {
|
||||
panel_footage_viewer->set_media(nullptr);
|
||||
break;
|
||||
}
|
||||
@@ -689,7 +693,7 @@ void Project::process_file_list(QStringList& files, bool recursive, Media* repla
|
||||
for (int i=0;i<files.size();i++) {
|
||||
if (QFileInfo(files.at(i)).isDir()) {
|
||||
QString folder_name = get_file_name_from_path(files.at(i));
|
||||
Media* folder = create_folder_internal(folder_name);
|
||||
Media* folder = create_folder_internal(folder_name);
|
||||
|
||||
QDir directory(files.at(i));
|
||||
directory.setFilter(QDir::NoDotAndDotDot | QDir::AllEntries);
|
||||
@@ -714,7 +718,7 @@ void Project::process_file_list(QStringList& files, bool recursive, Media* repla
|
||||
QString file(files.at(i));
|
||||
bool skip = false;
|
||||
|
||||
/* Heuristic to determine whether file is part of an image sequence */
|
||||
/* Heuristic to determine whether file is part of an image sequence */
|
||||
|
||||
// check file extension (assume it's not a
|
||||
|
||||
@@ -791,8 +795,8 @@ void Project::process_file_list(QStringList& files, bool recursive, Media* repla
|
||||
}
|
||||
|
||||
if (!skip) {
|
||||
Media* item;
|
||||
Footage* m;
|
||||
Media* item;
|
||||
FootagePtr m;
|
||||
|
||||
if (replace != nullptr) {
|
||||
item = replace;
|
||||
@@ -800,7 +804,7 @@ void Project::process_file_list(QStringList& files, bool recursive, Media* repla
|
||||
m->reset();
|
||||
} else {
|
||||
item = new Media(parent);
|
||||
m = new Footage();
|
||||
m = FootagePtr(new Footage());
|
||||
}
|
||||
|
||||
m->using_inout = false;
|
||||
@@ -842,7 +846,7 @@ Media* Project::get_selected_folder() {
|
||||
// if one item is selected and it's a folder, return it
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
if (selected_items.size() == 1) {
|
||||
Media* m = item_to_media(selected_items.at(0));
|
||||
Media* m = item_to_media(selected_items.at(0));
|
||||
if (m->get_type() == MEDIA_TYPE_FOLDER) return m;
|
||||
}
|
||||
return nullptr;
|
||||
@@ -851,7 +855,7 @@ Media* Project::get_selected_folder() {
|
||||
bool Project::reveal_media(Media *media, QModelIndex parent) {
|
||||
for (int i=0;i<project_model.rowCount(parent);i++) {
|
||||
const QModelIndex& item = project_model.index(i, 0, parent);
|
||||
Media* m = project_model.getItem(item);
|
||||
Media* m = project_model.getItem(item);
|
||||
|
||||
if (m->get_type() == MEDIA_TYPE_FOLDER) {
|
||||
|
||||
@@ -923,10 +927,10 @@ void Project::delete_clips_using_selected_media() {
|
||||
bool deleted = false;
|
||||
QModelIndexList items = get_current_selected();
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
const ClipPtr& c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<items.size();j++) {
|
||||
Media* m = item_to_media(items.at(j));
|
||||
Media* m = item_to_media(items.at(j));
|
||||
if (c->media == m) {
|
||||
ca->append(new DeleteClipAction(olive::ActiveSequence, i));
|
||||
deleted = true;
|
||||
@@ -935,7 +939,7 @@ void Project::delete_clips_using_selected_media() {
|
||||
}
|
||||
}
|
||||
for (int j=0;j<items.size();j++) {
|
||||
Media* m = item_to_media(items.at(j));
|
||||
Media* m = item_to_media(items.at(j));
|
||||
if (delete_clips_in_clipboard_with_media(ca, m)) deleted = true;
|
||||
}
|
||||
if (deleted) {
|
||||
@@ -952,9 +956,9 @@ void Project::clear() {
|
||||
panel_effect_controls->clear_effects(true);
|
||||
|
||||
// delete sequences first because it's important to close all the clips before deleting the media
|
||||
QVector<Media*> sequences = list_all_project_sequences();
|
||||
QVector<Media*> sequences = list_all_project_sequences();
|
||||
for (int i=0;i<sequences.size();i++) {
|
||||
delete sequences.at(i)->to_sequence();
|
||||
sequences.at(i)->to_sequence().reset();
|
||||
sequences.at(i)->set_sequence(nullptr);
|
||||
}
|
||||
|
||||
@@ -962,7 +966,7 @@ void Project::clear() {
|
||||
project_model.clear();
|
||||
|
||||
// update tree view (sometimes this doesn't seem to update reliably)
|
||||
panel_project->tree_view->update();
|
||||
tree_view->update();
|
||||
}
|
||||
|
||||
void Project::new_project() {
|
||||
@@ -990,7 +994,7 @@ void save_marker(QXmlStreamWriter& stream, const Marker& m) {
|
||||
void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only, const QModelIndex& parent) {
|
||||
for (int i=0;i<project_model.rowCount(parent);i++) {
|
||||
const QModelIndex& item = project_model.index(i, 0, parent);
|
||||
Media* m = project_model.getItem(item);
|
||||
Media* m = project_model.getItem(item);
|
||||
|
||||
if (type == m->get_type()) {
|
||||
if (m->get_type() == MEDIA_TYPE_FOLDER) {
|
||||
@@ -1013,7 +1017,7 @@ void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only,
|
||||
} else {
|
||||
int folder = m->parentItem()->temp_id;
|
||||
if (type == MEDIA_TYPE_FOOTAGE) {
|
||||
Footage* f = m->to_footage();
|
||||
FootagePtr f = m->to_footage();
|
||||
f->save_id = media_id;
|
||||
stream.writeStartElement("footage");
|
||||
stream.writeAttribute("id", QString::number(media_id));
|
||||
@@ -1061,7 +1065,7 @@ void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only,
|
||||
stream.writeEndElement(); // footage
|
||||
media_id++;
|
||||
} else if (type == MEDIA_TYPE_SEQUENCE) {
|
||||
Sequence* s = m->to_sequence();
|
||||
SequencePtr s = m->to_sequence();
|
||||
if (set_ids_only) {
|
||||
s->save_id = sequence_id;
|
||||
sequence_id++;
|
||||
@@ -1083,7 +1087,7 @@ void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only,
|
||||
stream.writeAttribute("workareaOut", QString::number(s->workarea_out));
|
||||
|
||||
for (int j=0;j<s->transitions.size();j++) {
|
||||
Transition* t = s->transitions.at(j);
|
||||
TransitionPtr t = s->transitions.at(j);
|
||||
if (t != nullptr) {
|
||||
stream.writeStartElement("transition");
|
||||
stream.writeAttribute("id", QString::number(j));
|
||||
@@ -1094,7 +1098,7 @@ void Project::save_folder(QXmlStreamWriter& stream, int type, bool set_ids_only,
|
||||
}
|
||||
|
||||
for (int j=0;j<s->clips.size();j++) {
|
||||
Clip* c = s->clips.at(j);
|
||||
const ClipPtr& c = s->clips.at(j);
|
||||
if (c != nullptr) {
|
||||
stream.writeStartElement("clip"); // clip
|
||||
stream.writeAttribute("id", QString::number(j));
|
||||
@@ -1305,7 +1309,7 @@ void Project::add_recent_project(QString url) {
|
||||
|
||||
void Project::list_all_sequences_worker(QVector<Media*>* list, Media* parent) {
|
||||
for (int i=0;i<project_model.childCount(parent);i++) {
|
||||
Media* item = project_model.child(i, parent);
|
||||
Media* item = project_model.child(i, parent);
|
||||
switch (item->get_type()) {
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
list->append(item);
|
||||
@@ -1318,16 +1322,16 @@ void Project::list_all_sequences_worker(QVector<Media*>* list, Media* parent) {
|
||||
}
|
||||
|
||||
QVector<Media*> Project::list_all_project_sequences() {
|
||||
QVector<Media*> list;
|
||||
QVector<Media*> list;
|
||||
list_all_sequences_worker(&list, nullptr);
|
||||
return list;
|
||||
}
|
||||
|
||||
QModelIndexList Project::get_current_selected() {
|
||||
if (olive::CurrentConfig.project_view_type == PROJECT_VIEW_TREE) {
|
||||
return panel_project->tree_view->selectionModel()->selectedRows();
|
||||
return tree_view->selectionModel()->selectedRows();
|
||||
}
|
||||
return panel_project->icon_view->selectionModel()->selectedIndexes();
|
||||
return icon_view->selectionModel()->selectedIndexes();
|
||||
}
|
||||
|
||||
#define THROBBER_LIMIT 20
|
||||
@@ -1366,11 +1370,11 @@ void MediaThrobber::stop(int icon_type, bool replace) {
|
||||
}
|
||||
|
||||
// refresh all clips
|
||||
QVector<Media*> sequences = panel_project->list_all_project_sequences();
|
||||
QVector<Media*> sequences = panel_project->list_all_project_sequences();
|
||||
for (int i=0;i<sequences.size();i++) {
|
||||
Sequence* s = sequences.at(i)->to_sequence();
|
||||
SequencePtr s = sequences.at(i)->to_sequence();
|
||||
for (int j=0;j<s->clips.size();j++) {
|
||||
Clip* c = s->clips.at(j);
|
||||
const ClipPtr& c = s->clips.at(j);
|
||||
if (c != nullptr) {
|
||||
c->refresh();
|
||||
}
|
||||
@@ -1380,7 +1384,7 @@ void MediaThrobber::stop(int icon_type, bool replace) {
|
||||
// redraw clips
|
||||
update_ui(replace);
|
||||
|
||||
panel_project->tree_view->viewport()->update();
|
||||
panel_project->tree_view->viewport()->update();
|
||||
item->throbber = nullptr;
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
+15
-17
@@ -37,8 +37,6 @@
|
||||
#include "project/sourcescommon.h"
|
||||
#include "ui/sourceiconview.h"
|
||||
|
||||
#include "panels.h"
|
||||
|
||||
#include "ui/sourcetable.h"
|
||||
|
||||
#define LOAD_TYPE_VERSION 69
|
||||
@@ -48,7 +46,7 @@ extern QString autorecovery_filename;
|
||||
extern QStringList recent_projects;
|
||||
extern ProjectModel project_model;
|
||||
|
||||
Sequence* create_sequence_from_media(QVector<Media *> &media_list);
|
||||
SequencePtr create_sequence_from_media(QVector<Media *> &media_list);
|
||||
|
||||
QString get_channel_layout_name(int channels, uint64_t layout);
|
||||
QString get_interlacing_name(int interlacing);
|
||||
@@ -56,15 +54,15 @@ QString get_interlacing_name(int interlacing);
|
||||
class Project : public QDockWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Project(QWidget *parent = 0);
|
||||
explicit Project(QWidget *parent = nullptr);
|
||||
~Project();
|
||||
bool is_focused();
|
||||
void clear();
|
||||
Media* create_sequence_internal(ComboAction *ca, Sequence* s, bool open, Media* parent);
|
||||
QString get_next_sequence_name(QString start = 0);
|
||||
void process_file_list(QStringList& files, bool recursive = false, Media* replace = nullptr, Media *parent = nullptr);
|
||||
void replace_media(Media* item, QString filename);
|
||||
Media *get_selected_folder();
|
||||
Media* create_sequence_internal(ComboAction *ca, SequencePtr s, bool open, Media* parent);
|
||||
QString get_next_sequence_name(QString start = nullptr);
|
||||
void process_file_list(QStringList& files, bool recursive = false, Media* replace = nullptr, Media *parent = nullptr);
|
||||
void replace_media(Media* item, QString filename);
|
||||
Media* get_selected_folder();
|
||||
bool reveal_media(Media *media, QModelIndex parent = QModelIndex());
|
||||
void add_recent_project(QString url);
|
||||
|
||||
@@ -72,12 +70,12 @@ public:
|
||||
void load_project(bool autorecovery);
|
||||
void save_project(bool autorecovery);
|
||||
|
||||
Media* create_folder_internal(QString name);
|
||||
Media* item_to_media(const QModelIndex& index);
|
||||
Media* create_folder_internal(QString name);
|
||||
Media* item_to_media(const QModelIndex& index);
|
||||
|
||||
void save_recent_projects();
|
||||
|
||||
QVector<Media*> list_all_project_sequences();
|
||||
QVector<Media*> list_all_project_sequences();
|
||||
|
||||
SourceTable* tree_view;
|
||||
SourceIconView* icon_view;
|
||||
@@ -85,11 +83,11 @@ public:
|
||||
|
||||
ProjectFilter* sorter;
|
||||
|
||||
QVector<Media*> last_imported_media;
|
||||
QVector<Media*> last_imported_media;
|
||||
|
||||
QModelIndexList get_current_selected();
|
||||
|
||||
void start_preview_generator(Media* item, bool replacing);
|
||||
void start_preview_generator(Media* item, bool replacing);
|
||||
void get_all_media_from_table(QList<Media *> &items, QList<Media *> &list, int type = -1);
|
||||
|
||||
QWidget* toolbar_widget;
|
||||
@@ -108,7 +106,7 @@ private:
|
||||
int folder_id;
|
||||
int media_id;
|
||||
int sequence_id;
|
||||
void list_all_sequences_worker(QVector<Media *> *list, Media* parent);
|
||||
void list_all_sequences_worker(QVector<Media *> *list, Media* parent);
|
||||
QString get_file_name_from_path(const QString &path);
|
||||
QDir proj_dir;
|
||||
QWidget* icon_view_container;
|
||||
@@ -127,7 +125,7 @@ private slots:
|
||||
class MediaThrobber : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
MediaThrobber(Media*);
|
||||
MediaThrobber(Media*);
|
||||
public slots:
|
||||
void start();
|
||||
void stop(int, bool replace);
|
||||
@@ -136,7 +134,7 @@ private slots:
|
||||
private:
|
||||
QPixmap pixmap;
|
||||
int animation;
|
||||
Media* item;
|
||||
Media* item;
|
||||
QTimer* animator;
|
||||
};
|
||||
|
||||
|
||||
+83
-79
@@ -122,7 +122,7 @@ void Timeline::previous_cut() {
|
||||
&& olive::ActiveSequence->playhead > 0) {
|
||||
long p_cut = 0;
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_out > p_cut && c->timeline_out < olive::ActiveSequence->playhead) {
|
||||
p_cut = c->timeline_out;
|
||||
@@ -140,7 +140,7 @@ void Timeline::next_cut() {
|
||||
bool seek_enabled = false;
|
||||
long n_cut = LONG_MAX;
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_in < n_cut && c->timeline_in > olive::ActiveSequence->playhead) {
|
||||
n_cut = c->timeline_in;
|
||||
@@ -155,7 +155,7 @@ void Timeline::next_cut() {
|
||||
}
|
||||
}
|
||||
|
||||
void ripple_clips(ComboAction* ca, Sequence *s, long point, long length, const QVector<int>& ignore) {
|
||||
void ripple_clips(ComboAction* ca, SequencePtr s, long point, long length, const QVector<int>& ignore) {
|
||||
ca->append(new RippleAction(s, point, length, ignore));
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ void Timeline::toggle_show_all() {
|
||||
}
|
||||
}
|
||||
|
||||
void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector<Media*>& media_list) {
|
||||
void Timeline::create_ghosts_from_media(SequencePtr seq, long entry_point, QVector<Media*>& media_list) {
|
||||
video_ghosts = false;
|
||||
audio_ghosts = false;
|
||||
|
||||
@@ -179,8 +179,8 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
bool can_import = true;
|
||||
|
||||
Media* medium = media_list.at(i);
|
||||
Footage* m = nullptr;
|
||||
Sequence* s = nullptr;
|
||||
FootagePtr m = nullptr;
|
||||
SequencePtr s = nullptr;
|
||||
long sequence_length = 0;
|
||||
long default_clip_in = 0;
|
||||
long default_clip_out = 0;
|
||||
@@ -276,16 +276,16 @@ void Timeline::create_ghosts_from_media(Sequence* seq, long entry_point, QVector
|
||||
}
|
||||
}
|
||||
|
||||
void Timeline::add_clips_from_ghosts(ComboAction* ca, Sequence* s) {
|
||||
void Timeline::add_clips_from_ghosts(ComboAction* ca, SequencePtr s) {
|
||||
// add clips
|
||||
long earliest_point = LONG_MAX;
|
||||
QVector<Clip*> added_clips;
|
||||
QVector<ClipPtr> added_clips;
|
||||
for (int i=0;i<ghosts.size();i++) {
|
||||
const Ghost& g = ghosts.at(i);
|
||||
|
||||
earliest_point = qMin(earliest_point, g.in);
|
||||
|
||||
Clip* c = new Clip(s);
|
||||
ClipPtr c = ClipPtr(new Clip(s));
|
||||
c->media = g.media;
|
||||
c->media_stream = g.media_stream;
|
||||
c->timeline_in = g.in;
|
||||
@@ -293,7 +293,7 @@ void Timeline::add_clips_from_ghosts(ComboAction* ca, Sequence* s) {
|
||||
c->clip_in = g.clip_in;
|
||||
c->track = g.track;
|
||||
if (c->media->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
Footage* m = c->media->to_footage();
|
||||
FootagePtr m = c->media->to_footage();
|
||||
if (m->video_tracks.size() == 0) {
|
||||
// audio only (greenish)
|
||||
c->color_r = 128;
|
||||
@@ -317,7 +317,7 @@ void Timeline::add_clips_from_ghosts(ComboAction* ca, Sequence* s) {
|
||||
c->color_g = 128;
|
||||
c->color_b = 128;
|
||||
|
||||
Sequence* media = c->media->to_sequence();
|
||||
SequencePtr media = c->media->to_sequence();
|
||||
c->name = media->name;
|
||||
}
|
||||
c->recalculateMaxLength();
|
||||
@@ -327,9 +327,9 @@ void Timeline::add_clips_from_ghosts(ComboAction* ca, Sequence* s) {
|
||||
|
||||
// link clips from the same media
|
||||
for (int i=0;i<added_clips.size();i++) {
|
||||
Clip* c = added_clips.at(i);
|
||||
ClipPtr c = added_clips.at(i);
|
||||
for (int j=0;j<added_clips.size();j++) {
|
||||
Clip* cc = added_clips.at(j);
|
||||
ClipPtr cc = added_clips.at(j);
|
||||
if (c != cc && c->media == cc->media) {
|
||||
c->linked.append(j);
|
||||
}
|
||||
@@ -367,7 +367,7 @@ void Timeline::add_transition() {
|
||||
bool adding = false;
|
||||
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
int transition_to_add = (c->track < 0) ? TRANSITION_INTERNAL_CROSSDISSOLVE : TRANSITION_INTERNAL_LINEARFADE;
|
||||
if (c->get_opening_transition() == nullptr) {
|
||||
@@ -397,7 +397,7 @@ void Timeline::nest() {
|
||||
|
||||
// get selected clips
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
selected_clips.append(i);
|
||||
earliest_point = qMin(c->timeline_in, earliest_point);
|
||||
@@ -408,7 +408,7 @@ void Timeline::nest() {
|
||||
if (!selected_clips.isEmpty()) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
|
||||
Sequence* s = new Sequence();
|
||||
SequencePtr s(new Sequence());
|
||||
|
||||
// create "nest" sequence
|
||||
s->name = panel_project->get_next_sequence_name(tr("Nested Sequence"));
|
||||
@@ -424,7 +424,7 @@ void Timeline::nest() {
|
||||
ca->append(new DeleteClipAction(olive::ActiveSequence, selected_clips.at(i)));
|
||||
|
||||
// copy to new
|
||||
Clip* copy = olive::ActiveSequence->clips.at(selected_clips.at(i))->copy(s);
|
||||
ClipPtr copy(olive::ActiveSequence->clips.at(selected_clips.at(i))->copy(s));
|
||||
copy->timeline_in -= earliest_point;
|
||||
copy->timeline_out -= earliest_point;
|
||||
s->clips.append(copy);
|
||||
@@ -536,7 +536,7 @@ void Timeline::select_all() {
|
||||
if (olive::ActiveSequence != nullptr) {
|
||||
olive::ActiveSequence->selections.clear();
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
Selection s;
|
||||
s.in = c->timeline_in;
|
||||
@@ -556,7 +556,7 @@ void Timeline::scroll_to_frame(long frame) {
|
||||
void Timeline::select_from_playhead() {
|
||||
olive::ActiveSequence->selections.clear();
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr
|
||||
&& c->timeline_in <= olive::ActiveSequence->playhead
|
||||
&& c->timeline_out > olive::ActiveSequence->playhead) {
|
||||
@@ -576,7 +576,7 @@ bool Timeline::can_ripple_empty_space(long frame, int track) {
|
||||
rc_ripple_max = LONG_MAX;
|
||||
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
if (c->timeline_in > frame || c->timeline_out > frame) {
|
||||
at_end_of_sequence = false;
|
||||
@@ -667,7 +667,7 @@ void Timeline::toggle_enable_on_selected_clips() {
|
||||
ComboAction* ca = new ComboAction();
|
||||
bool push_undo = false;
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
ca->append(new SetBool(&c->enabled, !c->enabled));
|
||||
push_undo = true;
|
||||
@@ -706,7 +706,7 @@ void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_dele
|
||||
|
||||
bool can_ripple = true;
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && c->timeline_in < ripple_point && c->timeline_out > ripple_point) {
|
||||
// conflict detected, but this clip may be getting deleted so let's check
|
||||
bool deleted = false;
|
||||
@@ -721,7 +721,7 @@ void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_dele
|
||||
}
|
||||
if (!deleted) {
|
||||
for (int j=0;j<olive::ActiveSequence->clips.size();j++) {
|
||||
Clip* cc = olive::ActiveSequence->clips.at(j);
|
||||
ClipPtr cc = olive::ActiveSequence->clips.at(j);
|
||||
if (cc != nullptr
|
||||
&& cc->track == c->track
|
||||
&& cc->timeline_in > c->timeline_out
|
||||
@@ -781,7 +781,7 @@ void Timeline::decheck_tool_buttons(QObject* sender) {
|
||||
|
||||
QVector<int> Timeline::get_tracks_of_linked_clips(int i) {
|
||||
QVector<int> tracks;
|
||||
Clip* clip = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr clip = olive::ActiveSequence->clips.at(i);
|
||||
for (int j=0;j<clip->linked.size();j++) {
|
||||
tracks.append(olive::ActiveSequence->clips.at(clip->linked.at(j))->track);
|
||||
}
|
||||
@@ -796,7 +796,7 @@ void Timeline::zoom_out() {
|
||||
multiply_zoom(0.5);
|
||||
}
|
||||
|
||||
bool is_clip_selected(Clip* clip, bool containing) {
|
||||
bool is_clip_selected(ClipPtr clip, bool containing) {
|
||||
for (int i=0;i<clip->sequence->selections.size();i++) {
|
||||
const Selection& s = clip->sequence->selections.at(i);
|
||||
if (clip->track == s.track && ((clip->timeline_in >= s.in && clip->timeline_out <= s.out && containing) ||
|
||||
@@ -811,12 +811,12 @@ void Timeline::snapping_clicked(bool checked) {
|
||||
snapping = checked;
|
||||
}
|
||||
|
||||
Clip* Timeline::split_clip(ComboAction* ca, bool transitions, int p, long frame) {
|
||||
ClipPtr Timeline::split_clip(ComboAction* ca, bool transitions, int p, long frame) {
|
||||
return split_clip(ca, transitions, p, frame, frame);
|
||||
}
|
||||
|
||||
Clip* Timeline::split_clip(ComboAction* ca, bool transitions, int p, long frame, long post_in) {
|
||||
Clip* pre = olive::ActiveSequence->clips.at(p);
|
||||
ClipPtr Timeline::split_clip(ComboAction* ca, bool transitions, int p, long frame, long post_in) {
|
||||
ClipPtr pre = olive::ActiveSequence->clips.at(p);
|
||||
if (pre != nullptr && pre->timeline_in < frame && pre->timeline_out > frame) { // guard against attempts to split at in/out points
|
||||
bool splitting_closing_dual_transition = false;
|
||||
|
||||
@@ -826,7 +826,7 @@ Clip* Timeline::split_clip(ComboAction* ca, bool transitions, int p, long frame,
|
||||
splitting_closing_dual_transition = true;
|
||||
}
|
||||
|
||||
Clip* post = pre->copy(olive::ActiveSequence, transitions && !splitting_closing_dual_transition);
|
||||
ClipPtr post = ClipPtr(pre->copy(olive::ActiveSequence, transitions && !splitting_closing_dual_transition));
|
||||
|
||||
long new_clip_length = frame - pre->timeline_in;
|
||||
|
||||
@@ -891,12 +891,12 @@ bool Timeline::split_clip_and_relink(ComboAction *ca, int clip, long frame, bool
|
||||
|
||||
split_cache.append(clip);
|
||||
|
||||
Clip* c = olive::ActiveSequence->clips.at(clip);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(clip);
|
||||
if (c != nullptr) {
|
||||
QVector<int> pre_clips;
|
||||
QVector<Clip*> post_clips;
|
||||
QVector<ClipPtr> post_clips;
|
||||
|
||||
Clip* post = split_clip(ca, true, clip, frame);
|
||||
ClipPtr post = split_clip(ca, true, clip, frame);
|
||||
|
||||
// if alt is not down, split clips links too
|
||||
if (post == nullptr) {
|
||||
@@ -912,10 +912,10 @@ bool Timeline::split_clip_and_relink(ComboAction *ca, int clip, long frame, bool
|
||||
for (int i=0;i<c->linked.size();i++) {
|
||||
int l = c->linked.at(i);
|
||||
if (!has_clip_been_split(l)) {
|
||||
Clip* link = olive::ActiveSequence->clips.at(l);
|
||||
ClipPtr link = olive::ActiveSequence->clips.at(l);
|
||||
if ((original_clip_is_selected && is_clip_selected(link, true)) || !original_clip_is_selected) {
|
||||
split_cache.append(l);
|
||||
Clip* s = split_clip(ca, true, l, frame);
|
||||
ClipPtr s = split_clip(ca, true, l, frame);
|
||||
if (s != nullptr) {
|
||||
pre_clips.append(l);
|
||||
post_clips.append(s);
|
||||
@@ -963,7 +963,7 @@ void Timeline::clean_up_selections(QVector<Selection>& areas) {
|
||||
}
|
||||
}
|
||||
|
||||
bool selection_contains_transition(const Selection& s, Clip* c, int type) {
|
||||
bool selection_contains_transition(const Selection& s, ClipPtr c, int type) {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
return c->get_opening_transition() != nullptr
|
||||
&& s.out == c->timeline_in + c->get_opening_transition()->get_true_length()
|
||||
@@ -982,12 +982,12 @@ void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& area
|
||||
panel_effect_controls->clear_effects(true);
|
||||
|
||||
QVector<int> pre_clips;
|
||||
QVector<Clip*> post_clips;
|
||||
QVector<ClipPtr> post_clips;
|
||||
|
||||
for (int i=0;i<areas.size();i++) {
|
||||
const Selection& s = areas.at(i);
|
||||
for (int j=0;j<olive::ActiveSequence->clips.size();j++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(j);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(j);
|
||||
if (c != nullptr && c->track == s.track && !c->undeletable) {
|
||||
if (selection_contains_transition(s, c, TA_OPENING_TRANSITION)) {
|
||||
// delete opening transition
|
||||
@@ -1002,7 +1002,7 @@ void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& area
|
||||
// middle of clip is within deletion area
|
||||
|
||||
// duplicate clip
|
||||
Clip* post = split_clip(ca, true, j, s.in, s.out);
|
||||
ClipPtr post = split_clip(ca, true, j, s.in, s.out);
|
||||
|
||||
pre_clips.append(j);
|
||||
post_clips.append(post);
|
||||
@@ -1053,7 +1053,7 @@ void Timeline::copy(bool del) {
|
||||
long min_in = 0;
|
||||
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
for (int j=0;j<olive::ActiveSequence->selections.size();j++) {
|
||||
const Selection& s = olive::ActiveSequence->selections.at(j);
|
||||
@@ -1064,7 +1064,7 @@ void Timeline::copy(bool del) {
|
||||
clipboard_type = CLIPBOARD_TYPE_CLIP;
|
||||
}
|
||||
|
||||
Clip* copied_clip = c->copy(nullptr);
|
||||
ClipPtr copied_clip = c->copy(nullptr);
|
||||
|
||||
// copy linked IDs (we correct these later in paste())
|
||||
copied_clip->linked = c->linked;
|
||||
@@ -1087,16 +1087,16 @@ void Timeline::copy(bool del) {
|
||||
|
||||
copied_clip->load_id = i;
|
||||
|
||||
clipboard.append(copied_clip);
|
||||
clipboard.append(copied_clip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
// initialize all timeline_ins to 0 or offsets of
|
||||
static_cast<Clip*>(clipboard.at(i))->timeline_in -= min_in;
|
||||
static_cast<Clip*>(clipboard.at(i))->timeline_out -= min_in;
|
||||
std::static_pointer_cast<Clip>(clipboard.at(i))->timeline_in -= min_in;
|
||||
std::static_pointer_cast<Clip>(clipboard.at(i))->timeline_out -= min_in;
|
||||
}
|
||||
|
||||
if (del && copied) {
|
||||
@@ -1104,11 +1104,11 @@ void Timeline::copy(bool del) {
|
||||
}
|
||||
}
|
||||
|
||||
void Timeline::relink_clips_using_ids(QVector<int>& old_clips, QVector<Clip*>& new_clips) {
|
||||
void Timeline::relink_clips_using_ids(QVector<int>& old_clips, QVector<ClipPtr>& new_clips) {
|
||||
// relink pasted clips
|
||||
for (int i=0;i<old_clips.size();i++) {
|
||||
// these indices should correspond
|
||||
Clip* oc = olive::ActiveSequence->clips.at(old_clips.at(i));
|
||||
ClipPtr oc = olive::ActiveSequence->clips.at(old_clips.at(i));
|
||||
for (int j=0;j<oc->linked.size();j++) {
|
||||
for (int k=0;k<old_clips.size();k++) { // find clip with that ID
|
||||
if (oc->linked.at(j) == old_clips.at(k)) {
|
||||
@@ -1123,19 +1123,19 @@ void Timeline::relink_clips_using_ids(QVector<int>& old_clips, QVector<Clip*>& n
|
||||
|
||||
void Timeline::paste(bool insert) {
|
||||
if (clipboard.size() > 0) {
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP) {
|
||||
if (clipboard_type == CLIPBOARD_TYPE_CLIP) {
|
||||
ComboAction* ca = new ComboAction();
|
||||
|
||||
// create copies and delete areas that we'll be pasting to
|
||||
QVector<Selection> delete_areas;
|
||||
QVector<Clip*> pasted_clips;
|
||||
QVector<ClipPtr> pasted_clips;
|
||||
long paste_start = LONG_MAX;
|
||||
long paste_end = LONG_MIN;
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
Clip* c = static_cast<Clip*>(clipboard.at(i));
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
ClipPtr c = std::static_pointer_cast<Clip>(clipboard.at(i));
|
||||
|
||||
// create copy of clip and offset by playhead
|
||||
Clip* cc = c->copy(olive::ActiveSequence);
|
||||
ClipPtr cc(c->copy(olive::ActiveSequence));
|
||||
|
||||
// convert frame rates
|
||||
cc->timeline_in = refactor_frame_number(cc->timeline_in, c->cached_fr, olive::ActiveSequence->frame_rate);
|
||||
@@ -1168,13 +1168,13 @@ void Timeline::paste(bool insert) {
|
||||
}
|
||||
|
||||
// correct linked clips
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
for (int i=0;i<clipboard.size();i++) {
|
||||
// these indices should correspond
|
||||
Clip* oc = static_cast<Clip*>(clipboard.at(i));
|
||||
ClipPtr oc = std::static_pointer_cast<Clip>(clipboard.at(i));
|
||||
|
||||
for (int j=0;j<oc->linked.size();j++) {
|
||||
for (int k=0;k<clipboard.size();k++) { // find clip with that ID
|
||||
Clip* comp = static_cast<Clip*>(clipboard.at(k));
|
||||
for (int k=0;k<clipboard.size();k++) { // find clip with that ID
|
||||
ClipPtr comp = std::static_pointer_cast<Clip>(clipboard.at(k));
|
||||
if (comp->load_id == oc->linked.at(j)) {
|
||||
pasted_clips.at(i)->linked.append(k);
|
||||
}
|
||||
@@ -1200,10 +1200,10 @@ void Timeline::paste(bool insert) {
|
||||
bool ask_conflict = true;
|
||||
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
for (int j=0;j<clipboard.size();j++) {
|
||||
Effect* e = static_cast<Effect*>(clipboard.at(j));
|
||||
for (int j=0;j<clipboard.size();j++) {
|
||||
EffectPtr e = std::static_pointer_cast<Effect>(clipboard.at(j));
|
||||
if ((c->track < 0) == (e->meta->subtype == EFFECT_TYPE_VIDEO)) {
|
||||
int found = -1;
|
||||
if (ask_conflict) {
|
||||
@@ -1283,7 +1283,7 @@ void Timeline::edit_to_point_internal(bool in, bool ripple) {
|
||||
|
||||
// find closest in point to playhead
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
track_min = qMin(track_min, c->track);
|
||||
track_max = qMax(track_max, c->track);
|
||||
@@ -1382,18 +1382,18 @@ bool Timeline::split_selection(ComboAction* ca) {
|
||||
|
||||
// temporary relinking vectors
|
||||
QVector<int> pre_splits;
|
||||
QVector<Clip*> post_splits;
|
||||
QVector<Clip*> secondary_post_splits;
|
||||
QVector<ClipPtr> post_splits;
|
||||
QVector<ClipPtr> secondary_post_splits;
|
||||
|
||||
// find clips within selection and split
|
||||
for (int j=0;j<olive::ActiveSequence->clips.size();j++) {
|
||||
Clip* clip = olive::ActiveSequence->clips.at(j);
|
||||
ClipPtr clip = olive::ActiveSequence->clips.at(j);
|
||||
if (clip != nullptr) {
|
||||
for (int i=0;i<olive::ActiveSequence->selections.size();i++) {
|
||||
const Selection& s = olive::ActiveSequence->selections.at(i);
|
||||
if (s.track == clip->track) {
|
||||
Clip* post_b = split_clip(ca, true, j, s.out);
|
||||
Clip* post_a = split_clip(ca, post_b == nullptr, j, s.in);
|
||||
ClipPtr post_b = split_clip(ca, true, j, s.out);
|
||||
ClipPtr post_a = split_clip(ca, post_b == nullptr, j, s.in);
|
||||
pre_splits.append(j);
|
||||
post_splits.append(post_a);
|
||||
secondary_post_splits.append(post_b);
|
||||
@@ -1424,7 +1424,7 @@ bool Timeline::split_selection(ComboAction* ca) {
|
||||
bool Timeline::split_all_clips_at_point(ComboAction* ca, long point) {
|
||||
bool split = false;
|
||||
for (int j=0;j<olive::ActiveSequence->clips.size();j++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(j);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(j);
|
||||
if (c != nullptr) {
|
||||
// always relinks
|
||||
if (split_clip_and_relink(ca, j, point, true)) {
|
||||
@@ -1443,11 +1443,11 @@ void Timeline::split_at_playhead() {
|
||||
if (olive::ActiveSequence->selections.size() > 0) {
|
||||
// see if whole clips are selected
|
||||
QVector<int> pre_clips;
|
||||
QVector<Clip*> post_clips;
|
||||
QVector<ClipPtr> post_clips;
|
||||
for (int j=0;j<olive::ActiveSequence->clips.size();j++) {
|
||||
Clip* clip = olive::ActiveSequence->clips.at(j);
|
||||
ClipPtr clip = olive::ActiveSequence->clips.at(j);
|
||||
if (clip != nullptr && is_clip_selected(clip, true)) {
|
||||
Clip* s = split_clip(ca, true, j, olive::ActiveSequence->playhead);
|
||||
ClipPtr s = split_clip(ca, true, j, olive::ActiveSequence->playhead);
|
||||
if (s != nullptr) {
|
||||
pre_clips.append(j);
|
||||
post_clips.append(s);
|
||||
@@ -1555,7 +1555,7 @@ bool Timeline::snap_to_timeline(long* l, bool use_playhead, bool use_markers, bo
|
||||
|
||||
// snap to clip/transition
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
if (snap_to_point(c->timeline_in, l)) {
|
||||
return true;
|
||||
@@ -1587,7 +1587,7 @@ void Timeline::set_marker() {
|
||||
bool clip_mode = false;
|
||||
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr
|
||||
&& is_clip_selected(c, true)) {
|
||||
|
||||
@@ -1642,7 +1642,7 @@ void Timeline::toggle_links() {
|
||||
LinkCommand* command = new LinkCommand();
|
||||
command->s = olive::ActiveSequence;
|
||||
for (int i=0;i<olive::ActiveSequence->clips.size();i++) {
|
||||
Clip* c = olive::ActiveSequence->clips.at(i);
|
||||
ClipPtr c = olive::ActiveSequence->clips.at(i);
|
||||
if (c != nullptr && is_clip_selected(c, true)) {
|
||||
if (!command->clips.contains(i)) command->clips.append(i);
|
||||
|
||||
@@ -1665,22 +1665,26 @@ void Timeline::toggle_links() {
|
||||
|
||||
void Timeline::increase_track_height() {
|
||||
for (int i=0;i<video_track_heights.size();i++) {
|
||||
video_track_heights[i] += TRACK_HEIGHT_INCREMENT;
|
||||
video_track_heights[i] += olive::timeline::kTrackHeightIncrement;
|
||||
}
|
||||
for (int i=0;i<audio_track_heights.size();i++) {
|
||||
audio_track_heights[i] += TRACK_HEIGHT_INCREMENT;
|
||||
audio_track_heights[i] += olive::timeline::kTrackHeightIncrement;
|
||||
}
|
||||
repaint_timeline();
|
||||
}
|
||||
|
||||
void Timeline::decrease_track_height() {
|
||||
for (int i=0;i<video_track_heights.size();i++) {
|
||||
video_track_heights[i] -= TRACK_HEIGHT_INCREMENT;
|
||||
if (video_track_heights[i] < TRACK_MIN_HEIGHT) video_track_heights[i] = TRACK_MIN_HEIGHT;
|
||||
for (int i=0;i<video_track_heights.size();i++) {
|
||||
video_track_heights[i] = qMax(
|
||||
video_track_heights[i] - olive::timeline::kTrackHeightIncrement,
|
||||
olive::timeline::kTrackMinHeight
|
||||
);
|
||||
}
|
||||
for (int i=0;i<audio_track_heights.size();i++) {
|
||||
audio_track_heights[i] -= TRACK_HEIGHT_INCREMENT;
|
||||
if (audio_track_heights[i] < TRACK_MIN_HEIGHT) audio_track_heights[i] = TRACK_MIN_HEIGHT;
|
||||
audio_track_heights[i] = qMax(
|
||||
audio_track_heights[i] - olive::timeline::kTrackHeightIncrement,
|
||||
olive::timeline::kTrackMinHeight
|
||||
);
|
||||
}
|
||||
repaint_timeline();
|
||||
}
|
||||
@@ -2059,7 +2063,7 @@ void Timeline::setup_ui() {
|
||||
setWidget(dockWidgetContents);
|
||||
}
|
||||
|
||||
void move_clip(ComboAction* ca, Clip *c, long iin, long iout, long iclip_in, int itrack, bool verify_transitions, bool relative) {
|
||||
void move_clip(ComboAction* ca, ClipPtr c, long iin, long iout, long iclip_in, int itrack, bool verify_transitions, bool relative) {
|
||||
ca->append(new MoveClipAction(c, iin, iout, iclip_in, itrack, relative));
|
||||
|
||||
if (verify_transitions) {
|
||||
|
||||
+17
-28
@@ -23,10 +23,17 @@
|
||||
|
||||
#include "ui/timelinetools.h"
|
||||
#include "project/selection.h"
|
||||
#include "project/clip.h"
|
||||
#include "project/undo.h"
|
||||
#include "ui/timelineheader.h"
|
||||
#include "ui/resizablescrollbar.h"
|
||||
#include "ui/audiomonitor.h"
|
||||
#include "ui/timelinewidget.h"
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <QVector>
|
||||
#include <QTime>
|
||||
#include <QPushButton>
|
||||
|
||||
#define TRACK_DEFAULT_HEIGHT 40
|
||||
|
||||
@@ -37,30 +44,12 @@
|
||||
#define ADD_OBJ_NOISE 4
|
||||
#define ADD_OBJ_AUDIO 5
|
||||
|
||||
class QPushButton;
|
||||
class SourceTable;
|
||||
class ViewerWidget;
|
||||
class ComboAction;
|
||||
class Effect;
|
||||
class Media;
|
||||
class Transition;
|
||||
class TimelineHeader;
|
||||
class TimelineWidget;
|
||||
class ResizableScrollBar;
|
||||
class AudioMonitor;
|
||||
class QScrollBar;
|
||||
struct EffectMeta;
|
||||
struct Sequence;
|
||||
class Clip;
|
||||
struct Footage;
|
||||
struct FootageStream;
|
||||
|
||||
bool is_clip_selected(Clip* clip, bool containing);
|
||||
bool is_clip_selected(ClipPtr clip, bool containing);
|
||||
int getScreenPointFromFrame(double zoom, long frame);
|
||||
long getFrameFromScreenPoint(double zoom, int x);
|
||||
bool selection_contains_transition(const Selection& s, Clip* c, int type);
|
||||
void move_clip(ComboAction *ca, Clip *c, long iin, long iout, long iclip_in, int itrack, bool verify_transitions = true, bool relative = false);
|
||||
void ripple_clips(ComboAction *ca, Sequence* s, long point, long length, const QVector<int>& ignore = QVector<int>());
|
||||
bool selection_contains_transition(const Selection& s, ClipPtr c, int type);
|
||||
void move_clip(ComboAction *ca, ClipPtr c, long iin, long iout, long iclip_in, int itrack, bool verify_transitions = true, bool relative = false);
|
||||
void ripple_clips(ComboAction *ca, SequencePtr s, long point, long length, const QVector<int>& ignore = QVector<int>());
|
||||
|
||||
struct Ghost {
|
||||
int clip;
|
||||
@@ -85,7 +74,7 @@ struct Ghost {
|
||||
bool trimming;
|
||||
|
||||
// transition trimming
|
||||
Transition* transition;
|
||||
TransitionPtr transition;
|
||||
};
|
||||
|
||||
class Timeline : public QDockWidget
|
||||
@@ -98,15 +87,15 @@ public:
|
||||
bool focused();
|
||||
void multiply_zoom(double m);
|
||||
void copy(bool del);
|
||||
Clip* split_clip(ComboAction* ca, bool transitions, int p, long frame);
|
||||
Clip* split_clip(ComboAction* ca, bool transitions, int p, long frame, long post_in);
|
||||
ClipPtr split_clip(ComboAction* ca, bool transitions, int p, long frame);
|
||||
ClipPtr split_clip(ComboAction* ca, bool transitions, int p, long frame, long post_in);
|
||||
bool split_selection(ComboAction* ca);
|
||||
bool split_all_clips_at_point(ComboAction *ca, long point);
|
||||
bool split_clip_and_relink(ComboAction* ca, int clip, long frame, bool relink);
|
||||
void clean_up_selections(QVector<Selection>& areas);
|
||||
void deselect_area(long in, long out, int track);
|
||||
void delete_areas_and_relink(ComboAction *ca, QVector<Selection>& areas, bool deselect_areas);
|
||||
void relink_clips_using_ids(QVector<int>& old_clips, QVector<Clip*>& new_clips);
|
||||
void relink_clips_using_ids(QVector<int>& old_clips, QVector<ClipPtr>& new_clips);
|
||||
void update_sequence();
|
||||
|
||||
QVector<int> get_tracks_of_linked_clips(int i);
|
||||
@@ -114,8 +103,8 @@ public:
|
||||
void edit_to_point_internal(bool in, bool ripple);
|
||||
void delete_in_out_internal(bool ripple);
|
||||
|
||||
void create_ghosts_from_media(Sequence *seq, long entry_point, QVector<Media *> &media_list);
|
||||
void add_clips_from_ghosts(ComboAction *ca, Sequence *s);
|
||||
void create_ghosts_from_media(SequencePtr seq, long entry_point, QVector<Media *> &media_list);
|
||||
void add_clips_from_ghosts(ComboAction *ca, SequencePtr s);
|
||||
|
||||
int getTimelineScreenPointFromFrame(long frame);
|
||||
long getTimelineFrameFromScreenPoint(int x);
|
||||
|
||||
+10
-11
@@ -123,7 +123,7 @@ void Viewer::reset_all_audio() {
|
||||
if (seq != nullptr) {
|
||||
long last_frame = 0;
|
||||
for (int i=0;i<seq->clips.size();i++) {
|
||||
Clip* c = seq->clips.at(i);
|
||||
ClipPtr c = seq->clips.at(i);
|
||||
if (c != nullptr) {
|
||||
c->reset_audio();
|
||||
last_frame = qMax(last_frame, c->timeline_out);
|
||||
@@ -438,9 +438,9 @@ void Viewer::pause() {
|
||||
panel_project->process_file_list(file_list);
|
||||
|
||||
// add it to the sequence
|
||||
Clip* c = new Clip(seq);
|
||||
ClipPtr c = ClipPtr(new Clip(seq));
|
||||
Media* m = panel_project->last_imported_media.at(0);
|
||||
Footage* f = m->to_footage();
|
||||
FootagePtr f = m->to_footage();
|
||||
|
||||
f->ready_lock.lock();
|
||||
|
||||
@@ -457,7 +457,7 @@ void Viewer::pause() {
|
||||
|
||||
f->ready_lock.unlock();
|
||||
|
||||
QVector<Clip*> add_clips;
|
||||
QVector<ClipPtr> add_clips;
|
||||
add_clips.append(c);
|
||||
olive::UndoStack.push(new AddClipCommand(seq, add_clips)); // add clip
|
||||
}
|
||||
@@ -720,11 +720,11 @@ void Viewer::set_media(Media* m) {
|
||||
switch (media->get_type()) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
{
|
||||
Footage* footage = media->to_footage();
|
||||
FootagePtr footage = media->to_footage();
|
||||
|
||||
marker_ref = &footage->markers;
|
||||
|
||||
seq = new Sequence();
|
||||
seq = SequencePtr(new Sequence());
|
||||
created_sequence = true;
|
||||
seq->wrapper_sequence = true;
|
||||
seq->name = footage->name;
|
||||
@@ -743,7 +743,7 @@ void Viewer::set_media(Media* m) {
|
||||
seq->height = video_stream.video_height;
|
||||
if (video_stream.video_frame_rate > 0 && !video_stream.infinite_length) seq->frame_rate = video_stream.video_frame_rate * footage->speed;
|
||||
|
||||
Clip* c = new Clip(seq);
|
||||
ClipPtr c = ClipPtr(new Clip(seq));
|
||||
c->media = media;
|
||||
c->media_stream = video_stream.file_index;
|
||||
c->timeline_in = 0;
|
||||
@@ -762,7 +762,7 @@ void Viewer::set_media(Media* m) {
|
||||
const FootageStream& audio_stream = footage->audio_tracks.at(0);
|
||||
seq->audio_frequency = audio_stream.audio_frequency;
|
||||
|
||||
Clip* c = new Clip(seq);
|
||||
ClipPtr c = ClipPtr(new Clip(seq));
|
||||
c->media = media;
|
||||
c->media_stream = audio_stream.file_index;
|
||||
c->timeline_in = 0;
|
||||
@@ -848,13 +848,12 @@ void Viewer::clean_created_seq() {
|
||||
undo_stack.command(i)
|
||||
}*/
|
||||
|
||||
delete seq;
|
||||
seq = nullptr;
|
||||
seq.reset();
|
||||
created_sequence = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Viewer::set_sequence(bool main, Sequence *s) {
|
||||
void Viewer::set_sequence(bool main, SequencePtr s) {
|
||||
pause();
|
||||
|
||||
reset_all_audio();
|
||||
|
||||
+10
-12
@@ -24,19 +24,17 @@
|
||||
#include <QDockWidget>
|
||||
#include <QTimer>
|
||||
#include <QIcon>
|
||||
|
||||
class Timeline;
|
||||
class Media;
|
||||
struct Sequence;
|
||||
class TimelineHeader;
|
||||
class ResizableScrollBar;
|
||||
class ViewerContainer;
|
||||
class LabelSlider;
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "project/marker.h"
|
||||
#include "project/media.h"
|
||||
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "ui/timelinewidget.h"
|
||||
#include "ui/timelineheader.h"
|
||||
#include "ui/labelslider.h"
|
||||
#include "ui/resizablescrollbar.h"
|
||||
|
||||
bool frame_rate_is_droppable(float rate);
|
||||
long timecode_to_frame(const QString& s, int view, double frame_rate);
|
||||
@@ -92,7 +90,7 @@ public:
|
||||
ViewerWidget* viewer_widget;
|
||||
|
||||
Media* media;
|
||||
Sequence* seq;
|
||||
SequencePtr seq;
|
||||
QVector<Marker>* marker_ref;
|
||||
|
||||
void set_marker();
|
||||
@@ -124,7 +122,7 @@ private slots:
|
||||
private:
|
||||
void update_window_title();
|
||||
void clean_created_seq();
|
||||
void set_sequence(bool main, Sequence* s);
|
||||
void set_sequence(bool main, SequencePtr s);
|
||||
bool main_sequence;
|
||||
bool created_sequence;
|
||||
long cached_end_frame;
|
||||
|
||||
Reference in New Issue
Block a user