better ]shared transitions, dock tabs, effects panel name
This commit is contained in:
@@ -23,7 +23,8 @@ EffectControls::EffectControls(QWidget *parent) :
|
||||
QDockWidget(parent),
|
||||
multiple(false),
|
||||
zoom(1),
|
||||
ui(new Ui::EffectControls)
|
||||
ui(new Ui::EffectControls),
|
||||
panel_name("Effects: ")
|
||||
{
|
||||
ui->setupUi(this);
|
||||
init_effects();
|
||||
@@ -34,7 +35,6 @@ EffectControls::EffectControls(QWidget *parent) :
|
||||
ui->effects_area->parent_widget = ui->scrollArea;
|
||||
ui->effects_area->keyframe_area = ui->keyframeView;
|
||||
ui->effects_area->header = ui->headers;
|
||||
|
||||
ui->keyframeView->header = ui->headers;
|
||||
|
||||
ui->label_2->setVisible(false);
|
||||
@@ -262,6 +262,7 @@ void EffectControls::clear_effects(bool clear_cache) {
|
||||
ui->headers->setVisible(false);
|
||||
ui->keyframeView->setEnabled(false);
|
||||
if (clear_cache) selected_clips.clear();
|
||||
setWindowTitle(panel_name + "(none)");
|
||||
}
|
||||
|
||||
void EffectControls::deselect_all_effects(QWidget* sender) {
|
||||
@@ -298,6 +299,7 @@ void EffectControls::load_effects() {
|
||||
}
|
||||
}
|
||||
if (selected_clips.size() > 0) {
|
||||
setWindowTitle(panel_name + sequence->clips.at(selected_clips.at(0))->name);
|
||||
ui->verticalScrollBar->setMaximum(qMax(0, ui->effects_area->sizeHint().height() - ui->headers->height() + ui->scrollArea->horizontalScrollBar()->height()/* - ui->keyframeView->height() - ui->headers->height()*/));
|
||||
ui->keyframeView->setEnabled(true);
|
||||
ui->headers->setVisible(true);
|
||||
|
||||
+1
-12
@@ -66,18 +66,7 @@ private:
|
||||
|
||||
bool video_menu;
|
||||
bool transition_menu;
|
||||
QString panel_name;
|
||||
};
|
||||
|
||||
/*class EffectAddCommand : public QUndoCommand {
|
||||
public:
|
||||
EffectAddCommand();
|
||||
~EffectAddCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
QVector<Clip*> clips;
|
||||
QVector<Effect*> effects;
|
||||
private:
|
||||
bool done;
|
||||
};*/
|
||||
|
||||
#endif // EFFECTCONTROLS_H
|
||||
|
||||
+3
-7
@@ -1076,8 +1076,7 @@ bool Project::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
int effect_id = -1;
|
||||
QString effect_name;
|
||||
bool effect_enabled = true;
|
||||
long effect_pre_length = -1;
|
||||
long effect_post_length = -1;
|
||||
long effect_length = -1;
|
||||
for (int j=0;j<stream.attributes().size();j++) {
|
||||
const QXmlStreamAttribute& attr = stream.attributes().at(j);
|
||||
if (attr.name() == "id") {
|
||||
@@ -1087,9 +1086,7 @@ bool Project::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
} else if (attr.name() == "name") {
|
||||
effect_name = attr.value().toString();
|
||||
} else if (attr.name() == "length") {
|
||||
effect_pre_length = attr.value().toLong();
|
||||
} else if (attr.name() == "postlength") { // backwards compatibility
|
||||
effect_post_length = attr.value().toLong();
|
||||
effect_length = attr.value().toLong();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,8 +1136,7 @@ bool Project::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
|
||||
int transition_index = create_transition(c, NULL, meta);
|
||||
Transition* t = c->sequence->transitions.at(transition_index);
|
||||
if (effect_pre_length > -1) t->length = effect_pre_length;
|
||||
if (effect_post_length > -1) t->length2 = effect_post_length;
|
||||
if (effect_length > -1) t->length = effect_length;
|
||||
t->set_enabled(effect_enabled);
|
||||
t->load(stream);
|
||||
|
||||
|
||||
+2
-3
@@ -18,8 +18,6 @@
|
||||
#define FRAMES_IN_ONE_MINUTE 1798 // 1800 - 2
|
||||
#define FRAMES_IN_TEN_MINUTES 17978 // (FRAMES_IN_ONE_MINUTE * 10) - 2
|
||||
|
||||
QString panel_name = "Viewer: ";
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
@@ -38,7 +36,8 @@ Viewer::Viewer(QWidget *parent) :
|
||||
seq(NULL),
|
||||
ui(new Ui::Viewer),
|
||||
created_sequence(false),
|
||||
cue_recording_internal(false)
|
||||
cue_recording_internal(false),
|
||||
panel_name("Viewer: ")
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->headers->viewer = this;
|
||||
|
||||
@@ -86,6 +86,7 @@ private:
|
||||
void set_sequence(bool main, Sequence* s);
|
||||
bool main_sequence;
|
||||
bool created_sequence;
|
||||
QString panel_name;
|
||||
|
||||
bool cue_recording_internal;
|
||||
QTimer recording_flasher;
|
||||
|
||||
Reference in New Issue
Block a user