moved undostack to its own source file
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
#include "project/media.h"
|
#include "project/media.h"
|
||||||
#include "panels/project.h"
|
#include "panels/project.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
|
||||||
MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "panels/project.h"
|
#include "panels/project.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
#include "timeline/clip.h"
|
#include "timeline/clip.h"
|
||||||
#include "panels/timeline.h"
|
#include "panels/timeline.h"
|
||||||
|
|||||||
@@ -544,6 +544,12 @@ void PreferencesDialog::setup_ui() {
|
|||||||
use_software_fallbacks_checkbox->setChecked(olive::CurrentConfig.use_software_fallback);
|
use_software_fallbacks_checkbox->setChecked(olive::CurrentConfig.use_software_fallback);
|
||||||
general_layout->addWidget(use_software_fallbacks_checkbox, row, 0, 1, 4);
|
general_layout->addWidget(use_software_fallbacks_checkbox, row, 0, 1, 4);
|
||||||
|
|
||||||
|
row++;
|
||||||
|
|
||||||
|
// General -> Default Sequence Settings
|
||||||
|
QPushButton* default_sequence_settings = new QPushButton(tr("Default Sequence Settings"));
|
||||||
|
general_layout->addWidget(default_sequence_settings);
|
||||||
|
|
||||||
tabWidget->addTab(general_tab, tr("General"));
|
tabWidget->addTab(general_tab, tr("General"));
|
||||||
|
|
||||||
// Behavior
|
// Behavior
|
||||||
|
|||||||
@@ -34,6 +34,8 @@
|
|||||||
#include <QDoubleSpinBox>
|
#include <QDoubleSpinBox>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
|
|
||||||
|
#include "timeline/sequence.h"
|
||||||
|
|
||||||
class KeySequenceEditor : public QKeySequenceEdit {
|
class KeySequenceEditor : public QKeySequenceEdit {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -72,6 +74,13 @@ private:
|
|||||||
|
|
||||||
// used to delete previews
|
// used to delete previews
|
||||||
// type can be: 't' for thumbnails, 'w' for waveforms, or 1 for all
|
// type can be: 't' for thumbnails, 'w' for waveforms, or 1 for all
|
||||||
|
/**
|
||||||
|
* @brief Delete disk cached preview files (thumbnails, waveforms, etc.)
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
*
|
||||||
|
* The types of previews to
|
||||||
|
*/
|
||||||
void delete_previews(char type);
|
void delete_previews(char type);
|
||||||
|
|
||||||
QLineEdit* custom_css_fn;
|
QLineEdit* custom_css_fn;
|
||||||
@@ -94,6 +103,7 @@ private:
|
|||||||
QSpinBox* waveform_res_spinbox;
|
QSpinBox* waveform_res_spinbox;
|
||||||
QCheckBox* add_default_effects_to_clips;
|
QCheckBox* add_default_effects_to_clips;
|
||||||
QComboBox* ui_style;
|
QComboBox* ui_style;
|
||||||
|
Sequence sequence_settings;
|
||||||
|
|
||||||
QVector<QAction*> key_shortcut_actions;
|
QVector<QAction*> key_shortcut_actions;
|
||||||
QVector<QTreeWidgetItem*> key_shortcut_items;
|
QVector<QTreeWidgetItem*> key_shortcut_items;
|
||||||
|
|||||||
@@ -20,16 +20,16 @@
|
|||||||
|
|
||||||
#include "replaceclipmediadialog.h"
|
#include "replaceclipmediadialog.h"
|
||||||
|
|
||||||
#include "panels/panels.h"
|
|
||||||
|
|
||||||
#include "rendering/cacher.h"
|
|
||||||
#include "undo/undo.h"
|
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
#include "panels/panels.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
#include "rendering/cacher.h"
|
||||||
|
#include "undo/undo.h"
|
||||||
|
|
||||||
ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media* old_media) :
|
ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media* old_media) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
media(old_media)
|
media(old_media)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "panels/timeline.h"
|
#include "panels/timeline.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "effects/effect.h"
|
#include "effects/effect.h"
|
||||||
#include "project/media.h"
|
#include "project/media.h"
|
||||||
|
|
||||||
|
|||||||
+16
-14
@@ -20,6 +20,19 @@
|
|||||||
|
|
||||||
#include "effect.h"
|
#include "effect.h"
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QGridLayout>
|
||||||
|
#include <QXmlStreamReader>
|
||||||
|
#include <QXmlStreamWriter>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QOpenGLContext>
|
||||||
|
#include <QDir>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QtMath>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QFileDialog>
|
||||||
|
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "panels/viewer.h"
|
#include "panels/viewer.h"
|
||||||
#include "ui/viewerwidget.h"
|
#include "ui/viewerwidget.h"
|
||||||
@@ -39,6 +52,7 @@
|
|||||||
#include "project/clipboard.h"
|
#include "project/clipboard.h"
|
||||||
#include "global/config.h"
|
#include "global/config.h"
|
||||||
#include "transition.h"
|
#include "transition.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
|
||||||
#include "effects/internal/transformeffect.h"
|
#include "effects/internal/transformeffect.h"
|
||||||
#include "effects/internal/texteffect.h"
|
#include "effects/internal/texteffect.h"
|
||||||
@@ -54,19 +68,6 @@
|
|||||||
#include "effects/internal/fillleftrighteffect.h"
|
#include "effects/internal/fillleftrighteffect.h"
|
||||||
#include "effects/internal/frei0reffect.h"
|
#include "effects/internal/frei0reffect.h"
|
||||||
|
|
||||||
#include <QCheckBox>
|
|
||||||
#include <QGridLayout>
|
|
||||||
#include <QXmlStreamReader>
|
|
||||||
#include <QXmlStreamWriter>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QOpenGLContext>
|
|
||||||
#include <QDir>
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QtMath>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QFileDialog>
|
|
||||||
|
|
||||||
QVector<EffectMeta> effects;
|
QVector<EffectMeta> effects;
|
||||||
|
|
||||||
EffectPtr Effect::Create(Clip* c, const EffectMeta* em) {
|
EffectPtr Effect::Create(Clip* c, const EffectMeta* em) {
|
||||||
@@ -295,7 +296,7 @@ Effect::Effect(Clip* c, const EffectMeta *em) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (reader.name() == "shader" && reader.isStartElement()) {
|
} else if (reader.name() == "shader" && reader.isStartElement()) {
|
||||||
SetFlags(Flags() & ShaderFlag);
|
SetFlags(Flags() | ShaderFlag);
|
||||||
const QXmlStreamAttributes& attributes = reader.attributes();
|
const QXmlStreamAttributes& attributes = reader.attributes();
|
||||||
for (int i=0;i<attributes.size();i++) {
|
for (int i=0;i<attributes.size();i++) {
|
||||||
const QXmlStreamAttribute& attr = attributes.at(i);
|
const QXmlStreamAttribute& attr = attributes.at(i);
|
||||||
@@ -855,6 +856,7 @@ void Effect::process_shader(double timecode, GLTextureCoords&, int iteration) {
|
|||||||
case EffectField::EFFECT_FIELD_STRING:
|
case EffectField::EFFECT_FIELD_STRING:
|
||||||
case EffectField::EFFECT_FIELD_FONT:
|
case EffectField::EFFECT_FIELD_FONT:
|
||||||
case EffectField::EFFECT_FIELD_FILE:
|
case EffectField::EFFECT_FIELD_FILE:
|
||||||
|
case EffectField::EFFECT_FIELD_UI:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "effects/keyframe.h"
|
#include "effects/keyframe.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
|
||||||
class EffectRow;
|
class EffectRow;
|
||||||
class ComboAction;
|
class ComboAction;
|
||||||
|
|||||||
@@ -46,16 +46,6 @@ EffectGizmo::EffectGizmo(Effect *parent, int type) :
|
|||||||
color = Qt::white;
|
color = Qt::white;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectGizmo::set_previous_value() {
|
|
||||||
// TODO address this
|
|
||||||
/*
|
|
||||||
if (x_field1 != nullptr) static_cast<LabelSlider*>(x_field1->ui_element)->set_previous_value();
|
|
||||||
if (y_field1 != nullptr) static_cast<LabelSlider*>(y_field1->ui_element)->set_previous_value();
|
|
||||||
if (x_field2 != nullptr) static_cast<LabelSlider*>(x_field2->ui_element)->set_previous_value();
|
|
||||||
if (y_field2 != nullptr) static_cast<LabelSlider*>(y_field2->ui_element)->set_previous_value();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
int EffectGizmo::get_point_count() {
|
int EffectGizmo::get_point_count() {
|
||||||
return world_pos.size();
|
return world_pos.size();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ public:
|
|||||||
DoubleField* y_field2;
|
DoubleField* y_field2;
|
||||||
double y_field_multi2;
|
double y_field_multi2;
|
||||||
|
|
||||||
void set_previous_value();
|
|
||||||
|
|
||||||
QColor color;
|
QColor color;
|
||||||
int get_point_count();
|
int get_point_count();
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "timeline/clip.h"
|
#include "timeline/clip.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "global/debug.h"
|
#include "global/debug.h"
|
||||||
|
|
||||||
CornerPinEffect::CornerPinEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
CornerPinEffect::CornerPinEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||||
SetFlags(Effect::CoordsFlag & Effect::ShaderFlag);
|
SetFlags(Effect::CoordsFlag | Effect::ShaderFlag);
|
||||||
|
|
||||||
EffectRow* top_left = new EffectRow(this, tr("Top Left"));
|
EffectRow* top_left = new EffectRow(this, tr("Top Left"));
|
||||||
top_left_x = new DoubleField(top_left, "topleftx");
|
top_left_x = new DoubleField(top_left, "topleftx");
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "effectfields.h"
|
#include "effectfields.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
|
|
||||||
EffectKeyframe::EffectKeyframe()
|
EffectKeyframe::EffectKeyframe()
|
||||||
|
|||||||
+13
-12
@@ -20,15 +20,16 @@
|
|||||||
|
|
||||||
#include "global/global.h"
|
#include "global/global.h"
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QAction>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
|
|
||||||
#include "global/path.h"
|
#include "global/path.h"
|
||||||
#include "global/config.h"
|
#include "global/config.h"
|
||||||
|
|
||||||
|
|
||||||
#include "rendering/audio.h"
|
#include "rendering/audio.h"
|
||||||
|
|
||||||
#include "dialogs/demonotice.h"
|
#include "dialogs/demonotice.h"
|
||||||
#include "dialogs/preferencesdialog.h"
|
#include "dialogs/preferencesdialog.h"
|
||||||
#include "dialogs/exportdialog.h"
|
#include "dialogs/exportdialog.h"
|
||||||
@@ -36,18 +37,11 @@
|
|||||||
#include "dialogs/aboutdialog.h"
|
#include "dialogs/aboutdialog.h"
|
||||||
#include "dialogs/speeddialog.h"
|
#include "dialogs/speeddialog.h"
|
||||||
#include "dialogs/actionsearch.h"
|
#include "dialogs/actionsearch.h"
|
||||||
|
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
|
|
||||||
#include "ui/mediaiconservice.h"
|
#include "ui/mediaiconservice.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
#include "ui/updatenotification.h"
|
#include "ui/updatenotification.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QAction>
|
|
||||||
#include <QApplication>
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
std::unique_ptr<OliveGlobal> olive::Global;
|
std::unique_ptr<OliveGlobal> olive::Global;
|
||||||
QString olive::ActiveProjectFilename;
|
QString olive::ActiveProjectFilename;
|
||||||
@@ -56,9 +50,12 @@ QString olive::AppName;
|
|||||||
OliveGlobal::OliveGlobal() {
|
OliveGlobal::OliveGlobal() {
|
||||||
// sets current app name
|
// sets current app name
|
||||||
QString version_id;
|
QString version_id;
|
||||||
|
|
||||||
|
// if available, append the current Git hash (defined by `qmake` and the Makefile)
|
||||||
#ifdef GITHASH
|
#ifdef GITHASH
|
||||||
version_id = QString(" | %1").arg(GITHASH);
|
version_id = QString(" | %1").arg(GITHASH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
olive::AppName = QString("Olive (March 2019 | Alpha%1)").arg(version_id);
|
olive::AppName = QString("Olive (March 2019 | Alpha%1)").arg(version_id);
|
||||||
|
|
||||||
// set the file filter used in all file dialogs pertaining to Olive project files.
|
// set the file filter used in all file dialogs pertaining to Olive project files.
|
||||||
@@ -146,6 +143,9 @@ void OliveGlobal::load_translation_from_config() {
|
|||||||
|
|
||||||
void OliveGlobal::new_project() {
|
void OliveGlobal::new_project() {
|
||||||
if (can_close_project()) {
|
if (can_close_project()) {
|
||||||
|
// clear graph editor
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
|
|
||||||
// clear effects panel
|
// clear effects panel
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
@@ -288,6 +288,7 @@ void OliveGlobal::open_preferences() {
|
|||||||
|
|
||||||
void OliveGlobal::set_sequence(SequencePtr s)
|
void OliveGlobal::set_sequence(SequencePtr s)
|
||||||
{
|
{
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
olive::ActiveSequence = s;
|
olive::ActiveSequence = s;
|
||||||
|
|||||||
@@ -171,7 +171,8 @@ SOURCES += \
|
|||||||
effects/fields/buttonfield.cpp \
|
effects/fields/buttonfield.cpp \
|
||||||
ui/effectui.cpp \
|
ui/effectui.cpp \
|
||||||
effects/transition.cpp \
|
effects/transition.cpp \
|
||||||
ui/styling.cpp
|
ui/styling.cpp \
|
||||||
|
undo/undostack.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
ui/mainwindow.h \
|
ui/mainwindow.h \
|
||||||
@@ -296,7 +297,8 @@ HEADERS += \
|
|||||||
effects/fields/colorfield.h \
|
effects/fields/colorfield.h \
|
||||||
effects/fields/combofield.h \
|
effects/fields/combofield.h \
|
||||||
effects/transition.h \
|
effects/transition.h \
|
||||||
ui/styling.h
|
ui/styling.h \
|
||||||
|
undo/undostack.h
|
||||||
|
|
||||||
FORMS +=
|
FORMS +=
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "ui/collapsiblewidget.h"
|
#include "ui/collapsiblewidget.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "panels/project.h"
|
#include "panels/project.h"
|
||||||
#include "panels/timeline.h"
|
#include "panels/timeline.h"
|
||||||
#include "panels/viewer.h"
|
#include "panels/viewer.h"
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include "rendering/renderfunctions.h"
|
#include "rendering/renderfunctions.h"
|
||||||
#include "project/previewgenerator.h"
|
#include "project/previewgenerator.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
#include "global/config.h"
|
#include "global/config.h"
|
||||||
#include "rendering/cacher.h"
|
#include "rendering/cacher.h"
|
||||||
@@ -606,7 +607,9 @@ void Project::delete_selected_media() {
|
|||||||
|
|
||||||
// remove
|
// remove
|
||||||
if (remove) {
|
if (remove) {
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
if (olive::ActiveSequence != nullptr) olive::ActiveSequence->selections.clear();
|
if (olive::ActiveSequence != nullptr) olive::ActiveSequence->selections.clear();
|
||||||
|
|
||||||
// remove media and parents
|
// remove media and parents
|
||||||
@@ -1015,6 +1018,9 @@ void Project::delete_clips_using_selected_media() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Project::clear() {
|
void Project::clear() {
|
||||||
|
// clear graph editor
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
|
|
||||||
// clear effects cache
|
// clear effects cache
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "ui/flowlayout.h"
|
#include "ui/flowlayout.h"
|
||||||
#include "ui/cursors.h"
|
#include "ui/cursors.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "global/debug.h"
|
#include "global/debug.h"
|
||||||
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
@@ -450,6 +451,7 @@ void Timeline::nest() {
|
|||||||
create_ghosts_from_media(olive::ActiveSequence.get(), earliest_point, media_list);
|
create_ghosts_from_media(olive::ActiveSequence.get(), earliest_point, media_list);
|
||||||
add_clips_from_ghosts(ca, olive::ActiveSequence.get());
|
add_clips_from_ghosts(ca, olive::ActiveSequence.get());
|
||||||
|
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
olive::ActiveSequence->selections.clear();
|
olive::ActiveSequence->selections.clear();
|
||||||
|
|
||||||
@@ -680,6 +682,7 @@ void Timeline::toggle_enable_on_selected_clips() {
|
|||||||
|
|
||||||
void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_delete) {
|
void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_delete) {
|
||||||
if (selections.size() > 0) {
|
if (selections.size() > 0) {
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
ComboAction* ca = new ComboAction();
|
ComboAction* ca = new ComboAction();
|
||||||
@@ -1014,6 +1017,8 @@ bool selection_contains_transition(const Selection& s, Clip* c, int type) {
|
|||||||
|
|
||||||
void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& areas, bool deselect_areas) {
|
void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& areas, bool deselect_areas) {
|
||||||
clean_up_selections(areas);
|
clean_up_selections(areas);
|
||||||
|
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
QVector<int> pre_clips;
|
QVector<int> pre_clips;
|
||||||
|
|||||||
+8
-3
@@ -31,6 +31,7 @@
|
|||||||
#include "project/footage.h"
|
#include "project/footage.h"
|
||||||
#include "project/media.h"
|
#include "project/media.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "ui/audiomonitor.h"
|
#include "ui/audiomonitor.h"
|
||||||
#include "rendering/renderfunctions.h"
|
#include "rendering/renderfunctions.h"
|
||||||
#include "ui/viewercontainer.h"
|
#include "ui/viewercontainer.h"
|
||||||
@@ -852,9 +853,13 @@ void Viewer::clean_created_seq() {
|
|||||||
|
|
||||||
if (created_sequence) {
|
if (created_sequence) {
|
||||||
// TODO delete undo commands referencing this sequence to avoid crashes
|
// TODO delete undo commands referencing this sequence to avoid crashes
|
||||||
/*for (int i=0;i<undo_stack.count();i++) {
|
/*
|
||||||
undo_stack.command(i)
|
for (int i=0;i<olive::UndoStack.count();i++) {
|
||||||
}*/
|
const QUndoCommand* oa = olive::UndoStack.command(i);
|
||||||
|
if (typeid(*oa) == typeid(SetTimelineInOutCommand)) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
seq.reset();
|
seq.reset();
|
||||||
created_sequence = false;
|
created_sequence = false;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ extern "C" {
|
|||||||
#include "footage.h"
|
#include "footage.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "global/config.h"
|
#include "global/config.h"
|
||||||
#include "panels/viewer.h"
|
#include "panels/viewer.h"
|
||||||
#include "panels/project.h"
|
#include "panels/project.h"
|
||||||
|
|||||||
@@ -20,6 +20,14 @@
|
|||||||
|
|
||||||
#include "sourcescommon.h"
|
#include "sourcescommon.h"
|
||||||
|
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QAbstractItemView>
|
||||||
|
#include <QMimeData>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
#include "ui/menuhelper.h"
|
#include "ui/menuhelper.h"
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "project/media.h"
|
#include "project/media.h"
|
||||||
@@ -36,15 +44,7 @@
|
|||||||
#include "ui/viewerwidget.h"
|
#include "ui/viewerwidget.h"
|
||||||
#include "project/proxygenerator.h"
|
#include "project/proxygenerator.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include <QProcess>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QAbstractItemView>
|
|
||||||
#include <QMimeData>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
SourcesCommon::SourcesCommon(Project* parent) :
|
SourcesCommon::SourcesCommon(Project* parent) :
|
||||||
editing_item(nullptr),
|
editing_item(nullptr),
|
||||||
|
|||||||
+8
-7
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include "global/config.h"
|
#include "global/config.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
#include "timeline/clip.h"
|
#include "timeline/clip.h"
|
||||||
@@ -59,11 +60,11 @@ void set_marker_internal(Sequence* seq, const QVector<int>& clips) {
|
|||||||
|
|
||||||
// if (config.set_name_with_marker) is false (set above), ask for a marker name
|
// if (config.set_name_with_marker) is false (set above), ask for a marker name
|
||||||
if (!add_marker) {
|
if (!add_marker) {
|
||||||
QInputDialog d(olive::MainWindow);
|
QInputDialog d(olive::MainWindow);
|
||||||
d.setWindowTitle(QCoreApplication::translate("Marker", "Set Marker"));
|
d.setWindowTitle(QCoreApplication::translate("Marker", "Set Marker"));
|
||||||
d.setLabelText(clips.size() > 0
|
d.setLabelText(clips.size() > 0
|
||||||
? QCoreApplication::translate("Marker", "Set clip marker name:")
|
? QCoreApplication::translate("Marker", "Set clip marker name:")
|
||||||
: QCoreApplication::translate("Marker", "Set sequence marker name:"));
|
: QCoreApplication::translate("Marker", "Set sequence marker name:"));
|
||||||
d.setInputMode(QInputDialog::TextInput);
|
d.setInputMode(QInputDialog::TextInput);
|
||||||
add_marker = (d.exec() == QDialog::Accepted);
|
add_marker = (d.exec() == QDialog::Accepted);
|
||||||
marker_name = d.textValue();
|
marker_name = d.textValue();
|
||||||
@@ -78,10 +79,10 @@ void set_marker_internal(Sequence* seq, const QVector<int>& clips) {
|
|||||||
|
|
||||||
// add a marker action for each clip
|
// add a marker action for each clip
|
||||||
foreach (int i, clips) {
|
foreach (int i, clips) {
|
||||||
ClipPtr c = seq->clips.at(i);
|
ClipPtr c = seq->clips.at(i);
|
||||||
ca->append(new AddMarkerAction(&c->get_markers(),
|
ca->append(new AddMarkerAction(&c->get_markers(),
|
||||||
seq->playhead - c->timeline_in() + c->clip_in(),
|
seq->playhead - c->timeline_in() + c->clip_in(),
|
||||||
marker_name));
|
marker_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -110,7 +111,7 @@ void set_marker_internal(Sequence* seq, const QVector<int>& clips) {
|
|||||||
|
|
||||||
|
|
||||||
// push action
|
// push action
|
||||||
olive::UndoStack.push(ca);
|
olive::UndoStack.push(ca);
|
||||||
|
|
||||||
// redraw UI for new markers
|
// redraw UI for new markers
|
||||||
update_ui(false);
|
update_ui(false);
|
||||||
|
|||||||
+2
-2
@@ -31,8 +31,8 @@ class Sequence;
|
|||||||
using SequencePtr = std::shared_ptr<Sequence>;
|
using SequencePtr = std::shared_ptr<Sequence>;
|
||||||
|
|
||||||
struct Marker {
|
struct Marker {
|
||||||
long frame;
|
long frame;
|
||||||
QString name;
|
QString name;
|
||||||
};
|
};
|
||||||
|
|
||||||
void draw_marker(QPainter& p, int x, int y, int bottom, bool selected);
|
void draw_marker(QPainter& p, int x, int y, int bottom, bool selected);
|
||||||
|
|||||||
@@ -25,12 +25,13 @@
|
|||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "global/debug.h"
|
#include "global/debug.h"
|
||||||
|
|
||||||
Sequence::Sequence() {
|
Sequence::Sequence() :
|
||||||
playhead = 0;
|
playhead(0),
|
||||||
using_workarea = false;
|
using_workarea(false),
|
||||||
workarea_in = 0;
|
workarea_in(0),
|
||||||
workarea_out = 0;
|
workarea_out(0),
|
||||||
wrapper_sequence = false;
|
wrapper_sequence(false)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence::~Sequence() {}
|
Sequence::~Sequence() {}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "checkboxex.h"
|
#include "checkboxex.h"
|
||||||
|
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
|
||||||
CheckboxEx::CheckboxEx(QWidget* parent) : QCheckBox(parent) {
|
CheckboxEx::CheckboxEx(QWidget* parent) : QCheckBox(parent) {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
#include "ui/keyframedrawing.h"
|
#include "ui/keyframedrawing.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "effects/effect.h"
|
#include "effects/effect.h"
|
||||||
#include "timeline/clip.h"
|
#include "timeline/clip.h"
|
||||||
#include "ui/rectangleselect.h"
|
#include "ui/rectangleselect.h"
|
||||||
|
|||||||
+5
-4
@@ -20,6 +20,10 @@
|
|||||||
|
|
||||||
#include "keyframeview.h"
|
#include "keyframeview.h"
|
||||||
|
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QtMath>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
#include "effects/effect.h"
|
#include "effects/effect.h"
|
||||||
#include "ui/collapsiblewidget.h"
|
#include "ui/collapsiblewidget.h"
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
@@ -27,6 +31,7 @@
|
|||||||
#include "panels/timeline.h"
|
#include "panels/timeline.h"
|
||||||
#include "ui/timelineheader.h"
|
#include "ui/timelineheader.h"
|
||||||
#include "undo/undo.h"
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include "panels/viewer.h"
|
#include "panels/viewer.h"
|
||||||
#include "ui/viewerwidget.h"
|
#include "ui/viewerwidget.h"
|
||||||
#include "timeline/sequence.h"
|
#include "timeline/sequence.h"
|
||||||
@@ -38,10 +43,6 @@
|
|||||||
#include "effects/keyframe.h"
|
#include "effects/keyframe.h"
|
||||||
#include "ui/graphview.h"
|
#include "ui/graphview.h"
|
||||||
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QtMath>
|
|
||||||
#include <QMenu>
|
|
||||||
|
|
||||||
KeyframeView::KeyframeView(QWidget *parent) :
|
KeyframeView::KeyframeView(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
visible_in(0),
|
visible_in(0),
|
||||||
|
|||||||
+22
-30
@@ -20,35 +20,6 @@
|
|||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "global/global.h"
|
|
||||||
|
|
||||||
#include "ui/menuhelper.h"
|
|
||||||
|
|
||||||
#include "project/projectelements.h"
|
|
||||||
#include "timeline/clip.h"
|
|
||||||
|
|
||||||
#include "global/config.h"
|
|
||||||
#include "global/path.h"
|
|
||||||
#include "global/debug.h"
|
|
||||||
|
|
||||||
#include "project/proxygenerator.h"
|
|
||||||
#include "project/projectfilter.h"
|
|
||||||
|
|
||||||
#include "ui/sourcetable.h"
|
|
||||||
#include "ui/viewerwidget.h"
|
|
||||||
#include "ui/sourceiconview.h"
|
|
||||||
#include "ui/timelineheader.h"
|
|
||||||
#include "ui/icons.h"
|
|
||||||
#include "ui/cursors.h"
|
|
||||||
#include "ui/focusfilter.h"
|
|
||||||
|
|
||||||
#include "panels/panels.h"
|
|
||||||
|
|
||||||
#include "dialogs/debugdialog.h"
|
|
||||||
|
|
||||||
#include "rendering/audio.h"
|
|
||||||
#include "rendering/renderfunctions.h"
|
|
||||||
|
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
@@ -65,7 +36,27 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(ClipPtr);
|
#include "global/global.h"
|
||||||
|
#include "ui/menuhelper.h"
|
||||||
|
#include "project/projectelements.h"
|
||||||
|
#include "timeline/clip.h"
|
||||||
|
#include "global/config.h"
|
||||||
|
#include "global/path.h"
|
||||||
|
#include "global/debug.h"
|
||||||
|
#include "project/proxygenerator.h"
|
||||||
|
#include "project/projectfilter.h"
|
||||||
|
#include "ui/sourcetable.h"
|
||||||
|
#include "ui/viewerwidget.h"
|
||||||
|
#include "ui/sourceiconview.h"
|
||||||
|
#include "ui/timelineheader.h"
|
||||||
|
#include "ui/icons.h"
|
||||||
|
#include "ui/cursors.h"
|
||||||
|
#include "ui/focusfilter.h"
|
||||||
|
#include "panels/panels.h"
|
||||||
|
#include "dialogs/debugdialog.h"
|
||||||
|
#include "rendering/audio.h"
|
||||||
|
#include "rendering/renderfunctions.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
|
||||||
MainWindow* olive::MainWindow;
|
MainWindow* olive::MainWindow;
|
||||||
|
|
||||||
@@ -982,6 +973,7 @@ void MainWindow::closeEvent(QCloseEvent *e) {
|
|||||||
// stop proxy generator thread
|
// stop proxy generator thread
|
||||||
olive::proxy_generator.cancel();
|
olive::proxy_generator.cancel();
|
||||||
|
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
olive::Global->set_sequence(nullptr);
|
olive::Global->set_sequence(nullptr);
|
||||||
|
|||||||
+13
-7
@@ -122,15 +122,21 @@ void MenuHelper::make_clip_functions_menu(QMenu *parent) {
|
|||||||
parent->addAction(nest_);
|
parent->addAction(nest_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuHelper::make_edit_functions_menu(QMenu *parent) {
|
void MenuHelper::make_edit_functions_menu(QMenu *parent, bool objects_are_selected) {
|
||||||
parent->addAction(cut_);
|
if (objects_are_selected) {
|
||||||
parent->addAction(copy_);
|
parent->addAction(cut_);
|
||||||
|
parent->addAction(copy_);
|
||||||
|
}
|
||||||
|
|
||||||
parent->addAction(paste_);
|
parent->addAction(paste_);
|
||||||
parent->addAction(paste_insert_);
|
parent->addAction(paste_insert_);
|
||||||
parent->addAction(duplicate_);
|
|
||||||
parent->addAction(delete_);
|
if (objects_are_selected) {
|
||||||
parent->addAction(ripple_delete_);
|
parent->addAction(duplicate_);
|
||||||
parent->addAction(split_);
|
parent->addAction(delete_);
|
||||||
|
parent->addAction(ripple_delete_);
|
||||||
|
parent->addAction(split_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuHelper::set_bool_action_checked(QAction *a) {
|
void MenuHelper::set_bool_action_checked(QAction *a) {
|
||||||
|
|||||||
+6
-1
@@ -75,8 +75,13 @@ public:
|
|||||||
* @param parent
|
* @param parent
|
||||||
*
|
*
|
||||||
* The menu to add items to.
|
* The menu to add items to.
|
||||||
|
*
|
||||||
|
* @param objects_are_selected
|
||||||
|
*
|
||||||
|
* Some extra functions may be hidden in the event no clip is actually selected. Set this to **FALSE** to hide those
|
||||||
|
* functions.
|
||||||
*/
|
*/
|
||||||
void make_edit_functions_menu(QMenu* parent);
|
void make_edit_functions_menu(QMenu* parent, bool objects_are_selected = true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Sets the checked state of a menu item based on a Boolean variable.
|
* @brief Sets the checked state of a menu item based on a Boolean variable.
|
||||||
|
|||||||
@@ -20,6 +20,13 @@
|
|||||||
|
|
||||||
#include "timelineheader.h"
|
#include "timelineheader.h"
|
||||||
|
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QScrollBar>
|
||||||
|
#include <QtMath>
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "panels/panels.h"
|
#include "panels/panels.h"
|
||||||
#include "panels/timeline.h"
|
#include "panels/timeline.h"
|
||||||
@@ -31,13 +38,7 @@
|
|||||||
#include "global/global.h"
|
#include "global/global.h"
|
||||||
#include "ui/menuhelper.h"
|
#include "ui/menuhelper.h"
|
||||||
#include "global/debug.h"
|
#include "global/debug.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
#include <QPainter>
|
|
||||||
#include <QMouseEvent>
|
|
||||||
#include <QScrollBar>
|
|
||||||
#include <QtMath>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QAction>
|
|
||||||
|
|
||||||
#define CLICK_RANGE 5
|
#define CLICK_RANGE 5
|
||||||
#define PLAYHEAD_SIZE 6
|
#define PLAYHEAD_SIZE 6
|
||||||
|
|||||||
+30
-37
@@ -20,32 +20,6 @@
|
|||||||
|
|
||||||
#include "timelinewidget.h"
|
#include "timelinewidget.h"
|
||||||
|
|
||||||
#include "global/global.h"
|
|
||||||
#include "panels/panels.h"
|
|
||||||
#include "project/projectelements.h"
|
|
||||||
|
|
||||||
#include "rendering/audio.h"
|
|
||||||
#include "global/config.h"
|
|
||||||
#include "ui/sourcetable.h"
|
|
||||||
#include "ui/sourceiconview.h"
|
|
||||||
#include "undo/undo.h"
|
|
||||||
#include "ui/viewerwidget.h"
|
|
||||||
#include "ui/resizablescrollbar.h"
|
|
||||||
#include "dialogs/newsequencedialog.h"
|
|
||||||
#include "mainwindow.h"
|
|
||||||
#include "ui/rectangleselect.h"
|
|
||||||
#include "rendering/renderfunctions.h"
|
|
||||||
#include "ui/cursors.h"
|
|
||||||
#include "ui/menuhelper.h"
|
|
||||||
#include "ui/focusfilter.h"
|
|
||||||
#include "dialogs/clippropertiesdialog.h"
|
|
||||||
#include "global/debug.h"
|
|
||||||
|
|
||||||
#include "effects/effect.h"
|
|
||||||
|
|
||||||
#include "effects/internal/solideffect.h"
|
|
||||||
#include "effects/internal/texteffect.h"
|
|
||||||
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
@@ -61,6 +35,30 @@
|
|||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
|
||||||
|
#include "global/global.h"
|
||||||
|
#include "panels/panels.h"
|
||||||
|
#include "project/projectelements.h"
|
||||||
|
#include "rendering/audio.h"
|
||||||
|
#include "global/config.h"
|
||||||
|
#include "ui/sourcetable.h"
|
||||||
|
#include "ui/sourceiconview.h"
|
||||||
|
#include "undo/undo.h"
|
||||||
|
#include "undo/undostack.h"
|
||||||
|
#include "ui/viewerwidget.h"
|
||||||
|
#include "ui/resizablescrollbar.h"
|
||||||
|
#include "dialogs/newsequencedialog.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui/rectangleselect.h"
|
||||||
|
#include "rendering/renderfunctions.h"
|
||||||
|
#include "ui/cursors.h"
|
||||||
|
#include "ui/menuhelper.h"
|
||||||
|
#include "ui/focusfilter.h"
|
||||||
|
#include "dialogs/clippropertiesdialog.h"
|
||||||
|
#include "global/debug.h"
|
||||||
|
#include "effects/effect.h"
|
||||||
|
#include "effects/internal/solideffect.h"
|
||||||
|
#include "effects/internal/texteffect.h"
|
||||||
|
|
||||||
#define MAX_TEXT_WIDTH 20
|
#define MAX_TEXT_WIDTH 20
|
||||||
#define TRANSITION_BETWEEN_RANGE 40
|
#define TRANSITION_BETWEEN_RANGE 40
|
||||||
|
|
||||||
@@ -90,8 +88,6 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
|
|||||||
|
|
||||||
QMenu menu(this);
|
QMenu menu(this);
|
||||||
|
|
||||||
// TODO replace with Olive::MenuHelper::make_edit_functions_menu() without losing functionality
|
|
||||||
|
|
||||||
QAction* undoAction = menu.addAction(tr("&Undo"));
|
QAction* undoAction = menu.addAction(tr("&Undo"));
|
||||||
QAction* redoAction = menu.addAction(tr("&Redo"));
|
QAction* redoAction = menu.addAction(tr("&Redo"));
|
||||||
connect(undoAction, SIGNAL(triggered(bool)), olive::Global.get(), SLOT(undo()));
|
connect(undoAction, SIGNAL(triggered(bool)), olive::Global.get(), SLOT(undo()));
|
||||||
@@ -103,13 +99,7 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
|
|||||||
// collect all the selected clips
|
// collect all the selected clips
|
||||||
QVector<Clip*> selected_clips = olive::ActiveSequence->SelectedClips();
|
QVector<Clip*> selected_clips = olive::ActiveSequence->SelectedClips();
|
||||||
|
|
||||||
if (!selected_clips.isEmpty()) {
|
olive::MenuHelper.make_edit_functions_menu(&menu, !selected_clips.isEmpty());
|
||||||
// clips are selected
|
|
||||||
menu.addAction(tr("C&ut"), &olive::FocusFilter, SLOT(cut()));
|
|
||||||
menu.addAction(tr("Cop&y"), &olive::FocusFilter, SLOT(copy()));
|
|
||||||
}
|
|
||||||
|
|
||||||
menu.addAction(tr("&Paste"), olive::Global.get(), SLOT(paste()));
|
|
||||||
|
|
||||||
if (selected_clips.isEmpty()) {
|
if (selected_clips.isEmpty()) {
|
||||||
// no clips are selected
|
// no clips are selected
|
||||||
@@ -119,7 +109,7 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
|
|||||||
panel_timeline->cursor_track = getTrackFromScreenPoint(pos.y());
|
panel_timeline->cursor_track = getTrackFromScreenPoint(pos.y());
|
||||||
|
|
||||||
if (panel_timeline->can_ripple_empty_space(panel_timeline->cursor_frame, panel_timeline->cursor_track)) {
|
if (panel_timeline->can_ripple_empty_space(panel_timeline->cursor_frame, panel_timeline->cursor_track)) {
|
||||||
QAction* ripple_delete_action = menu.addAction(tr("R&ipple Delete"));
|
QAction* ripple_delete_action = menu.addAction(tr("R&ipple Delete Empty Space"));
|
||||||
connect(ripple_delete_action, SIGNAL(triggered(bool)), panel_timeline, SLOT(ripple_delete_empty_space()));
|
connect(ripple_delete_action, SIGNAL(triggered(bool)), panel_timeline, SLOT(ripple_delete_empty_space()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +118,9 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!selected_clips.isEmpty()) {
|
if (!selected_clips.isEmpty()) {
|
||||||
|
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
|
||||||
menu.addAction(tr("&Speed/Duration"), olive::Global.get(), SLOT(open_speed_dialog()));
|
menu.addAction(tr("&Speed/Duration"), olive::Global.get(), SLOT(open_speed_dialog()));
|
||||||
|
|
||||||
QAction* autoscaleAction = menu.addAction(tr("Auto-s&cale"), this, SLOT(toggle_autoscale()));
|
QAction* autoscaleAction = menu.addAction(tr("Auto-s&cale"), this, SLOT(toggle_autoscale()));
|
||||||
@@ -277,9 +269,10 @@ void TimelineWidget::dragEnterEvent(QDragEnterEvent *event) {
|
|||||||
panel_project->process_file_list(file_list);
|
panel_project->process_file_list(file_list);
|
||||||
|
|
||||||
for (int i=0;i<panel_project->last_imported_media.size();i++) {
|
for (int i=0;i<panel_project->last_imported_media.size();i++) {
|
||||||
|
Footage* f = panel_project->last_imported_media.at(i)->to_footage();
|
||||||
|
|
||||||
// waits for media to have a duration
|
// waits for media to have a duration
|
||||||
// TODO would be much nicer if this was multithreaded
|
// TODO would be much nicer if this was multithreaded
|
||||||
Footage* f = panel_project->last_imported_media.at(i)->to_footage();
|
|
||||||
f->ready_lock.lock();
|
f->ready_lock.lock();
|
||||||
f->ready_lock.unlock();
|
f->ready_lock.unlock();
|
||||||
|
|
||||||
|
|||||||
@@ -326,10 +326,6 @@ void ViewerWidget::mousePressEvent(QMouseEvent* event) {
|
|||||||
gizmo_y_mvmt = 0;
|
gizmo_y_mvmt = 0;
|
||||||
|
|
||||||
selected_gizmo = get_gizmo_from_mouse(event->pos().x(), event->pos().y());
|
selected_gizmo = get_gizmo_from_mouse(event->pos().x(), event->pos().y());
|
||||||
|
|
||||||
if (selected_gizmo != nullptr) {
|
|
||||||
selected_gizmo->set_previous_value();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
dragging = true;
|
dragging = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -42,8 +42,6 @@
|
|||||||
#include "project/previewgenerator.h"
|
#include "project/previewgenerator.h"
|
||||||
#include "ui/mainwindow.h"
|
#include "ui/mainwindow.h"
|
||||||
|
|
||||||
QUndoStack olive::UndoStack;
|
|
||||||
|
|
||||||
MoveClipAction::MoveClipAction(Clip *c, long iin, long iout, long iclip_in, int itrack, bool irelative) {
|
MoveClipAction::MoveClipAction(Clip *c, long iin, long iout, long iclip_in, int itrack, bool irelative) {
|
||||||
clip = c;
|
clip = c;
|
||||||
|
|
||||||
@@ -354,6 +352,7 @@ AddClipCommand::~AddClipCommand() {}
|
|||||||
|
|
||||||
void AddClipCommand::doUndo() {
|
void AddClipCommand::doUndo() {
|
||||||
// clear effects panel
|
// clear effects panel
|
||||||
|
panel_graph_editor->set_row(nullptr);
|
||||||
panel_effect_controls->Clear(true);
|
panel_effect_controls->Clear(true);
|
||||||
|
|
||||||
for (int i=0;i<clips.size();i++) {
|
for (int i=0;i<clips.size();i++) {
|
||||||
@@ -842,12 +841,13 @@ void EditSequenceCommand::doRedo() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EditSequenceCommand::update() {
|
void EditSequenceCommand::update() {
|
||||||
// update tooltip
|
// Update sequence's tooltip
|
||||||
// TODO/FIXME: this is a lousy way to do this, Media should have a separate fuctionn for updating the tooltip
|
|
||||||
item->update_tooltip();
|
item->update_tooltip();
|
||||||
|
|
||||||
for (int i=0;i<seq->clips.size();i++) {
|
for (int i=0;i<seq->clips.size();i++) {
|
||||||
if (seq->clips.at(i) != nullptr) seq->clips.at(i)->refresh();
|
if (seq->clips.at(i) != nullptr) {
|
||||||
|
seq->clips.at(i)->refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (olive::ActiveSequence == seq) {
|
if (olive::ActiveSequence == seq) {
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ struct EffectMeta;
|
|||||||
class EffectRow;
|
class EffectRow;
|
||||||
class EffectField;
|
class EffectField;
|
||||||
|
|
||||||
namespace olive {
|
|
||||||
extern QUndoStack UndoStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
class OliveAction : public QUndoCommand {
|
class OliveAction : public QUndoCommand {
|
||||||
public:
|
public:
|
||||||
OliveAction(bool iset_window_modified = true);
|
OliveAction(bool iset_window_modified = true);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#include "undostack.h"
|
||||||
|
|
||||||
|
QUndoStack olive::UndoStack;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef UNDOSTACK_H
|
||||||
|
#define UNDOSTACK_H
|
||||||
|
|
||||||
|
#include <QUndoStack>
|
||||||
|
|
||||||
|
namespace olive {
|
||||||
|
extern QUndoStack UndoStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // UNDOSTACK_H
|
||||||
Reference in New Issue
Block a user