Merge pull request #309 from olive-editor/translation
wrapped all string literals with tr()
This commit is contained in:
+11
-1
@@ -14,7 +14,17 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
layout->setSpacing(20);
|
||||
setLayout(layout);
|
||||
|
||||
QLabel* label = new QLabel("<html><head/><body><p><img src=\":/icons/olive-splash.png\"/></p><p><a href=\"https://www.olivevideoeditor.org/\"><span style=\" text-decoration: underline; color:#007af4;\">https://www.olivevideoeditor.org/</span></a></p><p>Olive is a non-linear video editor. This software is free and protected by the GNU GPL.</p><p>Olive Team is obliged to inform users that Olive source code is available for download from its website.</p><p>Olive uses (at least) the following libraries in accordance with the GNU GPL/LGPL:</p><p>Qt, FFmpeg, libass, libfreetype, libmp3lame, libopenjpeg, libopus, libtheora, libtwolame, libvpx, libwavpack, libwebp, libx264, libx265, lzma, bzlib, zlib, libvidstab, libvorbis.</p></body></html>");
|
||||
QLabel* label =
|
||||
new QLabel("<html><head/><body>"
|
||||
"<p><img src=\":/icons/olive-splash.png\"/></p>"
|
||||
"<p><a href=\"https://www.olivevideoeditor.org/\">"
|
||||
"<span style=\" text-decoration: underline; color:#007af4;\">"
|
||||
"https://www.olivevideoeditor.org/"
|
||||
"</span></a></p><p>"
|
||||
+ tr("Olive is a non-linear video editor. This software is free and protected by the GNU GPL.")
|
||||
+ "</p><p>"
|
||||
+ tr("Olive Team is obliged to inform users that Olive source code is available for download from its website.")
|
||||
+ "</p></body></html>");
|
||||
label->setAlignment(Qt::AlignCenter);
|
||||
label->setWordWrap(true);
|
||||
layout->addWidget(label);
|
||||
|
||||
@@ -23,7 +23,7 @@ ActionSearch::ActionSearch(QWidget *parent) :
|
||||
QFont entry_field_font = entry_field->font();
|
||||
entry_field_font.setPointSize(qRound(entry_field_font.pointSize()*1.2));
|
||||
entry_field->setFont(entry_field_font);
|
||||
entry_field->setPlaceholderText("Search for action...");
|
||||
entry_field->setPlaceholderText(tr("Search for action..."));
|
||||
connect(entry_field, SIGNAL(textChanged(const QString&)), this, SLOT(search_update(const QString &)));
|
||||
connect(entry_field, SIGNAL(returnPressed()), this, SLOT(perform_action()));
|
||||
connect(entry_field, SIGNAL(moveSelectionUp()), this, SLOT(move_selection_up()));
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
DebugDialog* debug_dialog = nullptr;
|
||||
|
||||
DebugDialog::DebugDialog(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle("Debug Log");
|
||||
setWindowTitle(tr("Debug Log"));
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
||||
textEdit = new QTextEdit();
|
||||
textEdit->setWordWrapMode(QTextOption::NoWrap);
|
||||
layout->addWidget(textEdit);
|
||||
}
|
||||
|
||||
|
||||
+14
-3
@@ -7,7 +7,7 @@
|
||||
DemoNotice::DemoNotice(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle("Welcome to Olive!");
|
||||
setWindowTitle(tr("Welcome to Olive!"));
|
||||
setMaximumWidth(600);
|
||||
|
||||
QVBoxLayout* vlayout = new QVBoxLayout();
|
||||
@@ -17,10 +17,21 @@ DemoNotice::DemoNotice(QWidget *parent) :
|
||||
layout->setMargin(10);
|
||||
layout->setSpacing(20);
|
||||
|
||||
QLabel* icon = new QLabel("<html><head/><body><p><img src=\":/icons/olive-splash.png\"/></p></body></html>");
|
||||
QLabel* icon = new QLabel("<html><head/><body>"
|
||||
"<p><img src=\":/icons/olive-splash.png\"/></p>"
|
||||
"</body></html>");
|
||||
layout->addWidget(icon);
|
||||
|
||||
QLabel* text = new QLabel("<html><head/><body><p><span style=\" font-size:14pt;\">Welcome to Olive!</span></p><p>Olive is a free open-source video editor released under the GNU GPL. If you have paid for this software, you have been scammed.</p><p>This software is currently in ALPHA which means it is unstable and very likely to crash, have bugs, and have missing features. We offer no warranty so use at your own risk. Please report any bugs or feature requests at <a href=\"https://olivevideoeditor.org/\"><span style=\" text-decoration: underline; color:#007af4;\">www.olivevideoeditor.org</span></a></p><p>Thank you for trying Olive and we hope you enjoy it!</p></body></html>");
|
||||
QLabel* text = new QLabel("<html><head/><body><p>"
|
||||
"<span style=\" font-size:14pt;\">"
|
||||
+ tr("Welcome to Olive!")
|
||||
+ "</span></p><p>"
|
||||
+ tr("Olive is a free open-source video editor released under the GNU GPL. If you have paid for this software, you have been scammed.")
|
||||
+ "</p><p>"
|
||||
+ tr("This software is currently in ALPHA which means it is unstable and very likely to crash, have bugs, and have missing features. We offer no warranty so use at your own risk. Please report any bugs or feature requests at %1").arg("<a href=\"https://olivevideoeditor.org/\"><span style=\" text-decoration: underline; color:#007af4;\">www.olivevideoeditor.org</span></a>")
|
||||
+ "</p><p>"
|
||||
+ tr("Thank you for trying Olive and we hope you enjoy it!")
|
||||
+ "</p></body></html>");
|
||||
text->setWordWrap(true);
|
||||
layout->addWidget(text);
|
||||
|
||||
|
||||
+57
-34
@@ -57,7 +57,7 @@ enum ExportFormats {
|
||||
ExportDialog::ExportDialog(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle("Export \"" + sequence->name + "\"");
|
||||
setWindowTitle(tr("Export \"%1\"").arg(sequence->name));
|
||||
setup_ui();
|
||||
|
||||
rangeCombobox->setCurrentIndex(0);
|
||||
@@ -320,7 +320,12 @@ void ExportDialog::format_changed(int index)
|
||||
|
||||
void ExportDialog::render_thread_finished() {
|
||||
if (progressBar->value() < 100 && !cancelled) {
|
||||
QMessageBox::critical(this, "Export Failed", "Export failed - " + export_error, QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Export Failed"),
|
||||
tr("Export failed - %1").arg(export_error),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
}
|
||||
prep_ui_for_render(false);
|
||||
panel_sequence_viewer->viewer_widget->makeCurrent();
|
||||
@@ -337,7 +342,12 @@ void ExportDialog::prep_ui_for_render(bool r) {
|
||||
|
||||
void ExportDialog::export_action() {
|
||||
if (widthSpinbox->value()%2 == 1 || heightSpinbox->value()%2 == 1) {
|
||||
QMessageBox::critical(this, "Invalid dimensions", "Export width and height must both be even numbers/divisible by 2.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Invalid dimensions"),
|
||||
tr("Export width and height must both be even numbers/divisible by 2."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -389,7 +399,12 @@ void ExportDialog::export_action() {
|
||||
break;
|
||||
default:
|
||||
qCritical() << "Invalid codec selection for an image sequence";
|
||||
QMessageBox::critical(this, "Invalid codec", "Couldn't determine output parameters for the selected codec. This is a bug, please contact the developers.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Invalid codec"),
|
||||
tr("Couldn't determine output parameters for the selected codec. This is a bug, please contact the developers."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -454,10 +469,20 @@ void ExportDialog::export_action() {
|
||||
break;
|
||||
default:
|
||||
qCritical() << "Invalid format - this is a bug, please inform the developers";
|
||||
QMessageBox::critical(this, "Invalid format", "Couldn't determine output format. This is a bug, please contact the developers.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Invalid format"),
|
||||
tr("Couldn't determine output format. This is a bug, please contact the developers."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
return;
|
||||
}
|
||||
QString filename = QFileDialog::getSaveFileName(this, "Export Media", "", format_strings[formatCombobox->currentIndex()] + " (*." + ext + ")");
|
||||
QString filename = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Export Media"),
|
||||
"",
|
||||
format_strings[formatCombobox->currentIndex()] + " (*." + ext + ")"
|
||||
);
|
||||
if (!filename.isEmpty()) {
|
||||
if (!filename.endsWith("." + ext, Qt::CaseInsensitive)) {
|
||||
filename += "." + ext;
|
||||
@@ -540,11 +565,11 @@ void ExportDialog::vcodec_changed(int index) {
|
||||
compressionTypeCombobox->clear();
|
||||
if ((format_vcodecs.size() > 0 && format_vcodecs.at(index) == AV_CODEC_ID_H264)) {
|
||||
compressionTypeCombobox->setEnabled(true);
|
||||
compressionTypeCombobox->addItem("Quality-based (Constant Rate Factor)", COMPRESSION_TYPE_CFR);
|
||||
compressionTypeCombobox->addItem(tr("Quality-based (Constant Rate Factor)"), COMPRESSION_TYPE_CFR);
|
||||
// compressionTypeCombobox->addItem("File size-based (Two-Pass)", COMPRESSION_TYPE_TARGETSIZE);
|
||||
// compressionTypeCombobox->addItem("Average bitrate (Two-Pass)", COMPRESSION_TYPE_TARGETBR);
|
||||
} else {
|
||||
compressionTypeCombobox->addItem("Constant Bitrate", COMPRESSION_TYPE_CBR);
|
||||
compressionTypeCombobox->addItem(tr("Constant Bitrate"), COMPRESSION_TYPE_CBR);
|
||||
compressionTypeCombobox->setCurrentIndex(0);
|
||||
compressionTypeCombobox->setEnabled(false);
|
||||
}
|
||||
@@ -557,17 +582,17 @@ void ExportDialog::comp_type_changed(int) {
|
||||
switch (compressionTypeCombobox->currentData().toInt()) {
|
||||
case COMPRESSION_TYPE_CBR:
|
||||
case COMPRESSION_TYPE_TARGETBR:
|
||||
videoBitrateLabel->setText("Bitrate (Mbps):");
|
||||
videoBitrateLabel->setText(tr("Bitrate (Mbps):"));
|
||||
videobitrateSpinbox->setValue(qMax(0.5, (double) qRound((0.01528 * sequence->height) - 4.5)));
|
||||
break;
|
||||
case COMPRESSION_TYPE_CFR:
|
||||
videoBitrateLabel->setText("Quality (CRF):");
|
||||
videoBitrateLabel->setText(tr("Quality (CRF):"));
|
||||
videobitrateSpinbox->setValue(36);
|
||||
videobitrateSpinbox->setMaximum(51);
|
||||
videobitrateSpinbox->setToolTip("Quality Factor:\n\n0 = lossless\n17-18 = visually lossless (compressed, but unnoticeable)\n23 = high quality\n51 = lowest quality possible");
|
||||
videobitrateSpinbox->setToolTip(tr("Quality Factor:\n\n0 = lossless\n17-18 = visually lossless (compressed, but unnoticeable)\n23 = high quality\n51 = lowest quality possible"));
|
||||
break;
|
||||
case COMPRESSION_TYPE_TARGETSIZE:
|
||||
videoBitrateLabel->setText("Target File Size (MB):");
|
||||
videoBitrateLabel->setText(tr("Target File Size (MB):"));
|
||||
videobitrateSpinbox->setValue(100);
|
||||
break;
|
||||
}
|
||||
@@ -576,59 +601,57 @@ void ExportDialog::comp_type_changed(int) {
|
||||
void ExportDialog::setup_ui() {
|
||||
QVBoxLayout* verticalLayout = new QVBoxLayout(this);
|
||||
|
||||
QHBoxLayout* horizontalLayout = new QHBoxLayout();
|
||||
QHBoxLayout* format_layout = new QHBoxLayout();
|
||||
|
||||
horizontalLayout->addWidget(new QLabel("Format:"));
|
||||
format_layout->addWidget(new QLabel(tr("Format:")));
|
||||
|
||||
formatCombobox = new QComboBox(this);
|
||||
|
||||
horizontalLayout->addWidget(formatCombobox);
|
||||
format_layout->addWidget(formatCombobox);
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout);
|
||||
verticalLayout->addLayout(format_layout);
|
||||
|
||||
QHBoxLayout* horizontalLayout_4 = new QHBoxLayout();
|
||||
QHBoxLayout* range_layout = new QHBoxLayout();
|
||||
|
||||
horizontalLayout_4->addWidget(new QLabel("Range:"));
|
||||
range_layout->addWidget(new QLabel(tr("Range:")));
|
||||
|
||||
rangeCombobox = new QComboBox(this);
|
||||
rangeCombobox->addItem("Entire Sequence");
|
||||
rangeCombobox->addItem("In to Out");
|
||||
rangeCombobox->addItem(tr("Entire Sequence"));
|
||||
rangeCombobox->addItem(tr("In to Out"));
|
||||
|
||||
horizontalLayout_4->addWidget(rangeCombobox);
|
||||
range_layout->addWidget(rangeCombobox);
|
||||
|
||||
verticalLayout->addLayout(horizontalLayout_4);
|
||||
verticalLayout->addLayout(range_layout);
|
||||
|
||||
videoGroupbox = new QGroupBox(this);
|
||||
videoGroupbox->setTitle("Video");
|
||||
videoGroupbox->setTitle(tr("Video"));
|
||||
videoGroupbox->setFlat(false);
|
||||
videoGroupbox->setCheckable(true);
|
||||
|
||||
QGridLayout* videoGridLayout = new QGridLayout(videoGroupbox);
|
||||
|
||||
videoGridLayout->addWidget(new QLabel("Codec:"), 0, 0, 1, 1);
|
||||
videoGridLayout->addWidget(new QLabel(tr("Codec:")), 0, 0, 1, 1);
|
||||
vcodecCombobox = new QComboBox(videoGroupbox);
|
||||
videoGridLayout->addWidget(vcodecCombobox, 0, 1, 1, 1);
|
||||
|
||||
videoGridLayout->addWidget(new QLabel("Width:"), 1, 0, 1, 1);
|
||||
videoGridLayout->addWidget(new QLabel(tr("Width:")), 1, 0, 1, 1);
|
||||
widthSpinbox = new QSpinBox(videoGroupbox);
|
||||
widthSpinbox->setMaximum(16777216);
|
||||
videoGridLayout->addWidget(widthSpinbox, 1, 1, 1, 1);
|
||||
|
||||
videoGridLayout->addWidget(new QLabel("Height:"), 2, 0, 1, 1);
|
||||
videoGridLayout->addWidget(new QLabel(tr("Height:")), 2, 0, 1, 1);
|
||||
heightSpinbox = new QSpinBox(videoGroupbox);
|
||||
heightSpinbox->setMaximum(16777216);
|
||||
videoGridLayout->addWidget(heightSpinbox, 2, 1, 1, 1);
|
||||
|
||||
videoGridLayout->addWidget(new QLabel("Frame Rate:"), 3, 0, 1, 1);
|
||||
videoGridLayout->addWidget(new QLabel(tr("Frame Rate:")), 3, 0, 1, 1);
|
||||
framerateSpinbox = new QDoubleSpinBox(videoGroupbox);
|
||||
framerateSpinbox->setMaximum(60);
|
||||
framerateSpinbox->setValue(0);
|
||||
videoGridLayout->addWidget(framerateSpinbox, 3, 1, 1, 1);
|
||||
|
||||
videoGridLayout->addWidget(new QLabel("Compression Type:"), 4, 0, 1, 1);
|
||||
compressionTypeCombobox = new QComboBox(videoGroupbox);
|
||||
compressionTypeCombobox->addItem("Quality-based (Constant Rate Factor)");
|
||||
compressionTypeCombobox->addItem("File size-based (Two-Pass)");
|
||||
videoGridLayout->addWidget(new QLabel(tr("Compression Type:")), 4, 0, 1, 1);
|
||||
compressionTypeCombobox = new QComboBox(videoGroupbox);
|
||||
videoGridLayout->addWidget(compressionTypeCombobox, 4, 1, 1, 1);
|
||||
|
||||
videoBitrateLabel = new QLabel(videoGroupbox);
|
||||
@@ -646,17 +669,17 @@ void ExportDialog::setup_ui() {
|
||||
|
||||
QGridLayout* audioGridLayout = new QGridLayout(audioGroupbox);
|
||||
|
||||
audioGridLayout->addWidget(new QLabel("Codec:"), 0, 0, 1, 1);
|
||||
audioGridLayout->addWidget(new QLabel(tr("Codec:")), 0, 0, 1, 1);
|
||||
acodecCombobox = new QComboBox(audioGroupbox);
|
||||
audioGridLayout->addWidget(acodecCombobox, 0, 1, 1, 1);
|
||||
|
||||
audioGridLayout->addWidget(new QLabel("Sampling Rate:"), 1, 0, 1, 1);
|
||||
audioGridLayout->addWidget(new QLabel(tr("Sampling Rate:")), 1, 0, 1, 1);
|
||||
samplingRateSpinbox = new QSpinBox(audioGroupbox);
|
||||
samplingRateSpinbox->setMaximum(96000);
|
||||
samplingRateSpinbox->setValue(0);
|
||||
audioGridLayout->addWidget(samplingRateSpinbox, 1, 1, 1, 1);
|
||||
|
||||
audioGridLayout->addWidget(new QLabel("Bitrate (Kbps/CBR):"), 3, 0, 1, 1);
|
||||
audioGridLayout->addWidget(new QLabel(tr("Bitrate (Kbps/CBR):")), 3, 0, 1, 1);
|
||||
audiobitrateSpinbox = new QSpinBox(audioGroupbox);
|
||||
audiobitrateSpinbox->setMaximum(320);
|
||||
audiobitrateSpinbox->setValue(256);
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
LoadDialog::LoadDialog(QWidget *parent, bool autorecovery) : QDialog(parent) {
|
||||
setWindowTitle("Loading...");
|
||||
setWindowTitle(tr("Loading..."));
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
||||
layout->addWidget(new QLabel("Loading '" + project_url.mid(project_url.lastIndexOf('/')+1) + "'..."));
|
||||
layout->addWidget(new QLabel(tr("Loading '%1'...").arg(project_url.mid(project_url.lastIndexOf('/')+1))));
|
||||
|
||||
bar = new QProgressBar();
|
||||
bar->setValue(0);
|
||||
layout->addWidget(bar);
|
||||
|
||||
cancel_button = new QPushButton("Cancel");
|
||||
cancel_button = new QPushButton(tr("Cancel"));
|
||||
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(cancel()));
|
||||
|
||||
hboxLayout = new QHBoxLayout();
|
||||
|
||||
@@ -19,7 +19,7 @@ MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||
QDialog(parent),
|
||||
item(i)
|
||||
{
|
||||
setWindowTitle("\"" + i->get_name() + "\" Properties");
|
||||
setWindowTitle(tr("\"%1\" Properties").arg(i->get_name()));
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
QGridLayout* grid = new QGridLayout();
|
||||
@@ -29,13 +29,21 @@ MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||
|
||||
Footage* f = item->to_footage();
|
||||
|
||||
grid->addWidget(new QLabel("Tracks:"), row, 0, 1, 2);
|
||||
grid->addWidget(new QLabel(tr("Tracks:")), row, 0, 1, 2);
|
||||
row++;
|
||||
|
||||
track_list = new QListWidget();
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
const FootageStream& fs = f->video_tracks.at(i);
|
||||
QListWidgetItem* item = new QListWidgetItem("Video " + QString::number(fs.file_index) + ": " + QString::number(fs.video_width) + "x" + QString::number(fs.video_height) + " " + QString::number(fs.video_frame_rate) + "FPS");
|
||||
|
||||
QListWidgetItem* item = new QListWidgetItem(
|
||||
tr("Video %1: %2x%3 %4FPS").arg(
|
||||
QString::number(fs.file_index),
|
||||
QString::number(fs.video_width),
|
||||
QString::number(fs.video_height),
|
||||
QString::number(fs.video_frame_rate)
|
||||
)
|
||||
);
|
||||
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
||||
item->setCheckState(fs.enabled ? Qt::Checked : Qt::Unchecked);
|
||||
item->setData(Qt::UserRole+1, fs.file_index);
|
||||
@@ -43,7 +51,13 @@ MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||
}
|
||||
for (int i=0;i<f->audio_tracks.size();i++) {
|
||||
const FootageStream& fs = f->audio_tracks.at(i);
|
||||
QListWidgetItem* item = new QListWidgetItem("Audio " + QString::number(fs.file_index) + ": " + QString::number(fs.audio_frequency) + "Hz " + QString::number(fs.audio_channels) + " channels");
|
||||
QListWidgetItem* item = new QListWidgetItem(
|
||||
tr("Audio %1: %2Hz %3 channels").arg(
|
||||
QString::number(fs.file_index),
|
||||
QString::number(fs.audio_frequency),
|
||||
QString::number(fs.audio_channels)
|
||||
)
|
||||
);
|
||||
item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
|
||||
item->setCheckState(fs.enabled ? Qt::Checked : Qt::Unchecked);
|
||||
item->setData(Qt::UserRole+1, fs.file_index);
|
||||
@@ -55,7 +69,7 @@ MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||
if (f->video_tracks.size() > 0) {
|
||||
// frame conforming
|
||||
if (!f->video_tracks.at(0).infinite_length) {
|
||||
grid->addWidget(new QLabel("Conform to Frame Rate:"), row, 0);
|
||||
grid->addWidget(new QLabel(tr("Conform to Frame Rate:")), row, 0);
|
||||
conform_fr = new QDoubleSpinBox();
|
||||
conform_fr->setMinimum(0.01);
|
||||
conform_fr->setValue(f->video_tracks.at(0).video_frame_rate * f->speed);
|
||||
@@ -65,22 +79,29 @@ MediaPropertiesDialog::MediaPropertiesDialog(QWidget *parent, Media *i) :
|
||||
row++;
|
||||
|
||||
// deinterlacing mode
|
||||
interlacing_box = new QComboBox();
|
||||
interlacing_box->addItem("Auto (" + get_interlacing_name(f->video_tracks.at(0).video_auto_interlacing) + ")");
|
||||
interlacing_box = new QComboBox();
|
||||
interlacing_box->addItem(
|
||||
tr("Auto (%1)").arg(
|
||||
get_interlacing_name(f->video_tracks.at(0).video_auto_interlacing)
|
||||
)
|
||||
);
|
||||
interlacing_box->addItem(get_interlacing_name(VIDEO_PROGRESSIVE));
|
||||
interlacing_box->addItem(get_interlacing_name(VIDEO_TOP_FIELD_FIRST));
|
||||
interlacing_box->addItem(get_interlacing_name(VIDEO_BOTTOM_FIELD_FIRST));
|
||||
|
||||
interlacing_box->setCurrentIndex((f->video_tracks.at(0).video_auto_interlacing == f->video_tracks.at(0).video_interlacing) ? 0 : f->video_tracks.at(0).video_interlacing + 1);
|
||||
interlacing_box->setCurrentIndex(
|
||||
(f->video_tracks.at(0).video_auto_interlacing == f->video_tracks.at(0).video_interlacing)
|
||||
? 0
|
||||
: f->video_tracks.at(0).video_interlacing + 1);
|
||||
|
||||
grid->addWidget(new QLabel("Interlacing:"), row, 0);
|
||||
grid->addWidget(new QLabel(tr("Interlacing:")), row, 0);
|
||||
grid->addWidget(interlacing_box, row, 1);
|
||||
|
||||
row++;
|
||||
}
|
||||
|
||||
name_box = new QLineEdit(item->get_name());
|
||||
grid->addWidget(new QLabel("Name:"), row, 0);
|
||||
grid->addWidget(new QLabel(tr("Name:")), row, 0);
|
||||
grid->addWidget(name_box, row, 1);
|
||||
row++;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ NewSequenceDialog::NewSequenceDialog(QWidget *parent, Media *existing) :
|
||||
|
||||
if (existing != nullptr) {
|
||||
existing_sequence = existing->to_sequence();
|
||||
setWindowTitle("Editing \"" + existing_sequence->name + "\"");
|
||||
setWindowTitle(tr("Editing \"%1\"").arg(existing_sequence->name));
|
||||
|
||||
width_numeric->setValue(existing_sequence->width);
|
||||
height_numeric->setValue(existing_sequence->height);
|
||||
@@ -42,7 +42,7 @@ NewSequenceDialog::NewSequenceDialog(QWidget *parent, Media *existing) :
|
||||
break;
|
||||
}
|
||||
}
|
||||
sequence_name_edit->setText(existing_sequence->name);
|
||||
sequence_name_edit->setText(existing_sequence->name);
|
||||
for (int i=0;i<audio_frequency_combobox->count();i++) {
|
||||
if (audio_frequency_combobox->itemData(i) == existing_sequence->audio_frequency) {
|
||||
audio_frequency_combobox->setCurrentIndex(i);
|
||||
@@ -51,7 +51,7 @@ NewSequenceDialog::NewSequenceDialog(QWidget *parent, Media *existing) :
|
||||
}
|
||||
} else {
|
||||
existing_sequence = nullptr;
|
||||
setWindowTitle("New Sequence");
|
||||
setWindowTitle(tr("New Sequence"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,14 +59,14 @@ NewSequenceDialog::~NewSequenceDialog()
|
||||
{}
|
||||
|
||||
void NewSequenceDialog::set_sequence_name(const QString& s) {
|
||||
sequence_name_edit->setText(s);
|
||||
sequence_name_edit->setText(s);
|
||||
}
|
||||
|
||||
void NewSequenceDialog::create() {
|
||||
if (existing_sequence == nullptr) {
|
||||
Sequence* s = new Sequence();
|
||||
|
||||
s->name = sequence_name_edit->text();
|
||||
s->name = sequence_name_edit->text();
|
||||
s->width = width_numeric->value();
|
||||
s->height = height_numeric->value();
|
||||
s->frame_rate = frame_rate_combobox->currentData().toDouble();
|
||||
@@ -82,7 +82,7 @@ void NewSequenceDialog::create() {
|
||||
double multiplier = frame_rate_combobox->currentData().toDouble() / existing_sequence->frame_rate;
|
||||
|
||||
EditSequenceCommand* esc = new EditSequenceCommand(existing_item, existing_sequence);
|
||||
esc->name = sequence_name_edit->text();
|
||||
esc->name = sequence_name_edit->text();
|
||||
esc->width = width_numeric->value();
|
||||
esc->height = height_numeric->value();
|
||||
esc->frame_rate = frame_rate_combobox->currentData().toDouble();
|
||||
@@ -154,85 +154,85 @@ void NewSequenceDialog::setup_ui() {
|
||||
|
||||
QWidget* widget = new QWidget(this);
|
||||
|
||||
QHBoxLayout* preset_layout = new QHBoxLayout(widget);
|
||||
preset_layout->setContentsMargins(0, 0, 0, 0);
|
||||
QHBoxLayout* preset_layout = new QHBoxLayout(widget);
|
||||
preset_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
preset_layout->addWidget(new QLabel("Preset:"));
|
||||
preset_layout->addWidget(new QLabel(tr("Preset:")));
|
||||
|
||||
preset_combobox = new QComboBox(widget);
|
||||
|
||||
preset_combobox->addItem("Film 4K");
|
||||
preset_combobox->addItem("TV 4K (Ultra HD/2160p)");
|
||||
preset_combobox->addItem("1080p");
|
||||
preset_combobox->addItem("720p");
|
||||
preset_combobox->addItem("480p");
|
||||
preset_combobox->addItem("360p");
|
||||
preset_combobox->addItem("240p");
|
||||
preset_combobox->addItem("144p");
|
||||
preset_combobox->addItem("NTSC (480i)");
|
||||
preset_combobox->addItem("PAL (576i)");
|
||||
preset_combobox->addItem("Custom");
|
||||
preset_combobox->addItem(tr("Film 4K"));
|
||||
preset_combobox->addItem(tr("TV 4K (Ultra HD/2160p)"));
|
||||
preset_combobox->addItem(tr("1080p"));
|
||||
preset_combobox->addItem(tr("720p"));
|
||||
preset_combobox->addItem(tr("480p"));
|
||||
preset_combobox->addItem(tr("360p"));
|
||||
preset_combobox->addItem(tr("240p"));
|
||||
preset_combobox->addItem(tr("144p"));
|
||||
preset_combobox->addItem(tr("NTSC (480i)"));
|
||||
preset_combobox->addItem(tr("PAL (576i)"));
|
||||
preset_combobox->addItem(tr("Custom"));
|
||||
preset_combobox->setCurrentIndex(2);
|
||||
|
||||
preset_layout->addWidget(preset_combobox);
|
||||
preset_layout->addWidget(preset_combobox);
|
||||
|
||||
verticalLayout->addWidget(widget);
|
||||
|
||||
QGroupBox* videoGroupBox = new QGroupBox(this);
|
||||
videoGroupBox->setTitle("Video");
|
||||
QGroupBox* videoGroupBox = new QGroupBox(this);
|
||||
videoGroupBox->setTitle(tr("Video"));
|
||||
|
||||
QGridLayout* videoLayout = new QGridLayout(videoGroupBox);
|
||||
QGridLayout* videoLayout = new QGridLayout(videoGroupBox);
|
||||
|
||||
videoLayout->addWidget(new QLabel("Width:"), 0, 0, 1, 1);
|
||||
width_numeric = new QSpinBox(videoGroupBox);
|
||||
width_numeric->setMaximum(9999);
|
||||
width_numeric->setValue(1920);
|
||||
videoLayout->addWidget(width_numeric, 0, 2, 1, 2);
|
||||
videoLayout->addWidget(new QLabel(tr("Width:")), 0, 0, 1, 1);
|
||||
width_numeric = new QSpinBox(videoGroupBox);
|
||||
width_numeric->setMaximum(9999);
|
||||
width_numeric->setValue(1920);
|
||||
videoLayout->addWidget(width_numeric, 0, 2, 1, 2);
|
||||
|
||||
videoLayout->addWidget(new QLabel("Height:"), 1, 0, 1, 2);
|
||||
height_numeric = new QSpinBox(videoGroupBox);
|
||||
videoLayout->addWidget(new QLabel(tr("Height:")), 1, 0, 1, 2);
|
||||
height_numeric = new QSpinBox(videoGroupBox);
|
||||
height_numeric->setMaximum(9999);
|
||||
height_numeric->setValue(1080);
|
||||
videoLayout->addWidget(height_numeric, 1, 2, 1, 2);
|
||||
videoLayout->addWidget(height_numeric, 1, 2, 1, 2);
|
||||
|
||||
videoLayout->addWidget(new QLabel("Frame Rate:"), 2, 0, 1, 1);
|
||||
frame_rate_combobox = new QComboBox(videoGroupBox);
|
||||
frame_rate_combobox->addItem("10 FPS", 10.0);
|
||||
frame_rate_combobox->addItem("12.5 FPS", 12.5);
|
||||
frame_rate_combobox->addItem("15 FPS", 15.0);
|
||||
frame_rate_combobox->addItem("23.976 FPS", 23.976);
|
||||
frame_rate_combobox->addItem("24 FPS", 24.0);
|
||||
frame_rate_combobox->addItem("25 FPS", 25.0);
|
||||
frame_rate_combobox->addItem("29.97 FPS", 29.97);
|
||||
frame_rate_combobox->addItem("30 FPS", 30.0);
|
||||
frame_rate_combobox->addItem("50 FPS", 50.0);
|
||||
frame_rate_combobox->addItem("59.94 FPS", 59.94);
|
||||
frame_rate_combobox->addItem("60 FPS", 60.0);
|
||||
frame_rate_combobox->setCurrentIndex(6);
|
||||
videoLayout->addWidget(frame_rate_combobox, 2, 2, 1, 2);
|
||||
videoLayout->addWidget(new QLabel(tr("Frame Rate:")), 2, 0, 1, 1);
|
||||
frame_rate_combobox = new QComboBox(videoGroupBox);
|
||||
frame_rate_combobox->addItem("10 FPS", 10.0);
|
||||
frame_rate_combobox->addItem("12.5 FPS", 12.5);
|
||||
frame_rate_combobox->addItem("15 FPS", 15.0);
|
||||
frame_rate_combobox->addItem("23.976 FPS", 23.976);
|
||||
frame_rate_combobox->addItem("24 FPS", 24.0);
|
||||
frame_rate_combobox->addItem("25 FPS", 25.0);
|
||||
frame_rate_combobox->addItem("29.97 FPS", 29.97);
|
||||
frame_rate_combobox->addItem("30 FPS", 30.0);
|
||||
frame_rate_combobox->addItem("50 FPS", 50.0);
|
||||
frame_rate_combobox->addItem("59.94 FPS", 59.94);
|
||||
frame_rate_combobox->addItem("60 FPS", 60.0);
|
||||
frame_rate_combobox->setCurrentIndex(6);
|
||||
videoLayout->addWidget(frame_rate_combobox, 2, 2, 1, 2);
|
||||
|
||||
videoLayout->addWidget(new QLabel("Pixel Aspect Ratio:"), 4, 0, 1, 1);
|
||||
par_combobox = new QComboBox(videoGroupBox);
|
||||
par_combobox->addItem("Square Pixels (1.0)");
|
||||
videoLayout->addWidget(par_combobox, 4, 2, 1, 2);
|
||||
videoLayout->addWidget(new QLabel(tr("Pixel Aspect Ratio:")), 4, 0, 1, 1);
|
||||
par_combobox = new QComboBox(videoGroupBox);
|
||||
par_combobox->addItem(tr("Square Pixels (1.0)"));
|
||||
videoLayout->addWidget(par_combobox, 4, 2, 1, 2);
|
||||
|
||||
videoLayout->addWidget(new QLabel("Interlacing:"), 6, 0, 1, 1);
|
||||
interlacing_combobox = new QComboBox(videoGroupBox);
|
||||
interlacing_combobox->addItem("None (Progressive)");
|
||||
videoLayout->addWidget(new QLabel(tr("Interlacing:")), 6, 0, 1, 1);
|
||||
interlacing_combobox = new QComboBox(videoGroupBox);
|
||||
interlacing_combobox->addItem(tr("None (Progressive)"));
|
||||
// interlacing_combobox->addItem("Upper Field First");
|
||||
// interlacing_combobox->addItem("Lower Field First");
|
||||
videoLayout->addWidget(interlacing_combobox, 6, 2, 1, 2);
|
||||
videoLayout->addWidget(interlacing_combobox, 6, 2, 1, 2);
|
||||
|
||||
verticalLayout->addWidget(videoGroupBox);
|
||||
verticalLayout->addWidget(videoGroupBox);
|
||||
|
||||
QGroupBox* audioGroupBox = new QGroupBox(this);
|
||||
audioGroupBox->setTitle("Audio");
|
||||
QGroupBox* audioGroupBox = new QGroupBox(this);
|
||||
audioGroupBox->setTitle(tr("Audio"));
|
||||
|
||||
QGridLayout* audioLayout = new QGridLayout(audioGroupBox);
|
||||
QGridLayout* audioLayout = new QGridLayout(audioGroupBox);
|
||||
|
||||
audioLayout->addWidget(new QLabel("Sample Rate: "), 0, 0, 1, 1);
|
||||
audioLayout->addWidget(new QLabel(tr("Sample Rate: ")), 0, 0, 1, 1);
|
||||
|
||||
audio_frequency_combobox = new QComboBox(audioGroupBox);
|
||||
audio_frequency_combobox = new QComboBox(audioGroupBox);
|
||||
audio_frequency_combobox->addItem("22050 Hz", 22050);
|
||||
audio_frequency_combobox->addItem("24000 Hz", 24000);
|
||||
audio_frequency_combobox->addItem("32000 Hz", 32000);
|
||||
@@ -242,21 +242,21 @@ void NewSequenceDialog::setup_ui() {
|
||||
audio_frequency_combobox->addItem("96000 Hz", 96000);
|
||||
audio_frequency_combobox->setCurrentIndex(4);
|
||||
|
||||
audioLayout->addWidget(audio_frequency_combobox, 0, 1, 1, 1);
|
||||
audioLayout->addWidget(audio_frequency_combobox, 0, 1, 1, 1);
|
||||
|
||||
verticalLayout->addWidget(audioGroupBox);
|
||||
verticalLayout->addWidget(audioGroupBox);
|
||||
|
||||
QWidget* nameWidget = new QWidget(this);
|
||||
QHBoxLayout* nameLayout = new QHBoxLayout(nameWidget);
|
||||
nameLayout->setContentsMargins(0, 0, 0, 0);
|
||||
QWidget* nameWidget = new QWidget(this);
|
||||
QHBoxLayout* nameLayout = new QHBoxLayout(nameWidget);
|
||||
nameLayout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
nameLayout->addWidget(new QLabel("Name:"));
|
||||
nameLayout->addWidget(new QLabel("Name:"));
|
||||
|
||||
sequence_name_edit = new QLineEdit(nameWidget);
|
||||
sequence_name_edit = new QLineEdit(nameWidget);
|
||||
|
||||
nameLayout->addWidget(sequence_name_edit);
|
||||
nameLayout->addWidget(sequence_name_edit);
|
||||
|
||||
verticalLayout->addWidget(nameWidget);
|
||||
verticalLayout->addWidget(nameWidget);
|
||||
|
||||
QDialogButtonBox* buttonBox = new QDialogButtonBox(this);
|
||||
buttonBox->setOrientation(Qt::Horizontal);
|
||||
|
||||
@@ -40,13 +40,13 @@ void KeySequenceEditor::reset_to_default() {
|
||||
}
|
||||
|
||||
QString KeySequenceEditor::action_name() {
|
||||
return action->text().replace("&", "");
|
||||
return action->property("id").toString();
|
||||
}
|
||||
|
||||
QString KeySequenceEditor::export_shortcut() {
|
||||
QString ks = keySequence().toString();
|
||||
if (ks != action->property("default")) {
|
||||
return action->text().replace("&", "") + "\t" + keySequence().toString();
|
||||
return action->property("id").toString() + "\t" + keySequence().toString();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ QString KeySequenceEditor::export_shortcut() {
|
||||
PreferencesDialog::PreferencesDialog(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle("Preferences");
|
||||
setWindowTitle(tr("Preferences"));
|
||||
setup_ui();
|
||||
|
||||
accurateSeekButton->setChecked(!config.fast_seeking);
|
||||
@@ -102,20 +102,26 @@ void PreferencesDialog::setup_kbd_shortcuts(QMenuBar* menubar) {
|
||||
}
|
||||
|
||||
for (int i=0;i<key_shortcut_items.size();i++) {
|
||||
KeySequenceEditor* editor = new KeySequenceEditor(keyboard_tree, key_shortcut_actions.at(i));
|
||||
keyboard_tree->setItemWidget(key_shortcut_items.at(i), 1, editor);
|
||||
key_shortcut_fields.append(editor);
|
||||
if (!key_shortcut_actions.at(i)->property("id").isNull()) {
|
||||
KeySequenceEditor* editor = new KeySequenceEditor(keyboard_tree, key_shortcut_actions.at(i));
|
||||
keyboard_tree->setItemWidget(key_shortcut_items.at(i), 1, editor);
|
||||
key_shortcut_fields.append(editor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::save() {
|
||||
if (!custom_css_fn->text().isEmpty() && !QFileInfo::exists(custom_css_fn->text())) {
|
||||
QMessageBox::critical(this, "Invalid CSS File", "CSS file '" + custom_css_fn->text() + "' does not exist.");
|
||||
return;
|
||||
}
|
||||
if (!custom_css_fn->text().isEmpty() && !QFileInfo::exists(custom_css_fn->text())) {
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Invalid CSS File"),
|
||||
tr("CSS file '%1' does not exist.").arg(custom_css_fn->text())
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
config.css_path = custom_css_fn->text();
|
||||
mainWindow->load_css_from_file(config.css_path);
|
||||
config.css_path = custom_css_fn->text();
|
||||
mainWindow->load_css_from_file(config.css_path);
|
||||
config.recording_mode = recordingComboBox->currentIndex() + 1;
|
||||
config.img_seq_formats = imgSeqFormatEdit->text();
|
||||
config.fast_seeking = fastSeekButton->isChecked();
|
||||
@@ -142,7 +148,11 @@ void PreferencesDialog::reset_default_shortcut() {
|
||||
}
|
||||
|
||||
void PreferencesDialog::reset_all_shortcuts() {
|
||||
if (QMessageBox::question(this, "Confirm Reset All Shortcuts", "Are you sure you wish to reset all keyboard shortcuts to their defaults?", QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(
|
||||
this,
|
||||
tr("Confirm Reset All Shortcuts"),
|
||||
tr("Are you sure you wish to reset all keyboard shortcuts to their defaults?"),
|
||||
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
|
||||
for (int i=0;i<key_shortcut_fields.size();i++) {
|
||||
key_shortcut_fields.at(i)->reset_to_default();
|
||||
}
|
||||
@@ -191,7 +201,7 @@ bool PreferencesDialog::refine_shortcut_list(const QString &s, QTreeWidgetItem*
|
||||
}
|
||||
|
||||
void PreferencesDialog::load_shortcut_file() {
|
||||
QString fn = QFileDialog::getOpenFileName(this, "Import Keyboard Shortcuts");
|
||||
QString fn = QFileDialog::getOpenFileName(this, tr("Import Keyboard Shortcuts"));
|
||||
if (!fn.isEmpty()) {
|
||||
QFile f(fn);
|
||||
if (f.exists() && f.open(QFile::ReadOnly)) {
|
||||
@@ -207,20 +217,23 @@ void PreferencesDialog::load_shortcut_file() {
|
||||
ks.append(ba.at(index));
|
||||
index++;
|
||||
}
|
||||
dout << "set" << key_shortcut_fields.at(i)->action_name() << "to" << ks;
|
||||
key_shortcut_fields.at(i)->setKeySequence(ks);
|
||||
} else {
|
||||
key_shortcut_fields.at(i)->reset_to_default();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QMessageBox::critical(this, "Error saving shortcuts", "Failed to open file for reading");
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Error saving shortcuts"),
|
||||
tr("Failed to open file for reading")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::save_shortcut_file() {
|
||||
QString fn = QFileDialog::getSaveFileName(this, "Export Keyboard Shortcuts");
|
||||
QString fn = QFileDialog::getSaveFileName(this, tr("Export Keyboard Shortcuts"));
|
||||
if (!fn.isEmpty()) {
|
||||
QFile f(fn);
|
||||
if (f.open(QFile::WriteOnly)) {
|
||||
@@ -233,19 +246,19 @@ void PreferencesDialog::save_shortcut_file() {
|
||||
start = false;
|
||||
}
|
||||
}
|
||||
QMessageBox::information(this, "Export Shortcuts", "Shortcuts exported successfully");
|
||||
f.close();
|
||||
QMessageBox::information(this, tr("Export Shortcuts"), tr("Shortcuts exported successfully"));
|
||||
} else {
|
||||
QMessageBox::critical(this, "Error saving shortcuts", "Failed to open file for writing");
|
||||
QMessageBox::critical(this, tr("Error saving shortcuts"), tr("Failed to open file for writing"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::browse_css_file() {
|
||||
QString fn = QFileDialog::getOpenFileName(this, "Browse for CSS file");
|
||||
if (!fn.isEmpty()) {
|
||||
custom_css_fn->setText(fn);
|
||||
}
|
||||
QString fn = QFileDialog::getOpenFileName(this, tr("Browse for CSS file"));
|
||||
if (!fn.isEmpty()) {
|
||||
custom_css_fn->setText(fn);
|
||||
}
|
||||
}
|
||||
|
||||
void PreferencesDialog::setup_ui() {
|
||||
@@ -255,120 +268,120 @@ void PreferencesDialog::setup_ui() {
|
||||
QTabWidget* general_tab = new QTabWidget();
|
||||
QGridLayout* general_layout = new QGridLayout(general_tab);
|
||||
|
||||
general_layout->addWidget(new QLabel("Custom CSS:"), 0, 0, 1, 1);
|
||||
general_layout->addWidget(new QLabel(tr("Custom CSS:")), 0, 0, 1, 1);
|
||||
|
||||
custom_css_fn = new QLineEdit(general_tab);
|
||||
custom_css_fn->setText(config.css_path);
|
||||
general_layout->addWidget(custom_css_fn, 0, 1, 1, 1);
|
||||
custom_css_fn = new QLineEdit(general_tab);
|
||||
custom_css_fn->setText(config.css_path);
|
||||
general_layout->addWidget(custom_css_fn, 0, 1, 1, 1);
|
||||
|
||||
QPushButton* custom_css_browse = new QPushButton("Browse", general_tab);
|
||||
connect(custom_css_browse, SIGNAL(clicked(bool)), this, SLOT(browse_css_file()));
|
||||
general_layout->addWidget(custom_css_browse, 0, 2, 1, 1);
|
||||
QPushButton* custom_css_browse = new QPushButton(tr("Browse"), general_tab);
|
||||
connect(custom_css_browse, SIGNAL(clicked(bool)), this, SLOT(browse_css_file()));
|
||||
general_layout->addWidget(custom_css_browse, 0, 2, 1, 1);
|
||||
|
||||
general_layout->addWidget(new QLabel("Image sequence formats:"), 1, 0, 1, 1);
|
||||
general_layout->addWidget(new QLabel(tr("Image sequence formats:")), 1, 0, 1, 1);
|
||||
|
||||
imgSeqFormatEdit = new QLineEdit(general_tab);
|
||||
|
||||
general_layout->addWidget(imgSeqFormatEdit, 1, 1, 1, 2);
|
||||
general_layout->addWidget(imgSeqFormatEdit, 1, 1, 1, 2);
|
||||
|
||||
general_layout->addWidget(new QLabel("Audio Recording:"), 2, 0, 1, 1);
|
||||
general_layout->addWidget(new QLabel(tr("Audio Recording:")), 2, 0, 1, 1);
|
||||
|
||||
recordingComboBox = new QComboBox(general_tab);
|
||||
recordingComboBox->addItem("Mono");
|
||||
recordingComboBox->addItem("Stereo");
|
||||
recordingComboBox->addItem(tr("Mono"));
|
||||
recordingComboBox->addItem(tr("Stereo"));
|
||||
|
||||
general_layout->addWidget(recordingComboBox, 2, 1, 1, 2);
|
||||
general_layout->addWidget(recordingComboBox, 2, 1, 1, 2);
|
||||
|
||||
tabWidget->addTab(general_tab, "General");
|
||||
tabWidget->addTab(general_tab, tr("General"));
|
||||
QWidget* behavior_tab = new QWidget();
|
||||
tabWidget->addTab(behavior_tab, "Behavior");
|
||||
tabWidget->addTab(behavior_tab, tr("Behavior"));
|
||||
|
||||
// Playback
|
||||
QWidget* playback_tab = new QWidget();
|
||||
QVBoxLayout* playback_tab_layout = new QVBoxLayout(playback_tab);
|
||||
|
||||
// Playback -> Disable Multithreading on Images
|
||||
disable_img_multithread = new QCheckBox("Disable Multithreading on Images");
|
||||
disable_img_multithread = new QCheckBox(tr("Disable Multithreading on Images"));
|
||||
disable_img_multithread->setChecked(config.disable_multithreading_for_images);
|
||||
playback_tab_layout->addWidget(disable_img_multithread);
|
||||
|
||||
// Playback -> Seeking
|
||||
QGroupBox* seeking_group = new QGroupBox(playback_tab);
|
||||
seeking_group->setTitle("Seeking");
|
||||
seeking_group->setTitle(tr("Seeking"));
|
||||
QVBoxLayout* seeking_group_layout = new QVBoxLayout(seeking_group);
|
||||
accurateSeekButton = new QRadioButton(seeking_group);
|
||||
accurateSeekButton->setText("Accurate Seeking\nAlways show the correct frame (visual may pause briefly as correct frame is retrieved)");
|
||||
accurateSeekButton->setText(tr("Accurate Seeking\nAlways show the correct frame (visual may pause briefly as correct frame is retrieved)"));
|
||||
seeking_group_layout->addWidget(accurateSeekButton);
|
||||
fastSeekButton = new QRadioButton(seeking_group);
|
||||
fastSeekButton->setText("Fast Seeking\nSeek quickly (may briefly show inaccurate frames when seeking - doesn't affect playback/export)");
|
||||
fastSeekButton->setText(tr("Fast Seeking\nSeek quickly (may briefly show inaccurate frames when seeking - doesn't affect playback/export)"));
|
||||
seeking_group_layout->addWidget(fastSeekButton);
|
||||
playback_tab_layout->addWidget(seeking_group);
|
||||
|
||||
// Playback -> Memory Usage
|
||||
QGroupBox* memory_usage_group = new QGroupBox(playback_tab);
|
||||
memory_usage_group->setTitle("Memory Usage");
|
||||
memory_usage_group->setTitle(tr("Memory Usage"));
|
||||
QGridLayout* memory_usage_layout = new QGridLayout(memory_usage_group);
|
||||
memory_usage_layout->addWidget(new QLabel("Upcoming Frame Queue:"), 0, 0);
|
||||
memory_usage_layout->addWidget(new QLabel(tr("Upcoming Frame Queue:")), 0, 0);
|
||||
upcoming_queue_spinbox = new QDoubleSpinBox();
|
||||
upcoming_queue_spinbox->setValue(config.upcoming_queue_size);
|
||||
memory_usage_layout->addWidget(upcoming_queue_spinbox, 0, 1);
|
||||
upcoming_queue_type = new QComboBox();
|
||||
upcoming_queue_type->addItem("frames");
|
||||
upcoming_queue_type->addItem("seconds");
|
||||
upcoming_queue_type->addItem(tr("frames"));
|
||||
upcoming_queue_type->addItem(tr("seconds"));
|
||||
upcoming_queue_type->setCurrentIndex(config.upcoming_queue_type);
|
||||
memory_usage_layout->addWidget(upcoming_queue_type, 0, 2);
|
||||
memory_usage_layout->addWidget(new QLabel("Previous Frame Queue:"), 1, 0);
|
||||
memory_usage_layout->addWidget(new QLabel(tr("Previous Frame Queue:")), 1, 0);
|
||||
previous_queue_spinbox = new QDoubleSpinBox();
|
||||
previous_queue_spinbox->setValue(config.previous_queue_size);
|
||||
memory_usage_layout->addWidget(previous_queue_spinbox, 1, 1);
|
||||
previous_queue_type = new QComboBox();
|
||||
previous_queue_type->addItem("frames");
|
||||
previous_queue_type->addItem("seconds");
|
||||
previous_queue_type->addItem(tr("frames"));
|
||||
previous_queue_type->addItem(tr("seconds"));
|
||||
previous_queue_type->setCurrentIndex(config.previous_queue_type);
|
||||
memory_usage_layout->addWidget(previous_queue_type, 1, 2);
|
||||
playback_tab_layout->addWidget(memory_usage_group);
|
||||
|
||||
tabWidget->addTab(playback_tab, "Playback");
|
||||
tabWidget->addTab(playback_tab, tr("Playback"));
|
||||
|
||||
QWidget* shortcut_tab = new QWidget();
|
||||
|
||||
QVBoxLayout* shortcut_layout = new QVBoxLayout(shortcut_tab);
|
||||
|
||||
QLineEdit* key_search_line = new QLineEdit();
|
||||
key_search_line->setPlaceholderText("Search for action or shortcut");
|
||||
key_search_line->setPlaceholderText(tr("Search for action or shortcut"));
|
||||
connect(key_search_line, SIGNAL(textChanged(const QString &)), this, SLOT(refine_shortcut_list(const QString &)));
|
||||
|
||||
shortcut_layout->addWidget(key_search_line);
|
||||
|
||||
keyboard_tree = new QTreeWidget();
|
||||
QTreeWidgetItem* tree_header = keyboard_tree->headerItem();
|
||||
tree_header->setText(0, "Action");
|
||||
tree_header->setText(1, "Shortcut");
|
||||
tree_header->setText(0, tr("Action"));
|
||||
tree_header->setText(1, tr("Shortcut"));
|
||||
shortcut_layout->addWidget(keyboard_tree);
|
||||
|
||||
QHBoxLayout* reset_shortcut_layout = new QHBoxLayout();
|
||||
|
||||
QPushButton* import_shortcut_button = new QPushButton("Import");
|
||||
QPushButton* import_shortcut_button = new QPushButton(tr("Import"));
|
||||
reset_shortcut_layout->addWidget(import_shortcut_button);
|
||||
connect(import_shortcut_button, SIGNAL(clicked(bool)), this, SLOT(load_shortcut_file()));
|
||||
|
||||
QPushButton* export_shortcut_button = new QPushButton("Export");
|
||||
QPushButton* export_shortcut_button = new QPushButton(tr("Export"));
|
||||
reset_shortcut_layout->addWidget(export_shortcut_button);
|
||||
connect(export_shortcut_button, SIGNAL(clicked(bool)), this, SLOT(save_shortcut_file()));
|
||||
|
||||
reset_shortcut_layout->addStretch();
|
||||
|
||||
QPushButton* reset_selected_shortcut_button = new QPushButton("Reset Selected");
|
||||
QPushButton* reset_selected_shortcut_button = new QPushButton(tr("Reset Selected"));
|
||||
reset_shortcut_layout->addWidget(reset_selected_shortcut_button);
|
||||
connect(reset_selected_shortcut_button, SIGNAL(clicked(bool)), this, SLOT(reset_default_shortcut()));
|
||||
|
||||
QPushButton* reset_all_shortcut_button = new QPushButton("Reset All");
|
||||
QPushButton* reset_all_shortcut_button = new QPushButton(tr("Reset All"));
|
||||
reset_shortcut_layout->addWidget(reset_all_shortcut_button);
|
||||
connect(reset_all_shortcut_button, SIGNAL(clicked(bool)), this, SLOT(reset_all_shortcuts()));
|
||||
|
||||
shortcut_layout->addLayout(reset_shortcut_layout);
|
||||
|
||||
tabWidget->addTab(shortcut_tab, "Keyboard");
|
||||
tabWidget->addTab(shortcut_tab, tr("Keyboard"));
|
||||
|
||||
verticalLayout->addWidget(tabWidget);
|
||||
|
||||
|
||||
@@ -23,19 +23,19 @@ ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media *old_media
|
||||
QDialog(parent),
|
||||
media(old_media)
|
||||
{
|
||||
setWindowTitle("Replace clips using \"" + old_media->get_name() + "\"");
|
||||
setWindowTitle(tr("Replace clips using \"%1\"").arg(old_media->get_name()));
|
||||
|
||||
resize(300, 400);
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
|
||||
layout->addWidget(new QLabel("Select which media you want to replace this media's clips with:"));
|
||||
layout->addWidget(new QLabel(tr("Select which media you want to replace this media's clips with:")));
|
||||
|
||||
tree = new QTreeView();
|
||||
|
||||
layout->addWidget(tree);
|
||||
|
||||
use_same_media_in_points = new QCheckBox("Keep the same media in-points");
|
||||
use_same_media_in_points = new QCheckBox(tr("Keep the same media in-points"));
|
||||
use_same_media_in_points->setChecked(true);
|
||||
layout->addWidget(use_same_media_in_points);
|
||||
|
||||
@@ -43,11 +43,11 @@ ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media *old_media
|
||||
|
||||
buttons->addStretch();
|
||||
|
||||
QPushButton* replace_button = new QPushButton("Replace");
|
||||
QPushButton* replace_button = new QPushButton(tr("Replace"));
|
||||
connect(replace_button, SIGNAL(clicked(bool)), this, SLOT(replace()));
|
||||
buttons->addWidget(replace_button);
|
||||
|
||||
QPushButton* cancel_button = new QPushButton("Cancel");
|
||||
QPushButton* cancel_button = new QPushButton(tr("Cancel"));
|
||||
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(close()));
|
||||
buttons->addWidget(cancel_button);
|
||||
|
||||
@@ -63,16 +63,36 @@ ReplaceClipMediaDialog::ReplaceClipMediaDialog(QWidget *parent, Media *old_media
|
||||
void ReplaceClipMediaDialog::replace() {
|
||||
QModelIndexList selected_items = tree->selectionModel()->selectedRows();
|
||||
if (selected_items.size() != 1) {
|
||||
QMessageBox::critical(this, "No media selected", "Please select a media to replace with or click 'Cancel'.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("No media selected"),
|
||||
tr("Please select a media to replace with or click 'Cancel'."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
} else {
|
||||
Media* new_item = static_cast<Media*>(selected_items.at(0).internalPointer());
|
||||
if (media == new_item) {
|
||||
QMessageBox::critical(this, "Same media selected", "You selected the same media that you're replacing. Please select a different one or click 'Cancel'.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Same media selected"),
|
||||
tr("You selected the same media that you're replacing. Please select a different one or click 'Cancel'."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
} else if (new_item->get_type() == MEDIA_TYPE_FOLDER) {
|
||||
QMessageBox::critical(this, "Folder selected", "You cannot replace footage with a folder.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Folder selected"),
|
||||
tr("You cannot replace footage with a folder."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
} else {
|
||||
if (new_item->get_type() == MEDIA_TYPE_SEQUENCE && sequence == new_item->to_sequence()) {
|
||||
QMessageBox::critical(this, "Active sequence selected", "You cannot insert a sequence into itself.", QMessageBox::Ok);
|
||||
QMessageBox::critical(
|
||||
this,
|
||||
tr("Active sequence selected"),
|
||||
tr("You cannot insert a sequence into itself."),
|
||||
QMessageBox::Ok
|
||||
);
|
||||
} else {
|
||||
ReplaceClipMediaCommand* rcmc = new ReplaceClipMediaCommand(
|
||||
media,
|
||||
|
||||
@@ -19,25 +19,27 @@
|
||||
#include "project/media.h"
|
||||
|
||||
SpeedDialog::SpeedDialog(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle(tr("Speed/Duration"));
|
||||
|
||||
QVBoxLayout* main_layout = new QVBoxLayout();
|
||||
setLayout(main_layout);
|
||||
|
||||
QGridLayout* grid = new QGridLayout();
|
||||
grid->setSpacing(6);
|
||||
|
||||
grid->addWidget(new QLabel("Speed:"), 0, 0);
|
||||
grid->addWidget(new QLabel(tr("Speed:")), 0, 0);
|
||||
percent = new LabelSlider();
|
||||
percent->decimal_places = 2;
|
||||
percent->set_display_type(LABELSLIDER_PERCENT);
|
||||
percent->set_default_value(1);
|
||||
grid->addWidget(percent, 0, 1);
|
||||
|
||||
grid->addWidget(new QLabel("Frame Rate:"), 1, 0);
|
||||
grid->addWidget(new QLabel(tr("Frame Rate:")), 1, 0);
|
||||
frame_rate = new LabelSlider();
|
||||
frame_rate->decimal_places = 3;
|
||||
grid->addWidget(frame_rate, 1, 1);
|
||||
|
||||
grid->addWidget(new QLabel("Duration:"), 2, 0);
|
||||
grid->addWidget(new QLabel(tr("Duration:")), 2, 0);
|
||||
duration = new LabelSlider();
|
||||
duration->set_display_type(LABELSLIDER_FRAMENUMBER);
|
||||
duration->set_frame_rate(sequence->frame_rate);
|
||||
@@ -45,9 +47,9 @@ SpeedDialog::SpeedDialog(QWidget *parent) : QDialog(parent) {
|
||||
|
||||
main_layout->addLayout(grid);
|
||||
|
||||
reverse = new QCheckBox("Reverse");
|
||||
maintain_pitch = new QCheckBox("Maintain Audio Pitch");
|
||||
ripple = new QCheckBox("Ripple Changes");
|
||||
reverse = new QCheckBox(tr("Reverse"));
|
||||
maintain_pitch = new QCheckBox(tr("Maintain Audio Pitch"));
|
||||
ripple = new QCheckBox(tr("Ripple Changes"));
|
||||
|
||||
main_layout->addWidget(reverse);
|
||||
main_layout->addWidget(maintain_pitch);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
TextEditDialog::TextEditDialog(QWidget *parent, const QString &s) :
|
||||
QDialog(parent)
|
||||
{
|
||||
setWindowTitle("Edit Text");
|
||||
setWindowTitle(tr("Edit Text"));
|
||||
|
||||
QVBoxLayout* layout = new QVBoxLayout();
|
||||
setLayout(layout);
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include <QtMath>
|
||||
|
||||
AudioNoiseEffect::AudioNoiseEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
amount_val = add_row("Amount")->add_field(EFFECT_FIELD_DOUBLE, "amount");
|
||||
amount_val = add_row(tr("Amount"))->add_field(EFFECT_FIELD_DOUBLE, "amount");
|
||||
amount_val->set_double_minimum_value(0);
|
||||
amount_val->set_double_maximum_value(100);
|
||||
amount_val->set_double_default_value(20);
|
||||
|
||||
mix_val = add_row("Mix")->add_field(EFFECT_FIELD_BOOL, "mix");
|
||||
mix_val = add_row(tr("Mix"))->add_field(EFFECT_FIELD_BOOL, "mix");
|
||||
mix_val->set_bool_value(true);
|
||||
|
||||
srand(QDateTime::currentMSecsSinceEpoch());
|
||||
|
||||
@@ -8,23 +8,23 @@ CornerPinEffect::CornerPinEffect(Clip *c, const EffectMeta *em) : Effect(c, em)
|
||||
enable_coords = true;
|
||||
enable_shader = true;
|
||||
|
||||
EffectRow* top_left = add_row("Top Left");
|
||||
EffectRow* top_left = add_row(tr("Top Left"));
|
||||
top_left_x = top_left->add_field(EFFECT_FIELD_DOUBLE, "topleftx");
|
||||
top_left_y = top_left->add_field(EFFECT_FIELD_DOUBLE, "toplefty");
|
||||
|
||||
EffectRow* top_right = add_row("Top Right");
|
||||
EffectRow* top_right = add_row(tr("Top Right"));
|
||||
top_right_x = top_right->add_field(EFFECT_FIELD_DOUBLE, "toprightx");
|
||||
top_right_y = top_right->add_field(EFFECT_FIELD_DOUBLE, "toprighty");
|
||||
|
||||
EffectRow* bottom_left = add_row("Bottom Left");
|
||||
EffectRow* bottom_left = add_row(tr("Bottom Left"));
|
||||
bottom_left_x = bottom_left->add_field(EFFECT_FIELD_DOUBLE, "bottomleftx");
|
||||
bottom_left_y = bottom_left->add_field(EFFECT_FIELD_DOUBLE, "bottomlefty");
|
||||
|
||||
EffectRow* bottom_right = add_row("Bottom Right");
|
||||
EffectRow* bottom_right = add_row(tr("Bottom Right"));
|
||||
bottom_right_x = bottom_right->add_field(EFFECT_FIELD_DOUBLE, "bottomrightx");
|
||||
bottom_right_y = bottom_right->add_field(EFFECT_FIELD_DOUBLE, "bottomrighty");
|
||||
|
||||
perspective = add_row("Perspective")->add_field(EFFECT_FIELD_BOOL, "perspective");
|
||||
perspective = add_row(tr("Perspective"))->add_field(EFFECT_FIELD_BOOL, "perspective");
|
||||
perspective->set_bool_value(true);
|
||||
|
||||
top_left_gizmo = add_gizmo(GIZMO_TYPE_DOT);
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#define FILL_TYPE_RIGHT 1
|
||||
|
||||
FillLeftRightEffect::FillLeftRightEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
EffectRow* type_row = add_row("Type");
|
||||
EffectRow* type_row = add_row(tr("Type"));
|
||||
fill_type = type_row->add_field(EFFECT_FIELD_COMBO, "type");
|
||||
fill_type->add_combo_item("Fill Left with Right", FILL_TYPE_LEFT);
|
||||
fill_type->add_combo_item("Fill Right with Left", FILL_TYPE_RIGHT);
|
||||
fill_type->add_combo_item(tr("Fill Left with Right"), FILL_TYPE_LEFT);
|
||||
fill_type->add_combo_item(tr("Fill Right with Left"), FILL_TYPE_RIGHT);
|
||||
}
|
||||
|
||||
void FillLeftRightEffect::process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "ui/collapsiblewidget.h"
|
||||
|
||||
PanEffect::PanEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
EffectRow* pan_row = add_row("Pan");
|
||||
EffectRow* pan_row = add_row(tr("Pan"));
|
||||
pan_val = pan_row->add_field(EFFECT_FIELD_DOUBLE, "pan");
|
||||
pan_val->set_double_minimum_value(-100);
|
||||
pan_val->set_double_maximum_value(100);
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
ShakeEffect::ShakeEffect(Clip *c, const EffectMeta *em) : Effect(c, em) {
|
||||
enable_coords = true;
|
||||
|
||||
EffectRow* intensity_row = add_row("Intensity");
|
||||
EffectRow* intensity_row = add_row(tr("Intensity"));
|
||||
intensity_val = intensity_row->add_field(EFFECT_FIELD_DOUBLE, "intensity");
|
||||
intensity_val->set_double_minimum_value(0);
|
||||
|
||||
EffectRow* rotation_row = add_row("Rotation");
|
||||
EffectRow* rotation_row = add_row(tr("Rotation"));
|
||||
rotation_val = rotation_row->add_field(EFFECT_FIELD_DOUBLE, "rotation");
|
||||
rotation_val->set_double_minimum_value(0);
|
||||
|
||||
EffectRow* frequency_row = add_row("Frequency");
|
||||
EffectRow* frequency_row = add_row(tr("Frequency"));
|
||||
frequency_val = frequency_row->add_field(EFFECT_FIELD_DOUBLE, "frequency");
|
||||
frequency_val->set_double_minimum_value(0);
|
||||
|
||||
|
||||
@@ -21,20 +21,20 @@
|
||||
SolidEffect::SolidEffect(Clip* c, const EffectMeta* em) : Effect(c, em) {
|
||||
enable_superimpose = true;
|
||||
|
||||
solid_type = add_row("Type")->add_field(EFFECT_FIELD_COMBO, "type");
|
||||
solid_type->add_combo_item("Solid Color", SOLID_TYPE_COLOR);
|
||||
solid_type->add_combo_item("SMPTE Bars", SOLID_TYPE_BARS);
|
||||
solid_type->add_combo_item("Checkerboard", SOLID_TYPE_CHECKERBOARD);
|
||||
solid_type = add_row(tr("Type"))->add_field(EFFECT_FIELD_COMBO, "type");
|
||||
solid_type->add_combo_item(tr("Solid Color"), SOLID_TYPE_COLOR);
|
||||
solid_type->add_combo_item(tr("SMPTE Bars"), SOLID_TYPE_BARS);
|
||||
solid_type->add_combo_item(tr("Checkerboard"), SOLID_TYPE_CHECKERBOARD);
|
||||
|
||||
opacity_field = add_row("Opacity")->add_field(EFFECT_FIELD_DOUBLE, "opacity");
|
||||
opacity_field = add_row(tr("Opacity"))->add_field(EFFECT_FIELD_DOUBLE, "opacity");
|
||||
opacity_field->set_double_minimum_value(0);
|
||||
opacity_field->set_double_maximum_value(100);
|
||||
opacity_field->set_double_default_value(100);
|
||||
|
||||
solid_color_field = add_row("Color")->add_field(EFFECT_FIELD_COLOR, "color");
|
||||
solid_color_field = add_row(tr("Color"))->add_field(EFFECT_FIELD_COLOR, "color");
|
||||
solid_color_field->set_color_value(Qt::red);
|
||||
|
||||
checkerboard_size_field = add_row("Checkerboard Size")->add_field(EFFECT_FIELD_DOUBLE, "checker_size");
|
||||
checkerboard_size_field = add_row(tr("Checkerboard Size"))->add_field(EFFECT_FIELD_DOUBLE, "checker_size");
|
||||
checkerboard_size_field->set_double_minimum_value(1);
|
||||
checkerboard_size_field->set_double_default_value(10);
|
||||
|
||||
|
||||
@@ -29,49 +29,49 @@ TextEffect::TextEffect(Clip *c, const EffectMeta* em) :
|
||||
enable_superimpose = true;
|
||||
//enable_shader = true;
|
||||
|
||||
text_val = add_row("Text")->add_field(EFFECT_FIELD_STRING, "text", 2);
|
||||
text_val = add_row(tr("Text"))->add_field(EFFECT_FIELD_STRING, "text", 2);
|
||||
QTextEdit* text_widget = static_cast<QTextEdit*>(text_val->ui_element);
|
||||
text_widget->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(text_widget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(text_edit_menu()));
|
||||
|
||||
set_font_combobox = add_row("Font")->add_field(EFFECT_FIELD_FONT, "font", 2);
|
||||
set_font_combobox = add_row(tr("Font"))->add_field(EFFECT_FIELD_FONT, "font", 2);
|
||||
|
||||
size_val = add_row("Size")->add_field(EFFECT_FIELD_DOUBLE, "size", 2);
|
||||
size_val = add_row(tr("Size"))->add_field(EFFECT_FIELD_DOUBLE, "size", 2);
|
||||
size_val->set_double_minimum_value(0);
|
||||
|
||||
set_color_button = add_row("Color")->add_field(EFFECT_FIELD_COLOR, "color", 2);
|
||||
set_color_button = add_row(tr("Color"))->add_field(EFFECT_FIELD_COLOR, "color", 2);
|
||||
|
||||
EffectRow* alignment_row = add_row("Alignment");
|
||||
EffectRow* alignment_row = add_row(tr("Alignment"));
|
||||
halign_field = alignment_row->add_field(EFFECT_FIELD_COMBO, "halign");
|
||||
halign_field->add_combo_item("Left", Qt::AlignLeft);
|
||||
halign_field->add_combo_item("Center", Qt::AlignHCenter);
|
||||
halign_field->add_combo_item("Right", Qt::AlignRight);
|
||||
halign_field->add_combo_item("Justify", Qt::AlignJustify);
|
||||
halign_field->add_combo_item(tr("Left"), Qt::AlignLeft);
|
||||
halign_field->add_combo_item(tr("Center"), Qt::AlignHCenter);
|
||||
halign_field->add_combo_item(tr("Right"), Qt::AlignRight);
|
||||
halign_field->add_combo_item(tr("Justify"), Qt::AlignJustify);
|
||||
|
||||
valign_field = alignment_row->add_field(EFFECT_FIELD_COMBO, "valign");
|
||||
valign_field->add_combo_item("Top", Qt::AlignTop);
|
||||
valign_field->add_combo_item("Center", Qt::AlignVCenter);
|
||||
valign_field->add_combo_item("Bottom", Qt::AlignBottom);
|
||||
valign_field->add_combo_item(tr("Top"), Qt::AlignTop);
|
||||
valign_field->add_combo_item(tr("Center"), Qt::AlignVCenter);
|
||||
valign_field->add_combo_item(tr("Bottom"), Qt::AlignBottom);
|
||||
|
||||
word_wrap_field = add_row("Word Wrap")->add_field(EFFECT_FIELD_BOOL, "wordwrap", 2);
|
||||
word_wrap_field = add_row(tr("Word Wrap"))->add_field(EFFECT_FIELD_BOOL, "wordwrap", 2);
|
||||
|
||||
outline_bool = add_row("Outline")->add_field(EFFECT_FIELD_BOOL, "outline", 2);
|
||||
outline_color = add_row("Outline Color")->add_field(EFFECT_FIELD_COLOR, "outlinecolor", 2);
|
||||
outline_width = add_row("Outline Width")->add_field(EFFECT_FIELD_DOUBLE, "outlinewidth", 2);
|
||||
outline_bool = add_row(tr("Outline"))->add_field(EFFECT_FIELD_BOOL, "outline", 2);
|
||||
outline_color = add_row(tr("Outline Color"))->add_field(EFFECT_FIELD_COLOR, "outlinecolor", 2);
|
||||
outline_width = add_row(tr("Outline Width"))->add_field(EFFECT_FIELD_DOUBLE, "outlinewidth", 2);
|
||||
outline_width->set_double_minimum_value(0);
|
||||
|
||||
shadow_bool = add_row("Shadow")->add_field(EFFECT_FIELD_BOOL, "shadow", 2);
|
||||
shadow_color = add_row("Shadow Color")->add_field(EFFECT_FIELD_COLOR, "shadowcolor", 2);
|
||||
shadow_distance = add_row("Shadow Distance")->add_field(EFFECT_FIELD_DOUBLE, "shadowdistance", 2);
|
||||
shadow_bool = add_row(tr("Shadow"))->add_field(EFFECT_FIELD_BOOL, "shadow", 2);
|
||||
shadow_color = add_row(tr("Shadow Color"))->add_field(EFFECT_FIELD_COLOR, "shadowcolor", 2);
|
||||
shadow_distance = add_row(tr("Shadow Distance"))->add_field(EFFECT_FIELD_DOUBLE, "shadowdistance", 2);
|
||||
shadow_distance->set_double_minimum_value(0);
|
||||
shadow_softness = add_row("Shadow Softness")->add_field(EFFECT_FIELD_DOUBLE, "shadowsoftness", 2);
|
||||
shadow_softness = add_row(tr("Shadow Softness"))->add_field(EFFECT_FIELD_DOUBLE, "shadowsoftness", 2);
|
||||
shadow_softness->set_double_minimum_value(0);
|
||||
shadow_opacity = add_row("Shadow Opacity")->add_field(EFFECT_FIELD_DOUBLE, "shadowopacity", 2);
|
||||
shadow_opacity = add_row(tr("Shadow Opacity"))->add_field(EFFECT_FIELD_DOUBLE, "shadowopacity", 2);
|
||||
shadow_opacity->set_double_minimum_value(0);
|
||||
shadow_opacity->set_double_maximum_value(100);
|
||||
|
||||
size_val->set_double_default_value(48);
|
||||
text_val->set_string_value("Sample Text");
|
||||
text_val->set_string_value(tr("Sample Text"));
|
||||
halign_field->set_combo_index(1);
|
||||
valign_field->set_combo_index(1);
|
||||
word_wrap_field->set_bool_value(true);
|
||||
@@ -217,7 +217,7 @@ void TextEffect::shadow_enable(bool e) {
|
||||
void TextEffect::text_edit_menu() {
|
||||
QMenu menu;
|
||||
|
||||
menu.addAction("&Edit Text", this, SLOT(open_text_edit()));
|
||||
menu.addAction(tr("&Edit Text"), this, SLOT(open_text_edit()));
|
||||
|
||||
menu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
@@ -29,33 +29,33 @@ TimecodeEffect::TimecodeEffect(Clip *c, const EffectMeta* em) :
|
||||
enable_always_update = true;
|
||||
enable_superimpose = true;
|
||||
|
||||
EffectRow* tc_row = add_row("Timecode");
|
||||
EffectRow* tc_row = add_row(tr("Timecode"));
|
||||
tc_select = tc_row->add_field(EFFECT_FIELD_COMBO, "tc_selector");
|
||||
tc_select->add_combo_item("Sequence", true);
|
||||
tc_select->add_combo_item("Media", false);
|
||||
tc_select->add_combo_item(tr("Sequence"), true);
|
||||
tc_select->add_combo_item(tr("Media"), false);
|
||||
tc_select->set_combo_index(0);
|
||||
|
||||
scale_val = add_row("Scale")->add_field(EFFECT_FIELD_DOUBLE, "scale", 2);
|
||||
scale_val = add_row(tr("Scale"))->add_field(EFFECT_FIELD_DOUBLE, "scale", 2);
|
||||
scale_val->set_double_minimum_value(1);
|
||||
scale_val->set_double_default_value(100);
|
||||
scale_val->set_double_maximum_value(1000);
|
||||
|
||||
color_val = add_row("Color")->add_field(EFFECT_FIELD_COLOR, "color", 2);
|
||||
color_val = add_row(tr("Color"))->add_field(EFFECT_FIELD_COLOR, "color", 2);
|
||||
color_val->set_color_value(Qt::white);
|
||||
|
||||
color_bg_val = add_row("Background Color")->add_field(EFFECT_FIELD_COLOR, "bgcolor", 2);
|
||||
color_bg_val = add_row(tr("Background Color"))->add_field(EFFECT_FIELD_COLOR, "bgcolor", 2);
|
||||
color_bg_val->set_color_value(Qt::black);
|
||||
|
||||
bg_alpha = add_row("Background Opacity")->add_field(EFFECT_FIELD_DOUBLE, "bgalpha", 2);
|
||||
bg_alpha = add_row(tr("Background Opacity"))->add_field(EFFECT_FIELD_DOUBLE, "bgalpha", 2);
|
||||
bg_alpha->set_double_minimum_value(0);
|
||||
bg_alpha->set_double_maximum_value(100);
|
||||
bg_alpha->set_double_default_value(50);
|
||||
|
||||
EffectRow* offset = add_row("Offset");
|
||||
EffectRow* offset = add_row(tr("Offset"));
|
||||
offset_x_val = offset->add_field(EFFECT_FIELD_DOUBLE, "offsetx");
|
||||
offset_y_val = offset->add_field(EFFECT_FIELD_DOUBLE, "offsety");
|
||||
|
||||
prepend_text = add_row("Prepend")->add_field(EFFECT_FIELD_STRING, "prepend", 2);
|
||||
prepend_text = add_row(tr("Prepend"))->add_field(EFFECT_FIELD_STRING, "prepend", 2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
#include "debug.h"
|
||||
|
||||
ToneEffect::ToneEffect(Clip* c, const EffectMeta *em) : Effect(c, em), sinX(INT_MIN) {
|
||||
type_val = add_row("Type")->add_field(EFFECT_FIELD_COMBO, "type");
|
||||
type_val = add_row(tr("Type"))->add_field(EFFECT_FIELD_COMBO, "type");
|
||||
type_val->add_combo_item("Sine", TONE_TYPE_SINE);
|
||||
|
||||
freq_val = add_row("Frequency")->add_field(EFFECT_FIELD_DOUBLE, "frequency");
|
||||
freq_val = add_row(tr("Frequency"))->add_field(EFFECT_FIELD_DOUBLE, "frequency");
|
||||
freq_val->set_double_minimum_value(20);
|
||||
freq_val->set_double_maximum_value(20000);
|
||||
freq_val->set_double_default_value(1000);
|
||||
|
||||
amount_val = add_row("Amount")->add_field(EFFECT_FIELD_DOUBLE, "amount");
|
||||
amount_val = add_row(tr("Amount"))->add_field(EFFECT_FIELD_DOUBLE, "amount");
|
||||
amount_val->set_double_minimum_value(0);
|
||||
amount_val->set_double_maximum_value(100);
|
||||
amount_val->set_double_default_value(25);
|
||||
|
||||
mix_val = add_row("Mix")->add_field(EFFECT_FIELD_BOOL, "mix");
|
||||
mix_val = add_row(tr("Mix"))->add_field(EFFECT_FIELD_BOOL, "mix");
|
||||
mix_val->set_bool_value(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em) {
|
||||
enable_coords = true;
|
||||
|
||||
EffectRow* position_row = add_row("Position");
|
||||
EffectRow* position_row = add_row(tr("Position"));
|
||||
position_x = position_row->add_field(EFFECT_FIELD_DOUBLE, "posx"); // position X
|
||||
position_y = position_row->add_field(EFFECT_FIELD_DOUBLE, "posy"); // position Y
|
||||
|
||||
EffectRow* scale_row = add_row("Scale");
|
||||
EffectRow* scale_row = add_row(tr("Scale"));
|
||||
scale_x = scale_row->add_field(EFFECT_FIELD_DOUBLE, "scalex"); // scale X (and Y is uniform scale is selected)
|
||||
scale_x->set_double_minimum_value(0);
|
||||
scale_x->set_double_maximum_value(3000);
|
||||
@@ -43,27 +43,27 @@ TransformEffect::TransformEffect(Clip* c, const EffectMeta* em) : Effect(c, em)
|
||||
scale_y->set_double_minimum_value(0);
|
||||
scale_y->set_double_maximum_value(3000);
|
||||
|
||||
EffectRow* uniform_scale_row = add_row("Uniform Scale");
|
||||
EffectRow* uniform_scale_row = add_row(tr("Uniform Scale"));
|
||||
uniform_scale_field = uniform_scale_row->add_field(EFFECT_FIELD_BOOL, "uniformscale"); // uniform scale option
|
||||
|
||||
EffectRow* rotation_row = add_row("Rotation");
|
||||
EffectRow* rotation_row = add_row(tr("Rotation"));
|
||||
rotation = rotation_row->add_field(EFFECT_FIELD_DOUBLE, "rotation");
|
||||
|
||||
EffectRow* anchor_point_row = add_row("Anchor Point");
|
||||
EffectRow* anchor_point_row = add_row(tr("Anchor Point"));
|
||||
anchor_x_box = anchor_point_row->add_field(EFFECT_FIELD_DOUBLE, "anchorx"); // anchor point X
|
||||
anchor_y_box = anchor_point_row->add_field(EFFECT_FIELD_DOUBLE, "anchory"); // anchor point Y
|
||||
|
||||
EffectRow* opacity_row = add_row("Opacity");
|
||||
EffectRow* opacity_row = add_row(tr("Opacity"));
|
||||
opacity = opacity_row->add_field(EFFECT_FIELD_DOUBLE, "opacity"); // opacity
|
||||
opacity->set_double_minimum_value(0);
|
||||
opacity->set_double_maximum_value(100);
|
||||
|
||||
EffectRow* blend_mode_row = add_row("Blend Mode");
|
||||
EffectRow* blend_mode_row = add_row(tr("Blend Mode"));
|
||||
blend_mode_box = blend_mode_row->add_field(EFFECT_FIELD_COMBO, "blendmode"); // blend mode
|
||||
blend_mode_box->add_combo_item("Normal", BLEND_MODE_NORMAL);
|
||||
blend_mode_box->add_combo_item("Overlay", BLEND_MODE_OVERLAY);
|
||||
blend_mode_box->add_combo_item("Screen", BLEND_MODE_SCREEN);
|
||||
blend_mode_box->add_combo_item("Multiply", BLEND_MODE_MULTIPLY);
|
||||
blend_mode_box->add_combo_item(tr("Normal"), BLEND_MODE_NORMAL);
|
||||
blend_mode_box->add_combo_item(tr("Overlay"), BLEND_MODE_OVERLAY);
|
||||
blend_mode_box->add_combo_item(tr("Screen"), BLEND_MODE_SCREEN);
|
||||
blend_mode_box->add_combo_item(tr("Multiply"), BLEND_MODE_MULTIPLY);
|
||||
|
||||
// set up gizmos
|
||||
top_left_gizmo = add_gizmo(GIZMO_TYPE_DOT);
|
||||
|
||||
@@ -11,11 +11,11 @@ VoidEffect::VoidEffect(Clip *c, const QString& n) : Effect(c, nullptr) {
|
||||
name = n;
|
||||
QString display_name;
|
||||
if (n.isEmpty()) {
|
||||
display_name = "(unknown)";
|
||||
display_name = tr("(unknown)");
|
||||
} else {
|
||||
display_name = n;
|
||||
}
|
||||
EffectRow* row = add_row("Missing Effect", false, false);
|
||||
EffectRow* row = add_row(tr("Missing Effect"), false, false);
|
||||
row->add_widget(new QLabel(display_name));
|
||||
container->setText(display_name);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "ui/collapsiblewidget.h"
|
||||
|
||||
VolumeEffect::VolumeEffect(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
EffectRow* volume_row = add_row("Volume");
|
||||
EffectRow* volume_row = add_row(tr("Volume"));
|
||||
volume_val = volume_row->add_field(EFFECT_FIELD_DOUBLE, "volume");
|
||||
volume_val->set_double_minimum_value(0);
|
||||
|
||||
|
||||
@@ -60,15 +60,15 @@ void VSTHostWin::loadPlugin() {
|
||||
if(modulePtr == nullptr) {
|
||||
DWORD dll_err = GetLastError();
|
||||
qCritical() << "Failed to load VST" << dll_fn_w << "-" << dll_err;
|
||||
QString msg_err = "Failed to load VST plugin \"" + dll_fn + "\": " + QString::number(dll_err);
|
||||
QString msg_err = tr("Failed to load VST plugin \"%1\": %2").arg(dll_fn, QString::number(dll_err));
|
||||
if (dll_err == 193) {
|
||||
#ifdef _WIN64
|
||||
msg_err += "\n\nNOTE: You can't load 32-bit VST plugins into a 64-bit build of Olive. Please find a 64-bit version of this plugin or switch to a 32-bit build of Olive.";
|
||||
msg_err += "\n\n" + tr("NOTE: You can't load 32-bit VST plugins into a 64-bit build of Olive. Please find a 64-bit version of this plugin or switch to a 32-bit build of Olive.");
|
||||
#elif _WIN32
|
||||
msg_err += "\n\nNOTE: You can't load 64-bit VST plugins into a 32-bit build of Olive. Please find a 32-bit version of this plugin or switch to a 64-bit build of Olive.";
|
||||
msg_err += "\n\n" + tr("NOTE: You can't load 64-bit VST plugins into a 32-bit build of Olive. Please find a 32-bit version of this plugin or switch to a 64-bit build of Olive.");
|
||||
#endif
|
||||
}
|
||||
QMessageBox::critical(mainWindow, "Error loading VST plugin", msg_err);
|
||||
QMessageBox::critical(mainWindow, tr("Error loading VST plugin"), msg_err);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ bool VSTHostWin::configurePluginCallbacks() {
|
||||
// real VST plugin, or is otherwise corrupt.
|
||||
if(plugin->magic != kEffectMagic) {
|
||||
qCritical() << "Plugin's magic number is bad";
|
||||
QMessageBox::critical(mainWindow, "VST Error", "Plugin's magic number is invalid");
|
||||
QMessageBox::critical(mainWindow, tr("VST Error"), tr("Plugin's magic number is invalid"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -161,18 +161,18 @@ VSTHostWin::VSTHostWin(Clip* c, const EffectMeta *em) : Effect(c, em) {
|
||||
|
||||
initializeIO();
|
||||
|
||||
file_field = add_row("Plugin", true, false)->add_field(EFFECT_FIELD_FILE, "filename", true);
|
||||
file_field = add_row(tr("Plugin"), true, false)->add_field(EFFECT_FIELD_FILE, "filename");
|
||||
connect(file_field, SIGNAL(changed()), this, SLOT(change_plugin()));
|
||||
|
||||
EffectRow* interface_row = add_row("Interface", false, false);
|
||||
show_interface_btn = new QPushButton("Show");
|
||||
EffectRow* interface_row = add_row(tr("Interface"), false, false);
|
||||
show_interface_btn = new QPushButton(tr("Show"));
|
||||
show_interface_btn->setCheckable(true);
|
||||
show_interface_btn->setEnabled(false);
|
||||
connect(show_interface_btn, SIGNAL(toggled(bool)), this, SLOT(show_interface(bool)));
|
||||
interface_row->add_widget(show_interface_btn);
|
||||
|
||||
dialog = new QDialog(mainWindow);
|
||||
dialog->setWindowTitle("VST Plugin");
|
||||
dialog->setWindowTitle(tr("VST Plugin"));
|
||||
dialog->setAttribute(Qt::WA_NativeWindow, true);
|
||||
dialog->setWindowFlags(dialog->windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
|
||||
connect(dialog, SIGNAL(finished(int)), this, SLOT(uncheck_show_button()));
|
||||
|
||||
+22
-19
@@ -49,7 +49,7 @@ bool ExportThread::encode(AVFormatContext* ofmt_ctx, AVCodecContext* codec_ctx,
|
||||
ret = avcodec_send_frame(codec_ctx, frame);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Failed to send frame to encoder." << ret;
|
||||
ed->export_error = "failed to send frame to encoder (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("failed to send frame to encoder (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ bool ExportThread::encode(AVFormatContext* ofmt_ctx, AVCodecContext* codec_ctx,
|
||||
} else if (ret < 0) {
|
||||
if (ret != AVERROR_EOF) {
|
||||
qCritical() << "Failed to receive packet from encoder." << ret;
|
||||
ed->export_error = "failed to receive packet from encoder (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("failed to receive packet from encoder (%1)").arg(QString::number(ret));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ bool ExportThread::setupVideo() {
|
||||
vcodec = avcodec_find_encoder((enum AVCodecID) video_codec);
|
||||
if (!vcodec) {
|
||||
qCritical() << "Could not find video encoder";
|
||||
ed->export_error = "could not video encoder for " + QString::number(video_codec);
|
||||
ed->export_error = tr("could not video encoder for %1").arg(QString::number(video_codec));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ bool ExportThread::setupVideo() {
|
||||
video_stream->id = 0;
|
||||
if (!video_stream) {
|
||||
qCritical() << "Could not allocate video stream";
|
||||
ed->export_error = "could not allocate video stream";
|
||||
ed->export_error = tr("could not allocate video stream");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ bool ExportThread::setupVideo() {
|
||||
vcodec_ctx = avcodec_alloc_context3(vcodec);
|
||||
if (!vcodec_ctx) {
|
||||
qCritical() << "Could not allocate video encoding context";
|
||||
ed->export_error = "could not allocate video encoding context";
|
||||
ed->export_error = tr("could not allocate video encoding context");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -133,10 +133,13 @@ bool ExportThread::setupVideo() {
|
||||
}
|
||||
}
|
||||
|
||||
ret = avcodec_open2(vcodec_ctx, vcodec, nullptr);
|
||||
AVDictionary* opts = nullptr;
|
||||
av_dict_set(&opts, "threads", "auto", 0);
|
||||
|
||||
ret = avcodec_open2(vcodec_ctx, vcodec, &opts);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not open output video encoder." << ret;
|
||||
ed->export_error = "could not open output video encoder (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not open output video encoder (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -144,7 +147,7 @@ bool ExportThread::setupVideo() {
|
||||
ret = avcodec_parameters_from_context(video_stream->codecpar, vcodec_ctx);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not copy video encoder parameters to output stream." << ret;
|
||||
ed->export_error = "could not copy video encoder parameters to output stream (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not copy video encoder parameters to output stream (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -188,7 +191,7 @@ bool ExportThread::setupAudio() {
|
||||
acodec = avcodec_find_encoder(static_cast<AVCodecID>(audio_codec));
|
||||
if (!acodec) {
|
||||
qCritical() << "Could not find audio encoder";
|
||||
ed->export_error = "could not audio encoder for " + QString::number(audio_codec);
|
||||
ed->export_error = tr("could not audio encoder for %1").arg(QString::number(audio_codec));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -197,7 +200,7 @@ bool ExportThread::setupAudio() {
|
||||
audio_stream->id = 1;
|
||||
if (!audio_stream) {
|
||||
qCritical() << "Could not allocate audio stream";
|
||||
ed->export_error = "could not allocate audio stream";
|
||||
ed->export_error = tr("could not allocate audio stream");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -206,7 +209,7 @@ bool ExportThread::setupAudio() {
|
||||
acodec_ctx = avcodec_alloc_context3(acodec);
|
||||
if (!acodec_ctx) {
|
||||
qCritical() << "Could not find allocate audio encoding context";
|
||||
ed->export_error = "could not allocate audio encoding context";
|
||||
ed->export_error = tr("could not allocate audio encoding context");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -231,7 +234,7 @@ bool ExportThread::setupAudio() {
|
||||
ret = avcodec_open2(acodec_ctx, acodec, nullptr);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not open output audio encoder." << ret;
|
||||
ed->export_error = "could not open output audio encoder (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not open output audio encoder (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -239,7 +242,7 @@ bool ExportThread::setupAudio() {
|
||||
ret = avcodec_parameters_from_context(audio_stream->codecpar, acodec_ctx);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not copy audio encoder parameters to output stream." << ret;
|
||||
ed->export_error = "could not copy audio encoder parameters to output stream (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not copy audio encoder parameters to output stream (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -269,7 +272,7 @@ bool ExportThread::setupAudio() {
|
||||
ret = av_frame_get_buffer(audio_frame, 0);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not allocate audio buffer." << ret;
|
||||
ed->export_error = "could not allocate audio buffer (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not allocate audio buffer (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
aframe_bytes = av_samples_get_buffer_size(nullptr, audio_frame->channels, audio_frame->nb_samples, static_cast<AVSampleFormat>(audio_frame->format), 0);
|
||||
@@ -291,7 +294,7 @@ bool ExportThread::setupContainer() {
|
||||
avformat_alloc_output_context2(&fmt_ctx, nullptr, nullptr, c_filename);
|
||||
if (!fmt_ctx) {
|
||||
qCritical() << "Could not create output context";
|
||||
ed->export_error = "could not create output format context";
|
||||
ed->export_error = tr("could not create output format context");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -300,7 +303,7 @@ bool ExportThread::setupContainer() {
|
||||
ret = avio_open(&fmt_ctx->pb, c_filename, AVIO_FLAG_WRITE);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not open output file." << ret;
|
||||
ed->export_error = "could not open output file (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not open output file (%1)").arg(QString::number(ret));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -312,7 +315,7 @@ void ExportThread::run() {
|
||||
|
||||
if (!panel_sequence_viewer->viewer_widget->context()->makeCurrent(&surface)) {
|
||||
qCritical() << "Make current failed";
|
||||
ed->export_error = "could not make OpenGL context current";
|
||||
ed->export_error = tr("could not make OpenGL context current");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -331,7 +334,7 @@ void ExportThread::run() {
|
||||
ret = avformat_write_header(fmt_ctx, nullptr);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not write output file header." << ret;
|
||||
ed->export_error = "could not write output file header (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not write output file header (%1)").arg(QString::number(ret));
|
||||
continueEncode = false;
|
||||
}
|
||||
}
|
||||
@@ -440,7 +443,7 @@ void ExportThread::run() {
|
||||
ret = av_write_trailer(fmt_ctx);
|
||||
if (ret < 0) {
|
||||
qCritical() << "Could not write output file trailer." << ret;
|
||||
ed->export_error = "could not write output file trailer (" + QString::number(ret) + ")";
|
||||
ed->export_error = tr("could not write output file trailer (%1)").arg(QString::number(ret));
|
||||
continueEncode = false;
|
||||
}
|
||||
|
||||
|
||||
+20
-5
@@ -153,7 +153,12 @@ bool LoadThread::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
if (type == LOAD_TYPE_VERSION) {
|
||||
int proj_version = stream.readElementText().toInt();
|
||||
if (proj_version < MIN_SAVE_VERSION && proj_version > SAVE_VERSION) {
|
||||
if (QMessageBox::warning(mainWindow, "Version Mismatch", "This project was saved in a different version of Olive and may not be fully compatible with this version. Would you like to attempt loading it anyway?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) {
|
||||
if (QMessageBox::warning(
|
||||
mainWindow,
|
||||
tr("Version Mismatch"),
|
||||
tr("This project was saved in a different version of Olive and may not be fully compatible with this version. Would you like to attempt loading it anyway?"),
|
||||
QMessageBox::Yes,
|
||||
QMessageBox::No) == QMessageBox::No) {
|
||||
show_err = false;
|
||||
return false;
|
||||
}
|
||||
@@ -439,7 +444,11 @@ bool LoadThread::load_worker(QFile& f, QXmlStreamReader& stream, int type) {
|
||||
if (!found) {
|
||||
correct_clip->linked.removeAt(j);
|
||||
j--;
|
||||
if (QMessageBox::warning(mainWindow, "Invalid Clip Link", "This project contains an invalid clip link. It may be corrupt. Would you like to continue loading it?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::No) {
|
||||
if (QMessageBox::warning(mainWindow,
|
||||
tr("Invalid Clip Link"),
|
||||
tr("This project contains an invalid clip link. It may be corrupt. Would you like to continue loading it?"),
|
||||
QMessageBox::Yes,
|
||||
QMessageBox::No) == QMessageBox::No) {
|
||||
delete s;
|
||||
return false;
|
||||
}
|
||||
@@ -592,7 +601,7 @@ void LoadThread::run() {
|
||||
xml_error = false;
|
||||
if (show_err) emit error();
|
||||
} else if (stream.hasError()) {
|
||||
error_str = stream.errorString() + " - Line: " + QString::number(stream.lineNumber()) + " Col:" + QString::number(stream.columnNumber());
|
||||
error_str = tr("%1 - Line: %2 Col: %3").arg(stream.errorString(), QString::number(stream.lineNumber()), QString::number(stream.columnNumber()));
|
||||
xml_error = true;
|
||||
emit error();
|
||||
cont = false;
|
||||
@@ -632,9 +641,15 @@ void LoadThread::cancel() {
|
||||
void LoadThread::error_func() {
|
||||
if (xml_error) {
|
||||
qCritical() << "Error parsing XML." << error_str;
|
||||
QMessageBox::critical(mainWindow, "XML Parsing Error", "Couldn't load '" + project_url + "'. " + error_str, QMessageBox::Ok);
|
||||
QMessageBox::critical(mainWindow,
|
||||
tr("XML Parsing Error"),
|
||||
tr("Couldn't load '%1'. %2").arg(project_url, error_str),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
QMessageBox::critical(mainWindow, "Project Load Error", "Error loading project: " + error_str, QMessageBox::Ok);
|
||||
QMessageBox::critical(mainWindow,
|
||||
tr("Project Load Error"),
|
||||
tr("Error loading project: %1").arg(error_str),
|
||||
QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -435,14 +435,14 @@ void PreviewGenerator::run() {
|
||||
if(errCode != 0) {
|
||||
char err[1024];
|
||||
av_strerror(errCode, err, 1024);
|
||||
errorStr = "Could not open file - " + QString(err);
|
||||
errorStr = tr("Could not open file - %1").arg(err);
|
||||
error = true;
|
||||
} else {
|
||||
errCode = avformat_find_stream_info(fmt_ctx, nullptr);
|
||||
if (errCode < 0) {
|
||||
char err[1024];
|
||||
av_strerror(errCode, err, 1024);
|
||||
errorStr = "Could not find stream information - " + QString(err);
|
||||
errorStr = tr("Could not find stream information - %1").arg(err);
|
||||
error = true;
|
||||
} else {
|
||||
av_dump_format(fmt_ctx, 0, filename, 0);
|
||||
|
||||
+210
-156
@@ -107,7 +107,7 @@ MainWindow::MainWindow(QWidget *parent, const QString &an) :
|
||||
// set up style?
|
||||
|
||||
qApp->setStyle(QStyleFactory::create("Fusion"));
|
||||
setStyleSheet(DEFAULT_CSS);
|
||||
setStyleSheet(DEFAULT_CSS);
|
||||
|
||||
QPalette darkPalette;
|
||||
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
|
||||
@@ -199,10 +199,10 @@ MainWindow::MainWindow(QWidget *parent, const QString &an) :
|
||||
if (QFileInfo::exists(config_fn)) {
|
||||
config.load(config_fn);
|
||||
|
||||
if (!config.css_path.isEmpty()) {
|
||||
load_css_from_file(config.css_path);
|
||||
}
|
||||
}
|
||||
if (!config.css_path.isEmpty()) {
|
||||
load_css_from_file(config.css_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
alloc_panels(this);
|
||||
@@ -217,7 +217,7 @@ MainWindow::MainWindow(QWidget *parent, const QString &an) :
|
||||
// detect auto-recovery file
|
||||
autorecovery_filename = data_dir + "/autorecovery.ove";
|
||||
if (QFile::exists(autorecovery_filename)) {
|
||||
if (QMessageBox::question(nullptr, "Auto-recovery", "Olive didn't close properly and an autorecovery file was detected. Would you like to open it?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(nullptr, tr("Auto-recovery"), tr("Olive didn't close properly and an autorecovery file was detected. Would you like to open it?"), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
enable_launch_with_project = false;
|
||||
open_project_worker(autorecovery_filename, true);
|
||||
}
|
||||
@@ -244,20 +244,20 @@ void MainWindow::launch_with_project(const QString& s) {
|
||||
}
|
||||
|
||||
void MainWindow::make_new_menu(QMenu *parent) {
|
||||
parent->addAction("&Project", this, SLOT(new_project()), QKeySequence("Ctrl+N"));
|
||||
parent->addAction(tr("&Project"), this, SLOT(new_project()), QKeySequence("Ctrl+N"))->setProperty("id", "newproj");
|
||||
parent->addSeparator();
|
||||
parent->addAction("&Sequence", this, SLOT(new_sequence()), QKeySequence("Ctrl+Shift+N"));
|
||||
parent->addAction("&Folder", this, SLOT(new_folder()));
|
||||
parent->addAction(tr("&Sequence"), this, SLOT(new_sequence()), QKeySequence("Ctrl+Shift+N"))->setProperty("id", "newseq");
|
||||
parent->addAction(tr("&Folder"), this, SLOT(new_folder()))->setProperty("id", "newfolder");
|
||||
}
|
||||
|
||||
void MainWindow::make_inout_menu(QMenu *parent) {
|
||||
parent->addAction("Set In Point", this, SLOT(set_in_point()), QKeySequence("I"));
|
||||
parent->addAction("Set Out Point", this, SLOT(set_out_point()), QKeySequence("O"));
|
||||
parent->addAction("Enable/Disable In/Out Point", this, SLOT(enable_inout()));
|
||||
parent->addAction(tr("Set In Point"), this, SLOT(set_in_point()), QKeySequence("I"))->setProperty("id", "setinpoint");
|
||||
parent->addAction(tr("Set Out Point"), this, SLOT(set_out_point()), QKeySequence("O"))->setProperty("id", "setoutpoint");
|
||||
parent->addAction(tr("Enable/Disable In/Out Point"), this, SLOT(enable_inout()))->setProperty("id", "enableinout");
|
||||
parent->addSeparator();
|
||||
parent->addAction("Reset In Point", this, SLOT(clear_in()));
|
||||
parent->addAction("Reset Out Point", this, SLOT(clear_out()));
|
||||
parent->addAction("Clear In/Out Point", this, SLOT(clear_inout()), QKeySequence("G"));
|
||||
parent->addAction(tr("Reset In Point"), this, SLOT(clear_in()))->setProperty("id", "resetin");
|
||||
parent->addAction(tr("Reset Out Point"), this, SLOT(clear_out()))->setProperty("id", "resetout");
|
||||
parent->addAction(tr("Clear In/Out Point"), this, SLOT(clear_inout()), QKeySequence("G"))->setProperty("id", "clearinout");
|
||||
}
|
||||
|
||||
void kbd_shortcut_processor(QByteArray& file, QMenu* menu, bool save, bool first) {
|
||||
@@ -274,7 +274,7 @@ void kbd_shortcut_processor(QByteArray& file, QMenu* menu, bool save, bool first
|
||||
if (a->shortcut() != defks) {
|
||||
// custom shortcut
|
||||
if (!file.isEmpty()) file.append('\n');
|
||||
file.append(a->text().replace("&", ""));
|
||||
file.append(a->property("id").toString());
|
||||
file.append('\t');
|
||||
file.append(a->shortcut().toString());
|
||||
}
|
||||
@@ -288,18 +288,20 @@ void kbd_shortcut_processor(QByteArray& file, QMenu* menu, bool save, bool first
|
||||
// restore default shortcut
|
||||
a->setShortcut(a->property("default").toString());
|
||||
}
|
||||
QString comp_str = a->text().replace("&", "");
|
||||
int shortcut_index = file.indexOf(comp_str);
|
||||
if (shortcut_index == 0 || (shortcut_index > 0 && file.at(shortcut_index-1) == '\n')) {
|
||||
shortcut_index += comp_str.size() + 1;
|
||||
QString shortcut;
|
||||
while (shortcut_index < file.size() && file.at(shortcut_index) != '\n') {
|
||||
shortcut.append(file.at(shortcut_index));
|
||||
shortcut_index++;
|
||||
}
|
||||
QKeySequence ks(shortcut);
|
||||
if (!ks.isEmpty()) {
|
||||
a->setShortcut(ks);
|
||||
if (!a->property("id").isNull()) {
|
||||
QString comp_str = a->property("id").toString();
|
||||
int shortcut_index = file.indexOf(comp_str);
|
||||
if (shortcut_index == 0 || (shortcut_index > 0 && file.at(shortcut_index-1) == '\n')) {
|
||||
shortcut_index += comp_str.size() + 1;
|
||||
QString shortcut;
|
||||
while (shortcut_index < file.size() && file.at(shortcut_index) != '\n') {
|
||||
shortcut.append(file.at(shortcut_index));
|
||||
shortcut_index++;
|
||||
}
|
||||
QKeySequence ks(shortcut);
|
||||
if (!ks.isEmpty()) {
|
||||
a->setShortcut(ks);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -335,18 +337,18 @@ void MainWindow::save_shortcuts(const QString& fn) {
|
||||
shortcut_file_io.close();
|
||||
} else {
|
||||
qCritical() << "Failed to save shortcut file";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::load_css_from_file(const QString &fn) {
|
||||
QFile css_file(fn);
|
||||
if (css_file.exists() && css_file.open(QFile::ReadOnly)) {
|
||||
setStyleSheet(css_file.readAll());
|
||||
css_file.close();
|
||||
} else {
|
||||
// set default stylesheet
|
||||
setStyleSheet(DEFAULT_CSS);
|
||||
}
|
||||
QFile css_file(fn);
|
||||
if (css_file.exists() && css_file.open(QFile::ReadOnly)) {
|
||||
setStyleSheet(css_file.readAll());
|
||||
css_file.close();
|
||||
} else {
|
||||
// set default stylesheet
|
||||
setStyleSheet(DEFAULT_CSS);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::show_about() {
|
||||
@@ -416,7 +418,7 @@ void MainWindow::zoom_out() {
|
||||
|
||||
void MainWindow::export_dialog() {
|
||||
if (sequence == nullptr) {
|
||||
QMessageBox::information(this, "No active sequence", "Please open the sequence you wish to export.", QMessageBox::Ok);
|
||||
QMessageBox::information(this, tr("No active sequence"), tr("Please open the sequence you wish to export."), QMessageBox::Ok);
|
||||
} else {
|
||||
ExportDialog e(this);
|
||||
e.exec();
|
||||
@@ -506,7 +508,7 @@ void MainWindow::autorecover_interval() {
|
||||
}
|
||||
|
||||
bool MainWindow::save_project_as() {
|
||||
QString fn = QFileDialog::getSaveFileName(this, "Save Project As...", "", OLIVE_FILE_FILTER);
|
||||
QString fn = QFileDialog::getSaveFileName(this, tr("Save Project As..."), "", OLIVE_FILE_FILTER);
|
||||
if (!fn.isEmpty()) {
|
||||
if (!fn.endsWith(".ove", Qt::CaseInsensitive)) {
|
||||
fn += ".ove";
|
||||
@@ -531,8 +533,8 @@ bool MainWindow::can_close_project() {
|
||||
if (isWindowModified()) {
|
||||
QMessageBox* m = new QMessageBox(
|
||||
QMessageBox::Question,
|
||||
"Unsaved Project",
|
||||
"This project has changed since it was last saved. Would you like to save it before closing?",
|
||||
tr("Unsaved Project"),
|
||||
tr("This project has changed since it was last saved. Would you like to save it before closing?"),
|
||||
QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel,
|
||||
this
|
||||
);
|
||||
@@ -553,341 +555,390 @@ void MainWindow::setup_menus() {
|
||||
|
||||
// INITIALIZE FILE MENU
|
||||
|
||||
QMenu* file_menu = menuBar->addMenu("&File");
|
||||
QMenu* file_menu = menuBar->addMenu(tr("&File"));
|
||||
connect(file_menu, SIGNAL(aboutToShow()), this, SLOT(fileMenu_About_To_Be_Shown()));
|
||||
|
||||
QMenu* new_menu = file_menu->addMenu("&New");
|
||||
QMenu* new_menu = file_menu->addMenu(tr("&New"));
|
||||
make_new_menu(new_menu);
|
||||
|
||||
file_menu->addAction("&Open Project", this, SLOT(open_project()), QKeySequence("Ctrl+O"));
|
||||
file_menu->addAction(tr("&Open Project"), this, SLOT(open_project()), QKeySequence("Ctrl+O"))->setProperty("id", "openproj");
|
||||
|
||||
clear_open_recent_action = new QAction("Clear Recent List");
|
||||
clear_open_recent_action = new QAction(tr("Clear Recent List"));
|
||||
clear_open_recent_action->setProperty("id", "clearopenrecent");
|
||||
connect(clear_open_recent_action, SIGNAL(triggered()), panel_project, SLOT(clear_recent_projects()));
|
||||
|
||||
open_recent = file_menu->addMenu("Open Recent");
|
||||
open_recent = file_menu->addMenu(tr("Open Recent"));
|
||||
|
||||
open_recent->addAction(clear_open_recent_action);
|
||||
|
||||
file_menu->addAction("&Save Project", this, SLOT(save_project()), QKeySequence("Ctrl+S"));
|
||||
file_menu->addAction("Save Project &As", this, SLOT(save_project_as()), QKeySequence("Ctrl+Shift+S"));
|
||||
file_menu->addAction(tr("&Save Project"), this, SLOT(save_project()), QKeySequence("Ctrl+S"))->setProperty("id", "saveproj");
|
||||
file_menu->addAction(tr("Save Project &As"), this, SLOT(save_project_as()), QKeySequence("Ctrl+Shift+S"))->setProperty("id", "saveprojas");
|
||||
|
||||
file_menu->addSeparator();
|
||||
|
||||
file_menu->addAction("&Import...", panel_project, SLOT(import_dialog()), QKeySequence("Ctrl+I"));
|
||||
file_menu->addAction(tr("&Import..."), panel_project, SLOT(import_dialog()), QKeySequence("Ctrl+I"))->setProperty("id", "import");
|
||||
|
||||
file_menu->addSeparator();
|
||||
|
||||
file_menu->addAction("&Export...", this, SLOT(export_dialog()), QKeySequence("Ctrl+M"));
|
||||
file_menu->addAction(tr("&Export..."), this, SLOT(export_dialog()), QKeySequence("Ctrl+M"))->setProperty("id", "export");
|
||||
|
||||
file_menu->addSeparator();
|
||||
|
||||
file_menu->addAction("E&xit", this, SLOT(close()));
|
||||
file_menu->addAction(tr("E&xit"), this, SLOT(close()))->setProperty("id", "exit");
|
||||
|
||||
// INITIALIZE EDIT MENU
|
||||
|
||||
QMenu* edit_menu = menuBar->addMenu("&Edit");
|
||||
QMenu* edit_menu = menuBar->addMenu(tr("&Edit"));
|
||||
connect(edit_menu, SIGNAL(aboutToShow()), this, SLOT(editMenu_About_To_Be_Shown()));
|
||||
|
||||
undo_action = edit_menu->addAction("&Undo", this, SLOT(undo()), QKeySequence("Ctrl+Z"));
|
||||
redo_action = edit_menu->addAction("Redo", this, SLOT(redo()), QKeySequence("Ctrl+Shift+Z"));
|
||||
undo_action = edit_menu->addAction(tr("&Undo"), this, SLOT(undo()), QKeySequence("Ctrl+Z"));
|
||||
undo_action->setProperty("id", "undo");
|
||||
redo_action = edit_menu->addAction(tr("Redo"), this, SLOT(redo()), QKeySequence("Ctrl+Shift+Z"));
|
||||
redo_action->setProperty("id", "redo");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
edit_menu->addAction("Cu&t", this, SLOT(cut()), QKeySequence("Ctrl+X"));
|
||||
edit_menu->addAction("Cop&y", this, SLOT(copy()), QKeySequence("Ctrl+C"));
|
||||
edit_menu->addAction("&Paste", this, SLOT(paste()), QKeySequence("Ctrl+V"));
|
||||
edit_menu->addAction("Paste Insert", this, SLOT(paste_insert()), QKeySequence("Ctrl+Shift+V"));
|
||||
edit_menu->addAction("Duplicate", this, SLOT(duplicate()), QKeySequence("Ctrl+D"));
|
||||
edit_menu->addAction("Delete", this, SLOT(delete_slot()), QKeySequence("Del"));
|
||||
edit_menu->addAction("Ripple Delete", this, SLOT(ripple_delete()), QKeySequence("Shift+Del"));
|
||||
edit_menu->addAction("Split", panel_timeline, SLOT(split_at_playhead()), QKeySequence("Ctrl+K"));
|
||||
edit_menu->addAction(tr("Cu&t"), this, SLOT(cut()), QKeySequence("Ctrl+X"))->setProperty("id", "cut");
|
||||
edit_menu->addAction(tr("Cop&y"), this, SLOT(copy()), QKeySequence("Ctrl+C"))->setProperty("id", "copy");
|
||||
edit_menu->addAction(tr("&Paste"), this, SLOT(paste()), QKeySequence("Ctrl+V"))->setProperty("id", "paste");
|
||||
edit_menu->addAction(tr("Paste Insert"), this, SLOT(paste_insert()), QKeySequence("Ctrl+Shift+V"))->setProperty("id", "pasteinsert");
|
||||
edit_menu->addAction(tr("Duplicate"), this, SLOT(duplicate()), QKeySequence("Ctrl+D"))->setProperty("id", "duplicate");
|
||||
edit_menu->addAction(tr("Delete"), this, SLOT(delete_slot()), QKeySequence("Del"))->setProperty("id", "delete");
|
||||
edit_menu->addAction(tr("Ripple Delete"), this, SLOT(ripple_delete()), QKeySequence("Shift+Del"))->setProperty("id", "rippledelete");
|
||||
edit_menu->addAction(tr("Split"), panel_timeline, SLOT(split_at_playhead()), QKeySequence("Ctrl+K"))->setProperty("id", "split");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
edit_menu->addAction("Select &All", this, SLOT(select_all()), QKeySequence("Ctrl+A"));
|
||||
edit_menu->addAction(tr("Select &All"), this, SLOT(select_all()), QKeySequence("Ctrl+A"))->setProperty("id", "selectall");
|
||||
|
||||
edit_menu->addAction("Deselect All", panel_timeline, SLOT(deselect()), QKeySequence("Ctrl+Shift+A"));
|
||||
edit_menu->addAction(tr("Deselect All"), panel_timeline, SLOT(deselect()), QKeySequence("Ctrl+Shift+A"))->setProperty("id", "deselectall");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
edit_menu->addAction("Add Default Transition", this, SLOT(add_default_transition()), QKeySequence("Ctrl+Shift+D"));
|
||||
edit_menu->addAction("Link/Unlink", panel_timeline, SLOT(toggle_links()), QKeySequence("Ctrl+L"));
|
||||
edit_menu->addAction("Enable/Disable", this, SLOT(toggle_enable_clips()), QKeySequence("Shift+E"));
|
||||
edit_menu->addAction("Nest", this, SLOT(nest()));
|
||||
edit_menu->addAction(tr("Add Default Transition"), this, SLOT(add_default_transition()), QKeySequence("Ctrl+Shift+D"))->setProperty("id", "deftransition");
|
||||
edit_menu->addAction(tr("Link/Unlink"), panel_timeline, SLOT(toggle_links()), QKeySequence("Ctrl+L"))->setProperty("id", "linkunlink");
|
||||
edit_menu->addAction(tr("Enable/Disable"), this, SLOT(toggle_enable_clips()), QKeySequence("Shift+E"))->setProperty("id", "enabledisable");
|
||||
edit_menu->addAction(tr("Nest"), this, SLOT(nest()))->setProperty("id", "nest");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
edit_menu->addAction("Ripple to In Point", this, SLOT(ripple_to_in_point()), QKeySequence("Q"));
|
||||
edit_menu->addAction("Ripple to Out Point", this, SLOT(ripple_to_out_point()), QKeySequence("W"));
|
||||
edit_menu->addAction("Edit to In Point", this, SLOT(edit_to_in_point()), QKeySequence("Ctrl+Alt+Q"));
|
||||
edit_menu->addAction("Edit to Out Point", this, SLOT(edit_to_out_point()), QKeySequence("Ctrl+Alt+W"));
|
||||
edit_menu->addAction(tr("Ripple to In Point"), this, SLOT(ripple_to_in_point()), QKeySequence("Q"))->setProperty("id", "rippletoin");
|
||||
edit_menu->addAction(tr("Ripple to Out Point"), this, SLOT(ripple_to_out_point()), QKeySequence("W"))->setProperty("id", "rippletoout");
|
||||
edit_menu->addAction(tr("Edit to In Point"), this, SLOT(edit_to_in_point()), QKeySequence("Ctrl+Alt+Q"))->setProperty("id", "edittoin");
|
||||
edit_menu->addAction(tr("Edit to Out Point"), this, SLOT(edit_to_out_point()), QKeySequence("Ctrl+Alt+W"))->setProperty("id", "edittoout");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
make_inout_menu(edit_menu);
|
||||
edit_menu->addAction("Delete In/Out Point", this, SLOT(delete_inout()), QKeySequence(";"));
|
||||
edit_menu->addAction("Ripple Delete In/Out Point", this, SLOT(ripple_delete_inout()), QKeySequence("'"));
|
||||
edit_menu->addAction(tr("Delete In/Out Point"), this, SLOT(delete_inout()), QKeySequence(";"))->setProperty("id", "deleteinout");
|
||||
edit_menu->addAction(tr("Ripple Delete In/Out Point"), this, SLOT(ripple_delete_inout()), QKeySequence("'"))->setProperty("id", "rippledeleteinout");
|
||||
|
||||
edit_menu->addSeparator();
|
||||
|
||||
edit_menu->addAction("Set/Edit Marker", this, SLOT(set_marker()), QKeySequence("M"));
|
||||
edit_menu->addAction(tr("Set/Edit Marker"), this, SLOT(set_marker()), QKeySequence("M"))->setProperty("id", "marker");
|
||||
|
||||
// INITIALIZE VIEW MENU
|
||||
|
||||
QMenu* view_menu = menuBar->addMenu("&View");
|
||||
QMenu* view_menu = menuBar->addMenu(tr("&View"));
|
||||
connect(view_menu, SIGNAL(aboutToShow()), this, SLOT(viewMenu_About_To_Be_Shown()));
|
||||
|
||||
view_menu->addAction("Zoom In", this, SLOT(zoom_in()), QKeySequence("="));
|
||||
view_menu->addAction("Zoom Out", this, SLOT(zoom_out()), QKeySequence("-"));
|
||||
view_menu->addAction("Increase Track Height", this, SLOT(zoom_in_tracks()), QKeySequence("Ctrl+="));
|
||||
view_menu->addAction("Decrease Track Height", this, SLOT(zoom_out_tracks()), QKeySequence("Ctrl+-"));
|
||||
view_menu->addAction(tr("Zoom In"), this, SLOT(zoom_in()), QKeySequence("="))->setProperty("id", "zoomin");
|
||||
view_menu->addAction(tr("Zoom Out"), this, SLOT(zoom_out()), QKeySequence("-"))->setProperty("id", "zoomout");
|
||||
view_menu->addAction(tr("Increase Track Height"), this, SLOT(zoom_in_tracks()), QKeySequence("Ctrl+="))->setProperty("id", "vzoomin");
|
||||
view_menu->addAction(tr("Decrease Track Height"), this, SLOT(zoom_out_tracks()), QKeySequence("Ctrl+-"))->setProperty("id", "vzoomout");
|
||||
|
||||
show_all = view_menu->addAction("Toggle Show All", panel_timeline, SLOT(toggle_show_all()), QKeySequence("\\"));
|
||||
show_all = view_menu->addAction(tr("Toggle Show All"), panel_timeline, SLOT(toggle_show_all()), QKeySequence("\\"));
|
||||
show_all->setProperty("id", "showall");
|
||||
show_all->setCheckable(true);
|
||||
|
||||
view_menu->addSeparator();
|
||||
|
||||
track_lines = view_menu->addAction("Track Lines", this, SLOT(toggle_bool_action()));
|
||||
track_lines = view_menu->addAction(tr("Track Lines"), this, SLOT(toggle_bool_action()));
|
||||
track_lines->setProperty("id", "tracklines");
|
||||
track_lines->setCheckable(true);
|
||||
track_lines->setData(reinterpret_cast<quintptr>(&config.show_track_lines));
|
||||
|
||||
rectified_waveforms = view_menu->addAction("Rectified Waveforms", this, SLOT(toggle_bool_action()));
|
||||
rectified_waveforms = view_menu->addAction(tr("Rectified Waveforms"), this, SLOT(toggle_bool_action()));
|
||||
rectified_waveforms->setProperty("id", "rectifiedwaveforms");
|
||||
rectified_waveforms->setCheckable(true);
|
||||
rectified_waveforms->setData(reinterpret_cast<quintptr>(&config.rectified_waveforms));
|
||||
|
||||
view_menu->addSeparator();
|
||||
|
||||
frames_action = view_menu->addAction("Frames", this, SLOT(set_timecode_view()));
|
||||
frames_action = view_menu->addAction(tr("Frames"), this, SLOT(set_timecode_view()));
|
||||
frames_action->setProperty("id", "modeframes");
|
||||
frames_action->setData(TIMECODE_FRAMES);
|
||||
frames_action->setCheckable(true);
|
||||
drop_frame_action = view_menu->addAction("Drop Frame", this, SLOT(set_timecode_view()));
|
||||
drop_frame_action = view_menu->addAction(tr("Drop Frame"), this, SLOT(set_timecode_view()));
|
||||
drop_frame_action->setProperty("id", "modedropframe");
|
||||
drop_frame_action->setData(TIMECODE_DROP);
|
||||
drop_frame_action->setCheckable(true);
|
||||
nondrop_frame_action = view_menu->addAction("Non-Drop Frame", this, SLOT(set_timecode_view()));
|
||||
nondrop_frame_action = view_menu->addAction(tr("Non-Drop Frame"), this, SLOT(set_timecode_view()));
|
||||
nondrop_frame_action->setProperty("id", "modenondropframe");
|
||||
nondrop_frame_action->setData(TIMECODE_NONDROP);
|
||||
nondrop_frame_action->setCheckable(true);
|
||||
milliseconds_action = view_menu->addAction("Milliseconds", this, SLOT(set_timecode_view()));
|
||||
milliseconds_action = view_menu->addAction(tr("Milliseconds"), this, SLOT(set_timecode_view()));
|
||||
milliseconds_action->setProperty("id", "milliseconds");
|
||||
milliseconds_action->setData(TIMECODE_MILLISECONDS);
|
||||
milliseconds_action->setCheckable(true);
|
||||
|
||||
view_menu->addSeparator();
|
||||
|
||||
QMenu* title_safe_area_menu = view_menu->addMenu("Title/Action Safe Area");
|
||||
QMenu* title_safe_area_menu = view_menu->addMenu(tr("Title/Action Safe Area"));
|
||||
|
||||
title_safe_off = title_safe_area_menu->addAction("Off");
|
||||
title_safe_off = title_safe_area_menu->addAction(tr("Off"));
|
||||
title_safe_off->setProperty("id", "titlesafeoff");
|
||||
title_safe_off->setCheckable(true);
|
||||
connect(title_safe_off, SIGNAL(triggered(bool)), this, SLOT(set_tsa_disable()));
|
||||
|
||||
title_safe_default = title_safe_area_menu->addAction("Default");
|
||||
title_safe_default = title_safe_area_menu->addAction(tr("Default"));
|
||||
title_safe_default->setProperty("id", "titlesafedefault");
|
||||
title_safe_default->setCheckable(true);
|
||||
connect(title_safe_default, SIGNAL(triggered(bool)), this, SLOT(set_tsa_default()));
|
||||
|
||||
title_safe_43 = title_safe_area_menu->addAction("4:3");
|
||||
title_safe_43 = title_safe_area_menu->addAction(tr("4:3"));
|
||||
title_safe_43->setProperty("id", "titlesafe43");
|
||||
title_safe_43->setCheckable(true);
|
||||
connect(title_safe_43, SIGNAL(triggered(bool)), this, SLOT(set_tsa_43()));
|
||||
|
||||
title_safe_169 = title_safe_area_menu->addAction("16:9");
|
||||
title_safe_169 = title_safe_area_menu->addAction(tr("16:9"));
|
||||
title_safe_169->setProperty("id", "titlesafe169");
|
||||
title_safe_169->setCheckable(true);
|
||||
connect(title_safe_169, SIGNAL(triggered(bool)), this, SLOT(set_tsa_169()));
|
||||
|
||||
title_safe_custom = title_safe_area_menu->addAction("Custom");
|
||||
title_safe_custom = title_safe_area_menu->addAction(tr("Custom"));
|
||||
title_safe_custom->setProperty("id", "titlesafecustom");
|
||||
title_safe_custom->setCheckable(true);
|
||||
connect(title_safe_custom, SIGNAL(triggered(bool)), this, SLOT(set_tsa_custom()));
|
||||
|
||||
view_menu->addSeparator();
|
||||
|
||||
full_screen = view_menu->addAction("Full Screen", this, SLOT(toggle_full_screen()), QKeySequence("F11"));
|
||||
full_screen = view_menu->addAction(tr("Full Screen"), this, SLOT(toggle_full_screen()), QKeySequence("F11"));
|
||||
full_screen->setProperty("id", "fullscreen");
|
||||
full_screen->setCheckable(true);
|
||||
|
||||
// INITIALIZE PLAYBACK MENU
|
||||
|
||||
QMenu* playback_menu = menuBar->addMenu("&Playback");
|
||||
QMenu* playback_menu = menuBar->addMenu(tr("&Playback"));
|
||||
|
||||
playback_menu->addAction("Go to Start", this, SLOT(go_to_start()), QKeySequence("Home"));
|
||||
playback_menu->addAction("Previous Frame", this, SLOT(prev_frame()), QKeySequence("Left"));
|
||||
playback_menu->addAction("Play/Pause", this, SLOT(playpause()), QKeySequence("Space"));
|
||||
playback_menu->addAction("Next Frame", this, SLOT(next_frame()), QKeySequence("Right"));
|
||||
playback_menu->addAction("Go to End", this, SLOT(go_to_end()), QKeySequence("End"));
|
||||
playback_menu->addAction(tr("Go to Start"), this, SLOT(go_to_start()), QKeySequence("Home"))->setProperty("id", "gotostart");
|
||||
playback_menu->addAction(tr("Previous Frame"), this, SLOT(prev_frame()), QKeySequence("Left"))->setProperty("id", "prevframe");
|
||||
playback_menu->addAction(tr("Play/Pause"), this, SLOT(playpause()), QKeySequence("Space"))->setProperty("id", "playpause");
|
||||
playback_menu->addAction(tr("Next Frame"), this, SLOT(next_frame()), QKeySequence("Right"))->setProperty("id", "nextframe");
|
||||
playback_menu->addAction(tr("Go to End"), this, SLOT(go_to_end()), QKeySequence("End"))->setProperty("id", "gotoend");
|
||||
playback_menu->addSeparator();
|
||||
playback_menu->addAction("Go to Previous Cut", this, SLOT(prev_cut()), QKeySequence("Up"));
|
||||
playback_menu->addAction("Go to Next Cut", this, SLOT(next_cut()), QKeySequence("Down"));
|
||||
playback_menu->addAction(tr("Go to Previous Cut"), this, SLOT(prev_cut()), QKeySequence("Up"))->setProperty("id", "prevcut");
|
||||
playback_menu->addAction(tr("Go to Next Cut"), this, SLOT(next_cut()), QKeySequence("Down"))->setProperty("id", "nextcut");
|
||||
playback_menu->addSeparator();
|
||||
playback_menu->addAction("Go to In Point", this, SLOT(go_to_in()), QKeySequence("Shift+I"));
|
||||
playback_menu->addAction("Go to Out Point", this, SLOT(go_to_out()), QKeySequence("Shift+O"));
|
||||
playback_menu->addAction(tr("Go to In Point"), this, SLOT(go_to_in()), QKeySequence("Shift+I"))->setProperty("id", "gotoin");
|
||||
playback_menu->addAction(tr("Go to Out Point"), this, SLOT(go_to_out()), QKeySequence("Shift+O"))->setProperty("id", "gotoout");
|
||||
|
||||
// INITIALIZE WINDOW MENU
|
||||
|
||||
window_menu = menuBar->addMenu("&Window");
|
||||
window_menu = menuBar->addMenu(tr("&Window"));
|
||||
connect(window_menu, SIGNAL(aboutToShow()), this, SLOT(windowMenu_About_To_Be_Shown()));
|
||||
|
||||
QAction* window_project_action = window_menu->addAction("Project", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_project_action = window_menu->addAction(tr("Project"), this, SLOT(toggle_panel_visibility()));
|
||||
window_project_action->setProperty("id", "panelproject");
|
||||
window_project_action->setCheckable(true);
|
||||
window_project_action->setData(reinterpret_cast<quintptr>(panel_project));
|
||||
|
||||
QAction* window_effectcontrols_action = window_menu->addAction("Effect Controls", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_effectcontrols_action = window_menu->addAction(tr("Effect Controls"), this, SLOT(toggle_panel_visibility()));
|
||||
window_effectcontrols_action->setProperty("id", "paneleffectcontrols");
|
||||
window_effectcontrols_action->setCheckable(true);
|
||||
window_effectcontrols_action->setData(reinterpret_cast<quintptr>(panel_effect_controls));
|
||||
|
||||
QAction* window_timeline_action = window_menu->addAction("Timeline", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_timeline_action = window_menu->addAction(tr("Timeline"), this, SLOT(toggle_panel_visibility()));
|
||||
window_timeline_action->setProperty("id", "paneltimeline");
|
||||
window_timeline_action->setCheckable(true);
|
||||
window_timeline_action->setData(reinterpret_cast<quintptr>(panel_timeline));
|
||||
|
||||
QAction* window_graph_editor_action = window_menu->addAction("Graph Editor", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_graph_editor_action = window_menu->addAction(tr("Graph Editor"), this, SLOT(toggle_panel_visibility()));
|
||||
window_graph_editor_action->setProperty("id", "panelgrapheditor");
|
||||
window_graph_editor_action->setCheckable(true);
|
||||
window_graph_editor_action->setData(reinterpret_cast<quintptr>(panel_graph_editor));
|
||||
|
||||
QAction* window_footageviewer_action = window_menu->addAction("Footage Viewer", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_footageviewer_action = window_menu->addAction(tr("Footage Viewer"), this, SLOT(toggle_panel_visibility()));
|
||||
window_footageviewer_action->setProperty("id", "panelfootageviewer");
|
||||
window_footageviewer_action->setCheckable(true);
|
||||
window_footageviewer_action->setData(reinterpret_cast<quintptr>(panel_footage_viewer));
|
||||
|
||||
QAction* window_sequenceviewer_action = window_menu->addAction("Sequence Viewer", this, SLOT(toggle_panel_visibility()));
|
||||
QAction* window_sequenceviewer_action = window_menu->addAction(tr("Sequence Viewer"), this, SLOT(toggle_panel_visibility()));
|
||||
window_sequenceviewer_action->setProperty("id", "panelsequenceviewer");
|
||||
window_sequenceviewer_action->setCheckable(true);
|
||||
window_sequenceviewer_action->setData(reinterpret_cast<quintptr>(panel_sequence_viewer));
|
||||
|
||||
window_menu->addSeparator();
|
||||
|
||||
window_menu->addAction("Reset to Default Layout", this, SLOT(reset_layout()));
|
||||
window_menu->addAction(tr("Reset to Default Layout"), this, SLOT(reset_layout()))->setProperty("id", "resetdefaultlayout");
|
||||
|
||||
// INITIALIZE TOOLS MENU
|
||||
|
||||
QMenu* tools_menu = menuBar->addMenu("&Tools");
|
||||
QMenu* tools_menu = menuBar->addMenu(tr("&Tools"));
|
||||
connect(tools_menu, SIGNAL(aboutToShow()), this, SLOT(toolMenu_About_To_Be_Shown()));
|
||||
|
||||
pointer_tool_action = tools_menu->addAction("Pointer Tool", this, SLOT(menu_click_button()), QKeySequence("V"));
|
||||
pointer_tool_action = tools_menu->addAction(tr("Pointer Tool"), this, SLOT(menu_click_button()), QKeySequence("V"));
|
||||
pointer_tool_action->setProperty("id", "pointertool");
|
||||
pointer_tool_action->setCheckable(true);
|
||||
pointer_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolArrowButton));
|
||||
|
||||
edit_tool_action = tools_menu->addAction("Edit Tool", this, SLOT(menu_click_button()), QKeySequence("X"));
|
||||
edit_tool_action = tools_menu->addAction(tr("Edit Tool"), this, SLOT(menu_click_button()), QKeySequence("X"));
|
||||
edit_tool_action->setProperty("id", "edittool");
|
||||
edit_tool_action->setCheckable(true);
|
||||
edit_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolEditButton));
|
||||
|
||||
ripple_tool_action = tools_menu->addAction("Ripple Tool", this, SLOT(menu_click_button()), QKeySequence("B"));
|
||||
ripple_tool_action = tools_menu->addAction(tr("Ripple Tool"), this, SLOT(menu_click_button()), QKeySequence("B"));
|
||||
ripple_tool_action->setProperty("id", "rippletool");
|
||||
ripple_tool_action->setCheckable(true);
|
||||
ripple_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolRippleButton));
|
||||
|
||||
razor_tool_action = tools_menu->addAction("Razor Tool", this, SLOT(menu_click_button()), QKeySequence("C"));
|
||||
razor_tool_action = tools_menu->addAction(tr("Razor Tool"), this, SLOT(menu_click_button()), QKeySequence("C"));
|
||||
razor_tool_action->setProperty("id", "razortool");
|
||||
razor_tool_action->setCheckable(true);
|
||||
razor_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolRazorButton));
|
||||
|
||||
slip_tool_action = tools_menu->addAction("Slip Tool", this, SLOT(menu_click_button()), QKeySequence("Y"));
|
||||
slip_tool_action = tools_menu->addAction(tr("Slip Tool"), this, SLOT(menu_click_button()), QKeySequence("Y"));
|
||||
slip_tool_action->setProperty("id", "sliptool");
|
||||
slip_tool_action->setCheckable(true);
|
||||
slip_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolSlipButton));
|
||||
|
||||
slide_tool_action = tools_menu->addAction("Slide Tool", this, SLOT(menu_click_button()), QKeySequence("U"));
|
||||
slide_tool_action = tools_menu->addAction(tr("Slide Tool"), this, SLOT(menu_click_button()), QKeySequence("U"));
|
||||
slide_tool_action->setProperty("id", "slidetool");
|
||||
slide_tool_action->setCheckable(true);
|
||||
slide_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolSlideButton));
|
||||
|
||||
hand_tool_action = tools_menu->addAction("Hand Tool", this, SLOT(menu_click_button()), QKeySequence("H"));
|
||||
hand_tool_action = tools_menu->addAction(tr("Hand Tool"), this, SLOT(menu_click_button()), QKeySequence("H"));
|
||||
hand_tool_action->setProperty("id", "handtool");
|
||||
hand_tool_action->setCheckable(true);
|
||||
hand_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolHandButton));
|
||||
|
||||
transition_tool_action = tools_menu->addAction("Transition Tool", this, SLOT(menu_click_button()), QKeySequence("T"));
|
||||
transition_tool_action = tools_menu->addAction(tr("Transition Tool"), this, SLOT(menu_click_button()), QKeySequence("T"));
|
||||
transition_tool_action->setProperty("id", "transitiontool");
|
||||
transition_tool_action->setCheckable(true);
|
||||
transition_tool_action->setData(reinterpret_cast<quintptr>(panel_timeline->toolTransitionButton));
|
||||
|
||||
tools_menu->addSeparator();
|
||||
|
||||
snap_toggle = tools_menu->addAction("Enable Snapping", this, SLOT(menu_click_button()), QKeySequence("S"));
|
||||
snap_toggle = tools_menu->addAction(tr("Enable Snapping"), this, SLOT(menu_click_button()), QKeySequence("S"));
|
||||
snap_toggle->setProperty("id", "snapping");
|
||||
snap_toggle->setCheckable(true);
|
||||
snap_toggle->setData(reinterpret_cast<quintptr>(panel_timeline->snappingButton));
|
||||
|
||||
tools_menu->addSeparator();
|
||||
|
||||
selecting_also_seeks = tools_menu->addAction("Selecting Also Seeks", this, SLOT(toggle_bool_action()));
|
||||
selecting_also_seeks = tools_menu->addAction(tr("Selecting Also Seeks"), this, SLOT(toggle_bool_action()));
|
||||
selecting_also_seeks->setProperty("id", "selectingalsoseeks");
|
||||
selecting_also_seeks->setCheckable(true);
|
||||
selecting_also_seeks->setData(reinterpret_cast<quintptr>(&config.select_also_seeks));
|
||||
|
||||
edit_tool_also_seeks = tools_menu->addAction("Edit Tool Also Seeks", this, SLOT(toggle_bool_action()));
|
||||
edit_tool_also_seeks = tools_menu->addAction(tr("Edit Tool Also Seeks"), this, SLOT(toggle_bool_action()));
|
||||
edit_tool_also_seeks->setProperty("id", "editalsoseeks");
|
||||
edit_tool_also_seeks->setCheckable(true);
|
||||
edit_tool_also_seeks->setData(reinterpret_cast<quintptr>(&config.edit_tool_also_seeks));
|
||||
|
||||
edit_tool_selects_links = tools_menu->addAction("Edit Tool Selects Links", this, SLOT(toggle_bool_action()));
|
||||
edit_tool_selects_links = tools_menu->addAction(tr("Edit Tool Selects Links"), this, SLOT(toggle_bool_action()));
|
||||
edit_tool_selects_links->setProperty("id", "editselectslinks");
|
||||
edit_tool_selects_links->setCheckable(true);
|
||||
edit_tool_selects_links->setData(reinterpret_cast<quintptr>(&config.edit_tool_selects_links));
|
||||
|
||||
seek_also_selects = tools_menu->addAction("Seek Also Selects", this, SLOT(toggle_bool_action()));
|
||||
seek_also_selects = tools_menu->addAction(tr("Seek Also Selects"), this, SLOT(toggle_bool_action()));
|
||||
seek_also_selects->setProperty("id", "seekalsoselects");
|
||||
seek_also_selects->setCheckable(true);
|
||||
seek_also_selects->setData(reinterpret_cast<quintptr>(&config.seek_also_selects));
|
||||
|
||||
seek_to_end_of_pastes = tools_menu->addAction("Seek to the End of Pastes", this, SLOT(toggle_bool_action()));
|
||||
seek_to_end_of_pastes = tools_menu->addAction(tr("Seek to the End of Pastes"), this, SLOT(toggle_bool_action()));
|
||||
seek_to_end_of_pastes->setProperty("id", "seektoendofpastes");
|
||||
seek_to_end_of_pastes->setCheckable(true);
|
||||
seek_to_end_of_pastes->setData(reinterpret_cast<quintptr>(&config.paste_seeks));
|
||||
|
||||
scroll_wheel_zooms = tools_menu->addAction("Scroll Wheel Zooms", this, SLOT(toggle_bool_action()));
|
||||
scroll_wheel_zooms = tools_menu->addAction(tr("Scroll Wheel Zooms"), this, SLOT(toggle_bool_action()));
|
||||
scroll_wheel_zooms->setProperty("id", "scrollwheelzooms");
|
||||
scroll_wheel_zooms->setCheckable(true);
|
||||
scroll_wheel_zooms->setData(reinterpret_cast<quintptr>(&config.scroll_zooms));
|
||||
|
||||
enable_drag_files_to_timeline = tools_menu->addAction("Enable Drag Files to Timeline", this, SLOT(toggle_bool_action()));
|
||||
enable_drag_files_to_timeline = tools_menu->addAction(tr("Enable Drag Files to Timeline"), this, SLOT(toggle_bool_action()));
|
||||
enable_drag_files_to_timeline->setProperty("id", "enabledragfilestotimeline");
|
||||
enable_drag_files_to_timeline->setCheckable(true);
|
||||
enable_drag_files_to_timeline->setData(reinterpret_cast<quintptr>(&config.enable_drag_files_to_timeline));
|
||||
|
||||
autoscale_by_default = tools_menu->addAction("Auto-Scale By Default", this, SLOT(toggle_bool_action()));
|
||||
autoscale_by_default = tools_menu->addAction(tr("Auto-Scale By Default"), this, SLOT(toggle_bool_action()));
|
||||
autoscale_by_default->setProperty("id", "autoscalebydefault");
|
||||
autoscale_by_default->setCheckable(true);
|
||||
autoscale_by_default->setData(reinterpret_cast<quintptr>(&config.autoscale_by_default));
|
||||
|
||||
enable_seek_to_import = tools_menu->addAction("Enable Seek to Import", this, SLOT(toggle_bool_action()));
|
||||
enable_seek_to_import = tools_menu->addAction(tr("Enable Seek to Import"), this, SLOT(toggle_bool_action()));
|
||||
enable_seek_to_import->setProperty("id", "enableseektoimport");
|
||||
enable_seek_to_import->setCheckable(true);
|
||||
enable_seek_to_import->setData(reinterpret_cast<quintptr>(&config.enable_seek_to_import));
|
||||
|
||||
enable_audio_scrubbing = tools_menu->addAction("Audio Scrubbing", this, SLOT(toggle_bool_action()));
|
||||
enable_audio_scrubbing = tools_menu->addAction(tr("Audio Scrubbing"), this, SLOT(toggle_bool_action()));
|
||||
enable_audio_scrubbing->setProperty("id", "audioscrubbing");
|
||||
enable_audio_scrubbing->setCheckable(true);
|
||||
enable_audio_scrubbing->setData(reinterpret_cast<quintptr>(&config.enable_audio_scrubbing));
|
||||
|
||||
enable_drop_on_media_to_replace = tools_menu->addAction("Enable Drop on Media to Replace", this, SLOT(toggle_bool_action()));
|
||||
enable_drop_on_media_to_replace = tools_menu->addAction(tr("Enable Drop on Media to Replace"), this, SLOT(toggle_bool_action()));
|
||||
enable_drop_on_media_to_replace->setProperty("id", "enabledropmediareplace");
|
||||
enable_drop_on_media_to_replace->setCheckable(true);
|
||||
enable_drop_on_media_to_replace->setData(reinterpret_cast<quintptr>(&config.drop_on_media_to_replace));
|
||||
|
||||
enable_hover_focus = tools_menu->addAction("Enable Hover Focus", this, SLOT(toggle_bool_action()));
|
||||
enable_hover_focus = tools_menu->addAction(tr("Enable Hover Focus"), this, SLOT(toggle_bool_action()));
|
||||
enable_hover_focus->setProperty("id", "hoverfocus");
|
||||
enable_hover_focus->setCheckable(true);
|
||||
enable_hover_focus->setData(reinterpret_cast<quintptr>(&config.hover_focus));
|
||||
|
||||
set_name_and_marker = tools_menu->addAction("Ask For Name When Setting Marker", this, SLOT(toggle_bool_action()));
|
||||
set_name_and_marker = tools_menu->addAction(tr("Ask For Name When Setting Marker"), this, SLOT(toggle_bool_action()));
|
||||
set_name_and_marker->setProperty("id", "asknamemarkerset");
|
||||
set_name_and_marker->setCheckable(true);
|
||||
set_name_and_marker->setData(reinterpret_cast<quintptr>(&config.set_name_with_marker));
|
||||
|
||||
loop_action = tools_menu->addAction("Loop", this, SLOT(toggle_bool_action()));
|
||||
loop_action = tools_menu->addAction(tr("Loop"), this, SLOT(toggle_bool_action()));
|
||||
loop_action->setProperty("id", "loop");
|
||||
loop_action->setCheckable(true);
|
||||
loop_action->setData(reinterpret_cast<quintptr>(&config.loop));
|
||||
|
||||
pause_at_out_point_action = tools_menu->addAction("Pause At Out Point", this, SLOT(toggle_bool_action()));
|
||||
pause_at_out_point_action = tools_menu->addAction(tr("Pause At Out Point"), this, SLOT(toggle_bool_action()));
|
||||
pause_at_out_point_action->setProperty("id", "pauseoutpoint");
|
||||
pause_at_out_point_action->setCheckable(true);
|
||||
pause_at_out_point_action->setData(reinterpret_cast<quintptr>(&config.pause_at_out_point));
|
||||
|
||||
tools_menu->addSeparator();
|
||||
|
||||
no_autoscroll = tools_menu->addAction("No Auto-Scroll", this, SLOT(set_autoscroll()));
|
||||
no_autoscroll = tools_menu->addAction(tr("No Auto-Scroll"), this, SLOT(set_autoscroll()));
|
||||
no_autoscroll->setProperty("id", "autoscrollno");
|
||||
no_autoscroll->setData(AUTOSCROLL_NO_SCROLL);
|
||||
no_autoscroll->setCheckable(true);
|
||||
|
||||
page_autoscroll = tools_menu->addAction("Page Auto-Scroll", this, SLOT(set_autoscroll()));
|
||||
page_autoscroll = tools_menu->addAction(tr("Page Auto-Scroll"), this, SLOT(set_autoscroll()));
|
||||
page_autoscroll->setProperty("id", "autoscrollpage");
|
||||
page_autoscroll->setData(AUTOSCROLL_PAGE_SCROLL);
|
||||
page_autoscroll->setCheckable(true);
|
||||
|
||||
smooth_autoscroll = tools_menu->addAction("Smooth Auto-Scroll", this, SLOT(set_autoscroll()));
|
||||
smooth_autoscroll = tools_menu->addAction(tr("Smooth Auto-Scroll"), this, SLOT(set_autoscroll()));
|
||||
smooth_autoscroll->setProperty("id", "autoscrollsmooth");
|
||||
smooth_autoscroll->setData(AUTOSCROLL_SMOOTH_SCROLL);
|
||||
smooth_autoscroll->setCheckable(true);
|
||||
|
||||
tools_menu->addSeparator();
|
||||
|
||||
tools_menu->addAction("Preferences", this, SLOT(preferences()), QKeySequence("Ctrl+."));
|
||||
tools_menu->addAction(tr("Preferences"), this, SLOT(preferences()), QKeySequence("Ctrl+."))->setProperty("id", "prefs");
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
tools_menu->addAction("Clear Undo", this, SLOT(clear_undo_stack()));
|
||||
tools_menu->addAction(tr("Clear Undo"), this, SLOT(clear_undo_stack()))->setProperty("id", "clearundo");
|
||||
#endif
|
||||
|
||||
// INITIALIZE HELP MENU
|
||||
|
||||
QMenu* help_menu = menuBar->addMenu("&Help");
|
||||
QMenu* help_menu = menuBar->addMenu(tr("&Help"));
|
||||
|
||||
help_menu->addAction("A&ction Search", this, SLOT(show_action_search()), QKeySequence("/"));
|
||||
help_menu->addAction(tr("A&ction Search"), this, SLOT(show_action_search()), QKeySequence("/"))->setProperty("id", "actionsearch");
|
||||
|
||||
help_menu->addSeparator();
|
||||
|
||||
help_menu->addAction("Debug Log", this, SLOT(show_debug_log()));
|
||||
help_menu->addAction(tr("Debug Log"), this, SLOT(show_debug_log()))->setProperty("id", "debuglog");
|
||||
|
||||
help_menu->addSeparator();
|
||||
|
||||
help_menu->addAction("&About...", this, SLOT(show_about()));
|
||||
help_menu->addAction(tr("&About..."), this, SLOT(show_about()))->setProperty("id", "about");
|
||||
|
||||
load_shortcuts(get_config_path() + "/shortcuts", true);
|
||||
}
|
||||
@@ -911,7 +962,7 @@ void MainWindow::set_button_action_checked(QAction *a) {
|
||||
|
||||
void MainWindow::updateTitle(const QString& url) {
|
||||
project_url = url;
|
||||
setWindowTitle(appName + " - " + ((project_url.isEmpty()) ? "<untitled>" : project_url) + "[*]");
|
||||
setWindowTitle(appName + " - " + ((project_url.isEmpty()) ? tr("<untitled>") : project_url) + "[*]");
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *e) {
|
||||
@@ -973,7 +1024,7 @@ void MainWindow::clear_undo_stack() {
|
||||
}
|
||||
|
||||
void MainWindow::open_project() {
|
||||
QString fn = QFileDialog::getOpenFileName(this, "Open Project...", "", OLIVE_FILE_FILTER);
|
||||
QString fn = QFileDialog::getOpenFileName(this, tr("Open Project..."), "", OLIVE_FILE_FILTER);
|
||||
if (!fn.isEmpty() && can_close_project()) {
|
||||
open_project_worker(fn, false);
|
||||
}
|
||||
@@ -1122,8 +1173,8 @@ void MainWindow::viewMenu_About_To_Be_Shown() {
|
||||
|
||||
title_safe_off->setChecked(!config.show_title_safe_area);
|
||||
title_safe_default->setChecked(config.show_title_safe_area && !config.use_custom_title_safe_ratio);
|
||||
title_safe_43->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && config.custom_title_safe_ratio == 4.0/3.0);
|
||||
title_safe_169->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && config.custom_title_safe_ratio == 16.0/9.0);
|
||||
title_safe_43->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && qFuzzyCompare(config.custom_title_safe_ratio, 4.0/3.0));
|
||||
title_safe_169->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && qFuzzyCompare(config.custom_title_safe_ratio, 16.0/9.0));
|
||||
title_safe_custom->setChecked(config.show_title_safe_area && config.use_custom_title_safe_ratio && !title_safe_43->isChecked() && !title_safe_169->isChecked());
|
||||
|
||||
full_screen->setChecked(windowState() == Qt::WindowFullScreen);
|
||||
@@ -1175,7 +1226,7 @@ void MainWindow::add_default_transition() {
|
||||
}
|
||||
|
||||
void MainWindow::new_folder() {
|
||||
Media* m = panel_project->new_folder(0);
|
||||
Media* m = panel_project->new_folder(nullptr);
|
||||
undo_stack.push(new AddMediaCommand(m, panel_project->get_selected_folder()));
|
||||
|
||||
QModelIndex index = project_model.create_index(m->row(), 0, m);
|
||||
@@ -1208,14 +1259,17 @@ void MainWindow::fileMenu_About_To_Be_Shown() {
|
||||
}
|
||||
|
||||
void MainWindow::fileMenu_About_To_Hide() {
|
||||
// open_recent->clear();
|
||||
}
|
||||
|
||||
void MainWindow::load_recent_project() {
|
||||
int index = static_cast<QAction*>(sender())->data().toInt();
|
||||
QString recent_url = recent_projects.at(index);
|
||||
if (!QFile::exists(recent_url)) {
|
||||
if (QMessageBox::question(this, "Missing recent project", "The project '" + recent_url + "' no longer exists. Would you like to remove it from the recent projects list?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(
|
||||
this,
|
||||
tr("Missing recent project"),
|
||||
tr("The project '%1' no longer exists. Would you like to remove it from the recent projects list?").arg(recent_url),
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
recent_projects.removeAt(index);
|
||||
panel_project->save_recent_projects();
|
||||
}
|
||||
@@ -1334,10 +1388,10 @@ void MainWindow::set_tsa_custom() {
|
||||
|
||||
do {
|
||||
if (invalid) {
|
||||
QMessageBox::critical(this, "Invalid aspect ratio", "The aspect ratio '" + input + "' is invalid. Please try again.");
|
||||
QMessageBox::critical(this, tr("Invalid aspect ratio"), tr("The aspect ratio '%1' is invalid. Please try again.").arg(input));
|
||||
}
|
||||
|
||||
input = QInputDialog::getText(this, "Enter custom aspect ratio", "Enter the aspect ratio to use for the title/action safe area (e.g. 16:9):");
|
||||
input = QInputDialog::getText(this, tr("Enter custom aspect ratio"), tr("Enter the aspect ratio to use for the title/action safe area (e.g. 16:9):"));
|
||||
invalid = !arTest.exactMatch(input) && !input.isEmpty();
|
||||
} while (invalid);
|
||||
|
||||
@@ -1404,7 +1458,7 @@ void MainWindow::nest() {
|
||||
Sequence* s = new Sequence();
|
||||
|
||||
// create "nest" sequence
|
||||
s->name = panel_project->get_next_sequence_name("Nested Sequence");
|
||||
s->name = panel_project->get_next_sequence_name(tr("Nested Sequence"));
|
||||
s->width = sequence->width;
|
||||
s->height = sequence->height;
|
||||
s->frame_rate = sequence->frame_rate;
|
||||
|
||||
@@ -34,7 +34,7 @@ EffectControls::EffectControls(QWidget *parent) :
|
||||
QDockWidget(parent),
|
||||
multiple(false),
|
||||
zoom(1),
|
||||
panel_name("Effects: "),
|
||||
panel_name(tr("Effects: ")),
|
||||
mode(TA_NO_TRANSITION)
|
||||
{
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
@@ -303,7 +303,7 @@ void EffectControls::setup_ui() {
|
||||
|
||||
QPushButton* btnAddVideoEffect = new QPushButton(veHeader);
|
||||
btnAddVideoEffect->setIcon(QIcon(":/icons/add-effect.png"));
|
||||
btnAddVideoEffect->setToolTip("Add Video Effect");
|
||||
btnAddVideoEffect->setToolTip(tr("Add Video Effect"));
|
||||
veHeaderLayout->addWidget(btnAddVideoEffect);
|
||||
connect(btnAddVideoEffect, SIGNAL(clicked(bool)), this, SLOT(video_effect_click()));
|
||||
|
||||
@@ -314,14 +314,14 @@ void EffectControls::setup_ui() {
|
||||
font.setPointSize(9);
|
||||
lblVideoEffects->setFont(font);
|
||||
lblVideoEffects->setAlignment(Qt::AlignCenter);
|
||||
lblVideoEffects->setText("VIDEO EFFECTS");
|
||||
lblVideoEffects->setText(tr("VIDEO EFFECTS"));
|
||||
veHeaderLayout->addWidget(lblVideoEffects);
|
||||
|
||||
veHeaderLayout->addStretch();
|
||||
|
||||
QPushButton* btnAddVideoTransition = new QPushButton(veHeader);
|
||||
btnAddVideoTransition->setIcon(QIcon(":/icons/add-transition.png"));
|
||||
btnAddVideoTransition->setToolTip("Add Video Transition");
|
||||
btnAddVideoTransition->setToolTip(tr("Add Video Transition"));
|
||||
connect(btnAddVideoTransition, SIGNAL(clicked(bool)), this, SLOT(video_transition_click()));
|
||||
|
||||
veHeaderLayout->addWidget(btnAddVideoTransition);
|
||||
@@ -351,7 +351,7 @@ void EffectControls::setup_ui() {
|
||||
|
||||
QPushButton* btnAddAudioEffect = new QPushButton(aeHeader);
|
||||
btnAddAudioEffect->setIcon(QIcon(":/icons/add-effect.png"));
|
||||
btnAddAudioEffect->setToolTip("Add Audio Effect");
|
||||
btnAddAudioEffect->setToolTip(tr("Add Audio Effect"));
|
||||
connect(btnAddAudioEffect, SIGNAL(clicked(bool)), this, SLOT(audio_effect_click()));
|
||||
aeHeaderLayout->addWidget(btnAddAudioEffect);
|
||||
|
||||
@@ -360,14 +360,14 @@ void EffectControls::setup_ui() {
|
||||
QLabel* lblAudioEffects = new QLabel(aeHeader);
|
||||
lblAudioEffects->setFont(font);
|
||||
lblAudioEffects->setAlignment(Qt::AlignCenter);
|
||||
lblAudioEffects->setText("AUDIO EFFECTS");
|
||||
lblAudioEffects->setText(tr("AUDIO EFFECTS"));
|
||||
aeHeaderLayout->addWidget(lblAudioEffects);
|
||||
|
||||
aeHeaderLayout->addStretch();
|
||||
|
||||
QPushButton* btnAddAudioTransition = new QPushButton(aeHeader);
|
||||
btnAddAudioTransition->setIcon(QIcon(":/icons/add-transition.png"));
|
||||
btnAddAudioTransition->setToolTip("Add Audio Transition");
|
||||
btnAddAudioTransition->setToolTip(tr("Add Audio Transition"));
|
||||
connect(btnAddAudioTransition, SIGNAL(clicked(bool)), this, SLOT(audio_transition_click()));
|
||||
aeHeaderLayout->addWidget(btnAddAudioTransition);
|
||||
|
||||
@@ -384,7 +384,7 @@ void EffectControls::setup_ui() {
|
||||
|
||||
lblMultipleClipsSelected = new QLabel(effects_area);
|
||||
lblMultipleClipsSelected->setAlignment(Qt::AlignCenter);
|
||||
lblMultipleClipsSelected->setText("(Multiple clips selected)");
|
||||
lblMultipleClipsSelected->setText(tr("(Multiple clips selected)"));
|
||||
effects_area_layout->addWidget(lblMultipleClipsSelected);
|
||||
|
||||
effects_area_layout->addStretch();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
GraphEditor::GraphEditor(QWidget* parent) : QDockWidget(parent), row(nullptr) {
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
setWindowTitle("Graph Editor");
|
||||
setWindowTitle(tr("Graph Editor"));
|
||||
resize(720, 480);
|
||||
|
||||
QWidget* main_widget = new QWidget();
|
||||
@@ -58,13 +58,13 @@ GraphEditor::GraphEditor(QWidget* parent) : QDockWidget(parent), row(nullptr) {
|
||||
left_tool_layout->addWidget(keyframe_nav);
|
||||
left_tool_layout->addStretch();
|
||||
|
||||
linear_button = new QPushButton("Linear");
|
||||
linear_button = new QPushButton(tr("Linear"));
|
||||
linear_button->setProperty("type", KEYFRAME_TYPE_LINEAR);
|
||||
linear_button->setCheckable(true);
|
||||
bezier_button = new QPushButton("Bezier");
|
||||
bezier_button = new QPushButton(tr("Bezier"));
|
||||
bezier_button->setProperty("type", KEYFRAME_TYPE_BEZIER);
|
||||
bezier_button->setCheckable(true);
|
||||
hold_button = new QPushButton("Hold");
|
||||
hold_button = new QPushButton(tr("Hold"));
|
||||
hold_button->setProperty("type", KEYFRAME_TYPE_HOLD);
|
||||
hold_button->setCheckable(true);
|
||||
|
||||
|
||||
+33
-12
@@ -177,7 +177,7 @@ Project::Project(QWidget *parent) :
|
||||
connect(icon_view, SIGNAL(changed_root()), this, SLOT(set_up_dir_enabled()));
|
||||
|
||||
//retranslateUi(Project);
|
||||
setWindowTitle(QApplication::translate("Project", "Project", nullptr));
|
||||
setWindowTitle(tr("Project"));
|
||||
|
||||
update_view_type();
|
||||
}
|
||||
@@ -187,7 +187,7 @@ Project::~Project() {
|
||||
}
|
||||
|
||||
QString Project::get_next_sequence_name(QString start) {
|
||||
if (start.isEmpty()) start = "Sequence";
|
||||
if (start.isEmpty()) start = tr("Sequence");
|
||||
|
||||
int n = 1;
|
||||
bool found = true;
|
||||
@@ -305,7 +305,11 @@ void Project::replace_selected_file() {
|
||||
|
||||
void Project::replace_media(Media* item, QString filename) {
|
||||
if (filename.isEmpty()) {
|
||||
filename = QFileDialog::getOpenFileName(this, "Replace '" + item->get_name() + "'", "", "All Files (*)");
|
||||
filename = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Replace '%1'").arg(item->get_name()),
|
||||
"",
|
||||
tr("All Files") + " (*)");
|
||||
}
|
||||
if (!filename.isEmpty()) {
|
||||
ReplaceMediaCommand* rmc = new ReplaceMediaCommand(item, filename);
|
||||
@@ -315,13 +319,19 @@ void Project::replace_media(Media* item, QString filename) {
|
||||
|
||||
void Project::replace_clip_media() {
|
||||
if (sequence == nullptr) {
|
||||
QMessageBox::critical(this, "No active sequence", "No sequence is active, please open the sequence you want to replace clips from.", QMessageBox::Ok);
|
||||
QMessageBox::critical(this,
|
||||
tr("No active sequence"),
|
||||
tr("No sequence is active, please open the sequence you want to replace clips from."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
QModelIndexList selected_items = get_current_selected();
|
||||
if (selected_items.size() == 1) {
|
||||
Media* item = item_to_media(selected_items.at(0));
|
||||
if (item->get_type() == MEDIA_TYPE_SEQUENCE && sequence == item->to_sequence()) {
|
||||
QMessageBox::critical(this, "Active sequence selected", "You cannot insert a sequence into itself, so no clips of this media would be in this sequence.", QMessageBox::Ok);
|
||||
QMessageBox::critical(this,
|
||||
tr("Active sequence selected"),
|
||||
tr("You cannot insert a sequence into itself, so no clips of this media would be in this sequence."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
ReplaceClipMediaDialog dialog(this, item);
|
||||
dialog.exec();
|
||||
@@ -350,7 +360,11 @@ void Project::open_properties() {
|
||||
default:
|
||||
{
|
||||
// fall back to renaming
|
||||
QString new_name = QInputDialog::getText(this, "Rename '" + item->get_name() + "'", "Enter new name:", QLineEdit::Normal, item->get_name());
|
||||
QString new_name = QInputDialog::getText(this,
|
||||
tr("Rename '%1'").arg(item->get_name()),
|
||||
tr("Enter new name:"),
|
||||
QLineEdit::Normal,
|
||||
item->get_name());
|
||||
if (!new_name.isEmpty()) {
|
||||
MediaRename* mr = new MediaRename(item, new_name);
|
||||
undo_stack.push(mr);
|
||||
@@ -467,11 +481,11 @@ void Project::delete_selected_media() {
|
||||
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);
|
||||
confirm.setWindowTitle("Delete media in use?");
|
||||
confirm.setText("The media '" + media->name + "' is currently used in '" + s->name + "'. Deleting it will remove all instances in the sequence. Are you sure you want to do this?");
|
||||
confirm.setWindowTitle(tr("Delete media in use?"));
|
||||
confirm.setText(tr("The media '%1' is currently used in '%2'. Deleting it will remove all instances in the sequence. Are you sure you want to do this?").arg(media->name, s->name));
|
||||
QAbstractButton* yes_button = confirm.addButton(QMessageBox::Yes);
|
||||
QAbstractButton* skip_button = nullptr;
|
||||
if (items.size() > 1) skip_button = confirm.addButton("Skip", QMessageBox::NoRole);
|
||||
if (items.size() > 1) skip_button = confirm.addButton(tr("Skip"), QMessageBox::NoRole);
|
||||
QAbstractButton* abort_button = confirm.addButton(QMessageBox::Cancel);
|
||||
confirm.exec();
|
||||
if (confirm.clickedButton() == yes_button) {
|
||||
@@ -694,7 +708,11 @@ void Project::process_file_list(QStringList& files, bool recursive, Media* repla
|
||||
}
|
||||
if (!found) {
|
||||
image_sequence_urls.append(new_filename);
|
||||
if (QMessageBox::question(this, "Image sequence detected", "The file '" + file + "' appears to be part of an image sequence. Would you like to import it as such?", QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(this,
|
||||
tr("Image sequence detected"),
|
||||
tr("The file '%1' appears to be part of an image sequence. Would you like to import it as such?").arg(file),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
QMessageBox::Yes) == QMessageBox::Yes) {
|
||||
file = new_filename;
|
||||
image_sequence_importassequence.append(true);
|
||||
} else {
|
||||
@@ -797,7 +815,7 @@ bool Project::reveal_media(Media *media, QModelIndex parent) {
|
||||
}
|
||||
|
||||
void Project::import_dialog() {
|
||||
QFileDialog fd(this, "Import media...", "", "All Files (*)");
|
||||
QFileDialog fd(this, tr("Import media..."), "", tr("All Files") + " (*)");
|
||||
fd.setFileMode(QFileDialog::ExistingFiles);
|
||||
|
||||
if (fd.exec()) {
|
||||
@@ -808,7 +826,10 @@ void Project::import_dialog() {
|
||||
|
||||
void Project::delete_clips_using_selected_media() {
|
||||
if (sequence == nullptr) {
|
||||
QMessageBox::critical(this, "No active sequence", "No sequence is active, please open the sequence you want to delete clips from.", QMessageBox::Ok);
|
||||
QMessageBox::critical(this,
|
||||
tr("No active sequence"),
|
||||
tr("No sequence is active, please open the sequence you want to delete clips from."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
ComboAction* ca = new ComboAction();
|
||||
bool deleted = false;
|
||||
|
||||
+36
-30
@@ -397,10 +397,11 @@ void Timeline::update_sequence() {
|
||||
addButton->setEnabled(!null_sequence);
|
||||
headers->setEnabled(!null_sequence);
|
||||
|
||||
QString title = tr("Timeline: ");
|
||||
if (null_sequence) {
|
||||
setWindowTitle("Timeline: <none>");
|
||||
setWindowTitle(title + tr("<none>"));
|
||||
} else {
|
||||
setWindowTitle("Timeline: " + sequence->name);
|
||||
setWindowTitle(title + sequence->name);
|
||||
update_ui(false);
|
||||
}
|
||||
}
|
||||
@@ -1007,15 +1008,15 @@ void Timeline::paste(bool insert) {
|
||||
}
|
||||
if (found >= 0 && ask_conflict) {
|
||||
QMessageBox box(this);
|
||||
box.setWindowTitle("Effect already exists");
|
||||
box.setText("Clip '" + c->name + "' already contains a '" + e->meta->name + "' effect. Would you like to replace it with the pasted one or add it as a separate effect?");
|
||||
box.setWindowTitle(tr("Effect already exists"));
|
||||
box.setText(tr("Clip '%1' already contains a '%2' effect. Would you like to replace it with the pasted one or add it as a separate effect?").arg(c->name, e->meta->name));
|
||||
box.setIcon(QMessageBox::Icon::Question);
|
||||
|
||||
box.addButton("Add", QMessageBox::YesRole);
|
||||
QPushButton* replace_button = box.addButton("Replace", QMessageBox::NoRole);
|
||||
QPushButton* skip_button = box.addButton("Skip", QMessageBox::RejectRole);
|
||||
box.addButton(tr("Add"), QMessageBox::YesRole);
|
||||
QPushButton* replace_button = box.addButton(tr("Replace"), QMessageBox::NoRole);
|
||||
QPushButton* skip_button = box.addButton(tr("Skip"), QMessageBox::RejectRole);
|
||||
|
||||
QCheckBox* future_box = new QCheckBox("Do this for all conflicts found");
|
||||
QCheckBox* future_box = new QCheckBox(tr("Do this for all conflicts found"));
|
||||
box.setCheckBox(future_box);
|
||||
|
||||
box.exec();
|
||||
@@ -1389,8 +1390,8 @@ void Timeline::set_marker() {
|
||||
|
||||
if (!add_marker) {
|
||||
QInputDialog d(this);
|
||||
d.setWindowTitle("Set Marker");
|
||||
d.setLabelText("Set marker name:");
|
||||
d.setWindowTitle(tr("Set Marker"));
|
||||
d.setLabelText(tr("Set marker name:"));
|
||||
d.setInputMode(QInputDialog::TextInput);
|
||||
add_marker = (d.exec() == QDialog::Accepted);
|
||||
marker_name = d.textValue();
|
||||
@@ -1478,29 +1479,29 @@ void Timeline::add_btn_click() {
|
||||
QMenu add_menu(this);
|
||||
|
||||
QAction* titleMenuItem = new QAction(&add_menu);
|
||||
titleMenuItem->setText("Title...");
|
||||
titleMenuItem->setText(tr("Title..."));
|
||||
titleMenuItem->setData(ADD_OBJ_TITLE);
|
||||
add_menu.addAction(titleMenuItem);
|
||||
|
||||
QAction* solidMenuItem = new QAction(&add_menu);
|
||||
solidMenuItem->setText("Solid Color...");
|
||||
solidMenuItem->setText(tr("Solid Color..."));
|
||||
solidMenuItem->setData(ADD_OBJ_SOLID);
|
||||
add_menu.addAction(solidMenuItem);
|
||||
|
||||
QAction* barsMenuItem = new QAction(&add_menu);
|
||||
barsMenuItem->setText("Bars...");
|
||||
barsMenuItem->setText(tr("Bars..."));
|
||||
barsMenuItem->setData(ADD_OBJ_BARS);
|
||||
add_menu.addAction(barsMenuItem);
|
||||
|
||||
add_menu.addSeparator();
|
||||
|
||||
QAction* toneMenuItem = new QAction(&add_menu);
|
||||
toneMenuItem->setText("Tone...");
|
||||
toneMenuItem->setText(tr("Tone..."));
|
||||
toneMenuItem->setData(ADD_OBJ_TONE);
|
||||
add_menu.addAction(toneMenuItem);
|
||||
|
||||
QAction* noiseMenuItem = new QAction(&add_menu);
|
||||
noiseMenuItem->setText("Noise...");
|
||||
noiseMenuItem->setText(tr("Noise..."));
|
||||
noiseMenuItem->setData(ADD_OBJ_NOISE);
|
||||
add_menu.addAction(noiseMenuItem);
|
||||
|
||||
@@ -1522,11 +1523,16 @@ void Timeline::setScroll(int s) {
|
||||
|
||||
void Timeline::record_btn_click() {
|
||||
if (project_url.isEmpty()) {
|
||||
QMessageBox::critical(this, "Unsaved Project", "You must save this project before you can record audio in it.", QMessageBox::Ok);
|
||||
QMessageBox::critical(this,
|
||||
tr("Unsaved Project"),
|
||||
tr("You must save this project before you can record audio in it."),
|
||||
QMessageBox::Ok);
|
||||
} else {
|
||||
creating = true;
|
||||
creating_object = ADD_OBJ_AUDIO;
|
||||
mainWindow->statusBar()->showMessage("Click on the timeline where you want to start recording (drag to limit the recording to a certain timeframe)", 10000);
|
||||
mainWindow->statusBar()->showMessage(
|
||||
tr("Click on the timeline where you want to start recording (drag to limit the recording to a certain timeframe)"),
|
||||
10000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1605,7 +1611,7 @@ void Timeline::setup_ui() {
|
||||
arrow_icon.addFile(QStringLiteral(":/icons/arrow-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
|
||||
toolArrowButton->setIcon(arrow_icon);
|
||||
toolArrowButton->setCheckable(true);
|
||||
toolArrowButton->setToolTip("Pointer Tool (V)");
|
||||
toolArrowButton->setToolTip(tr("Pointer Tool") + " (V)");
|
||||
toolArrowButton->setProperty("tool", TIMELINE_TOOL_POINTER);
|
||||
connect(toolArrowButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolArrowButton);
|
||||
@@ -1616,7 +1622,7 @@ void Timeline::setup_ui() {
|
||||
icon1.addFile(QStringLiteral(":/icons/beam-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
|
||||
toolEditButton->setIcon(icon1);
|
||||
toolEditButton->setCheckable(true);
|
||||
toolEditButton->setToolTip("Edit Tool (X)");
|
||||
toolEditButton->setToolTip(tr("Edit Tool") + " (X)");
|
||||
toolEditButton->setProperty("tool", TIMELINE_TOOL_EDIT);
|
||||
connect(toolEditButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolEditButton);
|
||||
@@ -1627,7 +1633,7 @@ void Timeline::setup_ui() {
|
||||
icon2.addFile(QStringLiteral(":/icons/ripple-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
|
||||
toolRippleButton->setIcon(icon2);
|
||||
toolRippleButton->setCheckable(true);
|
||||
toolRippleButton->setToolTip("Ripple Tool (B)");
|
||||
toolRippleButton->setToolTip(tr("Ripple Tool") + " (B)");
|
||||
toolRippleButton->setProperty("tool", TIMELINE_TOOL_RIPPLE);
|
||||
connect(toolRippleButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolRippleButton);
|
||||
@@ -1638,7 +1644,7 @@ void Timeline::setup_ui() {
|
||||
icon4.addFile(QStringLiteral(":/icons/razor-disabled.png"), QSize(), QIcon::Disabled, QIcon::Off);
|
||||
toolRazorButton->setIcon(icon4);
|
||||
toolRazorButton->setCheckable(true);
|
||||
toolRazorButton->setToolTip("Razor Tool (C)");
|
||||
toolRazorButton->setToolTip(tr("Razor Tool") + " (C)");
|
||||
toolRazorButton->setProperty("tool", TIMELINE_TOOL_RAZOR);
|
||||
connect(toolRazorButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolRazorButton);
|
||||
@@ -1649,7 +1655,7 @@ void Timeline::setup_ui() {
|
||||
icon5.addFile(QStringLiteral(":/icons/slip-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
toolSlipButton->setIcon(icon5);
|
||||
toolSlipButton->setCheckable(true);
|
||||
toolSlipButton->setToolTip("Slip Tool (Y)");
|
||||
toolSlipButton->setToolTip(tr("Slip Tool") + " (Y)");
|
||||
toolSlipButton->setProperty("tool", TIMELINE_TOOL_SLIP);
|
||||
connect(toolSlipButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolSlipButton);
|
||||
@@ -1660,7 +1666,7 @@ void Timeline::setup_ui() {
|
||||
icon6.addFile(QStringLiteral(":/icons/slide-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
toolSlideButton->setIcon(icon6);
|
||||
toolSlideButton->setCheckable(true);
|
||||
toolSlideButton->setToolTip("Slide Tool (U)");
|
||||
toolSlideButton->setToolTip(tr("Slide Tool") + " (U)");
|
||||
toolSlideButton->setProperty("tool", TIMELINE_TOOL_SLIDE);
|
||||
connect(toolSlideButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolSlideButton);
|
||||
@@ -1671,7 +1677,7 @@ void Timeline::setup_ui() {
|
||||
icon7.addFile(QStringLiteral(":/icons/hand-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
toolHandButton->setIcon(icon7);
|
||||
toolHandButton->setCheckable(true);
|
||||
toolHandButton->setToolTip("Hand Tool (H)");
|
||||
toolHandButton->setToolTip(tr("Hand Tool") + " (H)");
|
||||
toolHandButton->setProperty("tool", TIMELINE_TOOL_HAND);
|
||||
connect(toolHandButton, SIGNAL(clicked(bool)), this, SLOT(set_tool()));
|
||||
tool_buttons_layout->addWidget(toolHandButton);
|
||||
@@ -1682,7 +1688,7 @@ void Timeline::setup_ui() {
|
||||
icon8.addFile(QStringLiteral(":/icons/transition-tool-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
toolTransitionButton->setIcon(icon8);
|
||||
toolTransitionButton->setCheckable(true);
|
||||
toolTransitionButton->setToolTip("Transition Tool (T)");
|
||||
toolTransitionButton->setToolTip(tr("Transition Tool") + " (T)");
|
||||
connect(toolTransitionButton, SIGNAL(clicked(bool)), this, SLOT(transition_tool_click()));
|
||||
tool_buttons_layout->addWidget(toolTransitionButton);
|
||||
|
||||
@@ -1693,7 +1699,7 @@ void Timeline::setup_ui() {
|
||||
snappingButton->setIcon(icon9);
|
||||
snappingButton->setCheckable(true);
|
||||
snappingButton->setChecked(true);
|
||||
snappingButton->setToolTip("Snapping (S)");
|
||||
snappingButton->setToolTip(tr("Snapping") + " (S)");
|
||||
connect(snappingButton, SIGNAL(toggled(bool)), this, SLOT(snapping_clicked(bool)));
|
||||
tool_buttons_layout->addWidget(snappingButton);
|
||||
|
||||
@@ -1702,7 +1708,7 @@ void Timeline::setup_ui() {
|
||||
icon10.addFile(QStringLiteral(":/icons/zoomin.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
icon10.addFile(QStringLiteral(":/icons/zoomin-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
zoomInButton->setIcon(icon10);
|
||||
zoomInButton->setToolTip("Zoom In (=)");
|
||||
zoomInButton->setToolTip(tr("Zoom In") + " (=)");
|
||||
connect(zoomInButton, SIGNAL(clicked(bool)), this, SLOT(zoom_in()));
|
||||
tool_buttons_layout->addWidget(zoomInButton);
|
||||
|
||||
@@ -1711,7 +1717,7 @@ void Timeline::setup_ui() {
|
||||
icon11.addFile(QStringLiteral(":/icons/zoomout.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
icon11.addFile(QStringLiteral(":/icons/zoomout-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
zoomOutButton->setIcon(icon11);
|
||||
zoomOutButton->setToolTip("Zoom Out (-)");
|
||||
zoomOutButton->setToolTip(tr("Zoom Out") + " (-)");
|
||||
connect(zoomOutButton, SIGNAL(clicked(bool)), this, SLOT(zoom_out()));
|
||||
tool_buttons_layout->addWidget(zoomOutButton);
|
||||
|
||||
@@ -1720,7 +1726,7 @@ void Timeline::setup_ui() {
|
||||
icon12.addFile(QStringLiteral(":/icons/record.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
icon12.addFile(QStringLiteral(":/icons/record-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
recordButton->setIcon(icon12);
|
||||
recordButton->setToolTip("Record audio");
|
||||
recordButton->setToolTip(tr("Record audio"));
|
||||
connect(recordButton, SIGNAL(clicked(bool)), this, SLOT(record_btn_click()));
|
||||
|
||||
tool_buttons_layout->addWidget(recordButton);
|
||||
@@ -1730,7 +1736,7 @@ void Timeline::setup_ui() {
|
||||
icon13.addFile(QStringLiteral(":/icons/add-button.png"), QSize(), QIcon::Normal, QIcon::On);
|
||||
icon13.addFile(QStringLiteral(":/icons/add-button-disabled.png"), QSize(), QIcon::Disabled, QIcon::On);
|
||||
addButton->setIcon(icon13);
|
||||
addButton->setToolTip("Add title, solid, bars, etc.");
|
||||
addButton->setToolTip(tr("Add title, solid, bars, etc."));
|
||||
connect(addButton, SIGNAL(clicked()), this, SLOT(add_btn_click()));
|
||||
tool_buttons_layout->addWidget(addButton);
|
||||
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ Viewer::Viewer(QWidget *parent) :
|
||||
seq(nullptr),
|
||||
created_sequence(false),
|
||||
cue_recording_internal(false),
|
||||
panel_name("Viewer: "),
|
||||
panel_name(tr("Viewer: ")),
|
||||
minimum_zoom(1.0)
|
||||
{
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
@@ -785,7 +785,7 @@ void Viewer::set_sequence(bool main, Sequence *s) {
|
||||
update_playhead_timecode(0);
|
||||
update_end_timecode();
|
||||
|
||||
setWindowTitle(panel_name + "(none)");
|
||||
setWindowTitle(panel_name + tr("(none)"));
|
||||
}
|
||||
|
||||
update_header_zoom();
|
||||
|
||||
+2
-2
@@ -292,7 +292,7 @@ bool start_recording() {
|
||||
return false;
|
||||
}
|
||||
|
||||
QString audio_path = project_url + " Audio";
|
||||
QString audio_path = project_url + " " + QCoreApplication::translate("Audio", "Audio");
|
||||
QDir audio_dir(audio_path);
|
||||
if (!audio_dir.exists() && !audio_dir.mkpath(".")) {
|
||||
qCritical() << "Failed to create audio directory";
|
||||
@@ -303,7 +303,7 @@ bool start_recording() {
|
||||
int file_number = 0;
|
||||
do {
|
||||
file_number++;
|
||||
audio_filename = audio_path + "/Recording " + QString::number(file_number) + ".wav";
|
||||
audio_filename = audio_path + "/" + QCoreApplication::translate("Audio", "Recording") + " " + QString::number(file_number) + ".wav";
|
||||
} while (QFile(audio_filename).exists());
|
||||
|
||||
output_recording.setFileName(audio_filename);
|
||||
|
||||
+3
-2
@@ -746,10 +746,11 @@ void open_clip_worker(Clip* clip) {
|
||||
}
|
||||
|
||||
/* stabilization code */
|
||||
bool stabilize = false;
|
||||
/*bool stabilize = false;
|
||||
if (stabilize) {
|
||||
AVFilterContext* stab_filter;
|
||||
int stab_ret = avfilter_graph_create_filter(&stab_filter, avfilter_get_by_name("vidstabtransform"), "vidstab", "input=/media/matt/Home/samples/transforms.trf", nullptr, clip->filter_graph);
|
||||
|
||||
if (stab_ret < 0) {
|
||||
char err[100];
|
||||
av_strerror(stab_ret, err, sizeof(err));
|
||||
@@ -757,7 +758,7 @@ void open_clip_worker(Clip* clip) {
|
||||
avfilter_link(last_filter, 0, stab_filter, 0);
|
||||
last_filter = stab_filter;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
enum AVPixelFormat valid_pix_fmts[] = {
|
||||
AV_PIX_FMT_RGB24,
|
||||
|
||||
+8
-5
@@ -43,6 +43,7 @@
|
||||
#include <QPainter>
|
||||
#include <QtMath>
|
||||
#include <QMenu>
|
||||
#include <QApplication>
|
||||
|
||||
bool shaders_are_enabled = true;
|
||||
QVector<EffectMeta> effects;
|
||||
@@ -71,7 +72,9 @@ Effect* create_effect(Clip* c, const EffectMeta* em) {
|
||||
}
|
||||
} else {
|
||||
qCritical() << "Invalid effect data";
|
||||
QMessageBox::critical(mainWindow, "Invalid effect", "No candidate for effect '" + em->name + "'. This effect may be corrupt. Try reinstalling it or Olive.");
|
||||
QMessageBox::critical(mainWindow,
|
||||
QCoreApplication::translate("Effect", "Invalid effect"),
|
||||
QCoreApplication::translate("Effect", "No candidate for effect '%1'. This effect may be corrupt. Try reinstalling it or Olive.").arg(em->name));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
@@ -86,7 +89,7 @@ const EffectMeta* get_internal_meta(int internal_id, int type) {
|
||||
}
|
||||
|
||||
void load_internal_effects() {
|
||||
qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
if (!shaders_are_enabled) qWarning() << "Shaders are disabled, some effects may be nonfunctional";
|
||||
|
||||
EffectMeta em;
|
||||
|
||||
@@ -545,18 +548,18 @@ void Effect::show_context_menu(const QPoint& pos) {
|
||||
int index = get_index_in_clip();
|
||||
|
||||
if (index > 0) {
|
||||
QAction* move_up = menu.addAction("Move &Up");
|
||||
QAction* move_up = menu.addAction(tr("Move &Up"));
|
||||
connect(move_up, SIGNAL(triggered(bool)), this, SLOT(move_up()));
|
||||
}
|
||||
|
||||
if (index < parent_clip->effects.size() - 1) {
|
||||
QAction* move_down = menu.addAction("Move &Down");
|
||||
QAction* move_down = menu.addAction(tr("Move &Down"));
|
||||
connect(move_down, SIGNAL(triggered(bool)), this, SLOT(move_down()));
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* del_action = menu.addAction("D&elete");
|
||||
QAction* del_action = menu.addAction(tr("D&elete"));
|
||||
connect(del_action, SIGNAL(triggered(bool)), this, SLOT(delete_self()));
|
||||
|
||||
menu.exec(container->title_bar->mapToGlobal(pos));
|
||||
|
||||
+21
-21
@@ -5,8 +5,8 @@
|
||||
#define GIZMO_TYPE_POLY 1
|
||||
#define GIZMO_TYPE_TARGET 2
|
||||
|
||||
#define GIZMO_DOT_SIZE 2.5F
|
||||
#define GIZMO_TARGET_SIZE 5.0F
|
||||
#define GIZMO_DOT_SIZE 2.5
|
||||
#define GIZMO_TARGET_SIZE 5.0
|
||||
|
||||
#include <QString>
|
||||
#include <QRect>
|
||||
@@ -19,32 +19,32 @@ class EffectField;
|
||||
class EffectGizmo
|
||||
{
|
||||
public:
|
||||
EffectGizmo(int type);
|
||||
EffectGizmo(int type);
|
||||
|
||||
QVector<QPoint> world_pos;
|
||||
QVector<QPoint> screen_pos;
|
||||
QVector<QPoint> world_pos;
|
||||
QVector<QPoint> screen_pos;
|
||||
|
||||
EffectField* x_field1;
|
||||
double x_field_multi1;
|
||||
EffectField* y_field1;
|
||||
double y_field_multi1;
|
||||
EffectField* x_field2;
|
||||
double x_field_multi2;
|
||||
EffectField* y_field2;
|
||||
double y_field_multi2;
|
||||
EffectField* x_field1;
|
||||
double x_field_multi1;
|
||||
EffectField* y_field1;
|
||||
double y_field_multi1;
|
||||
EffectField* x_field2;
|
||||
double x_field_multi2;
|
||||
EffectField* y_field2;
|
||||
double y_field_multi2;
|
||||
|
||||
void set_previous_value();
|
||||
void set_previous_value();
|
||||
|
||||
QColor color;
|
||||
int get_point_count();
|
||||
QColor color;
|
||||
int get_point_count();
|
||||
|
||||
int get_type();
|
||||
int get_type();
|
||||
|
||||
int get_cursor();
|
||||
void set_cursor(int c);
|
||||
int get_cursor();
|
||||
void set_cursor(int c);
|
||||
private:
|
||||
int type;
|
||||
int cursor;
|
||||
int type;
|
||||
int cursor;
|
||||
};
|
||||
|
||||
#endif // EFFECTGIZMO_H
|
||||
|
||||
@@ -64,7 +64,10 @@ void EffectRow::set_keyframe_enabled(bool enabled) {
|
||||
set_keyframe_now(ca);
|
||||
undo_stack.push(ca);
|
||||
} else {
|
||||
if (QMessageBox::question(panel_effect_controls, "Disable Keyframes", "Disabling keyframes will delete all current keyframes. Are you sure you want to do this?", QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
if (QMessageBox::question(panel_effect_controls,
|
||||
tr("Disable Keyframes"),
|
||||
tr("Disabling keyframes will delete all current keyframes. Are you sure you want to do this?"),
|
||||
QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) {
|
||||
// clear
|
||||
ComboAction* ca = new ComboAction();
|
||||
for (int i=0;i<fieldCount();i++) {
|
||||
|
||||
+35
-24
@@ -9,6 +9,7 @@
|
||||
#include "projectmodel.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
@@ -19,18 +20,18 @@ extern "C" {
|
||||
|
||||
QString get_interlacing_name(int interlacing) {
|
||||
switch (interlacing) {
|
||||
case VIDEO_PROGRESSIVE: return "None (Progressive)";
|
||||
case VIDEO_TOP_FIELD_FIRST: return "Top Field First";
|
||||
case VIDEO_BOTTOM_FIELD_FIRST: return "Bottom Field First";
|
||||
default: return "Invalid";
|
||||
case VIDEO_PROGRESSIVE: return QCoreApplication::translate("InterlacingName", "None (Progressive)");
|
||||
case VIDEO_TOP_FIELD_FIRST: return QCoreApplication::translate("InterlacingName", "Top Field First");
|
||||
case VIDEO_BOTTOM_FIELD_FIRST: return QCoreApplication::translate("InterlacingName", "Bottom Field First");
|
||||
default: return QCoreApplication::translate("InterlacingName", "Invalid");
|
||||
}
|
||||
}
|
||||
|
||||
QString get_channel_layout_name(int channels, uint64_t layout) {
|
||||
switch (channels) {
|
||||
case 0: return "Invalid";
|
||||
case 1: return "Mono";
|
||||
case 2: return "Stereo";
|
||||
case 0: return QCoreApplication::translate("ChannelLayoutName", "Invalid");
|
||||
case 1: return QCoreApplication::translate("ChannelLayoutName", "Mono");
|
||||
case 2: return QCoreApplication::translate("ChannelLayoutName", "Stereo");
|
||||
default: {
|
||||
char buf[50];
|
||||
av_get_channel_layout_string(buf, sizeof(buf), channels, layout);
|
||||
@@ -76,7 +77,7 @@ void Media::set_sequence(Sequence *s) {
|
||||
}
|
||||
|
||||
void Media::set_folder() {
|
||||
if (folder_name.isEmpty()) folder_name = "New Folder";
|
||||
if (folder_name.isEmpty()) folder_name = QCoreApplication::translate("Media", "New Folder");
|
||||
set_icon(QIcon(":/icons/folder.png"));
|
||||
type = MEDIA_TYPE_FOLDER;
|
||||
object = nullptr;
|
||||
@@ -95,11 +96,11 @@ void Media::update_tooltip(const QString& error) {
|
||||
case MEDIA_TYPE_FOOTAGE:
|
||||
{
|
||||
Footage* f = to_footage();
|
||||
tooltip = "Name: " + f->name + "\nFilename: " + f->url + "\n";
|
||||
tooltip = QCoreApplication::translate("Media", "Name:") + " " + f->name + "\n" + QCoreApplication::translate("Media", "Filename:") + " " + f->url + "\n";
|
||||
|
||||
if (error.isEmpty()) {
|
||||
if (f->video_tracks.size() > 0) {
|
||||
tooltip += "Video Dimensions: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Video Dimensions:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -109,7 +110,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
tooltip += "\n";
|
||||
|
||||
if (!f->video_tracks.at(0).infinite_length) {
|
||||
tooltip += "Frame Rate: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Frame Rate:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -117,14 +118,16 @@ void Media::update_tooltip(const QString& error) {
|
||||
if (f->video_tracks.at(i).video_interlacing == VIDEO_PROGRESSIVE) {
|
||||
tooltip += QString::number(f->video_tracks.at(i).video_frame_rate * f->speed);
|
||||
} else {
|
||||
tooltip += QString::number(f->video_tracks.at(i).video_frame_rate * f->speed * 2);
|
||||
tooltip += " fields (" + QString::number(f->video_tracks.at(i).video_frame_rate * f->speed) + " frames)";
|
||||
tooltip += QCoreApplication::translate("Media", "%1 fields (%2 frames)").arg(
|
||||
QString::number(f->video_tracks.at(i).video_frame_rate * f->speed * 2),
|
||||
QString::number(f->video_tracks.at(i).video_frame_rate * f->speed)
|
||||
);
|
||||
}
|
||||
}
|
||||
tooltip += "\n";
|
||||
}
|
||||
|
||||
tooltip += "Interlacing: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Interlacing:") + " ";
|
||||
for (int i=0;i<f->video_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -136,7 +139,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
if (f->audio_tracks.size() > 0) {
|
||||
tooltip += "\n";
|
||||
|
||||
tooltip += "Audio Frequency: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Audio Frequency:") + " ";
|
||||
for (int i=0;i<f->audio_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -145,7 +148,7 @@ void Media::update_tooltip(const QString& error) {
|
||||
}
|
||||
tooltip += "\n";
|
||||
|
||||
tooltip += "Audio Channels: ";
|
||||
tooltip += QCoreApplication::translate("Media", "Audio Channels:") + " ";
|
||||
for (int i=0;i<f->audio_tracks.size();i++) {
|
||||
if (i > 0) {
|
||||
tooltip += ", ";
|
||||
@@ -162,11 +165,19 @@ void Media::update_tooltip(const QString& error) {
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
{
|
||||
Sequence* s = to_sequence();
|
||||
tooltip = "Name: " + s->name
|
||||
+ "\nVideo Dimensions: " + QString::number(s->width) + "x" + QString::number(s->height)
|
||||
+ "\nFrame Rate: " + QString::number(s->frame_rate)
|
||||
+ "\nAudio Frequency: " + QString::number(s->audio_frequency)
|
||||
+ "\nAudio Layout: " + get_channel_layout_name(av_get_channel_layout_nb_channels(s->audio_layout), s->audio_layout);
|
||||
|
||||
tooltip = QCoreApplication::translate("Media", "Name: %1"
|
||||
"\nVideo Dimensions: %2x%3"
|
||||
"\nFrame Rate: %4"
|
||||
"\nAudio Frequency: %5"
|
||||
"\nAudio Layout: %6").arg(
|
||||
s->name,
|
||||
QString::number(s->width),
|
||||
QString::number(s->height),
|
||||
QString::number(s->frame_rate),
|
||||
QString::number(s->audio_frequency),
|
||||
get_channel_layout_name(av_get_channel_layout_nb_channels(s->audio_layout), s->audio_layout)
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -268,9 +279,9 @@ QVariant Media::data(int column, int role) {
|
||||
break;
|
||||
case Qt::DisplayRole:
|
||||
switch (column) {
|
||||
case 0: return (root) ? "Name" : get_name();
|
||||
case 0: return (root) ? QCoreApplication::translate("Media", "Name") : get_name();
|
||||
case 1:
|
||||
if (root) return "Duration";
|
||||
if (root) return QCoreApplication::translate("Media", "Duration");
|
||||
if (get_type() == MEDIA_TYPE_SEQUENCE) {
|
||||
Sequence* s = to_sequence();
|
||||
return frame_to_timecode(s->getEndFrame(), config.timecode_view, s->frame_rate);
|
||||
@@ -287,7 +298,7 @@ QVariant Media::data(int column, int role) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (root) return "Rate";
|
||||
if (root) return QCoreApplication::translate("Media", "Rate");
|
||||
if (get_type() == MEDIA_TYPE_SEQUENCE) return QString::number(get_frame_rate()) + " FPS";
|
||||
if (get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
Footage* f = to_footage();
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "clip.h"
|
||||
#include "transition.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
Sequence::Sequence() :
|
||||
@@ -24,7 +26,7 @@ Sequence::~Sequence() {
|
||||
|
||||
Sequence* Sequence::copy() {
|
||||
Sequence* s = new Sequence();
|
||||
s->name = name + " (copy)";
|
||||
s->name = QCoreApplication::translate("Sequence", "%1 (copy)").arg(name);
|
||||
s->width = width;
|
||||
s->height = height;
|
||||
s->frame_rate = frame_rate;
|
||||
|
||||
+20
-16
@@ -49,10 +49,10 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
|
||||
selected_items = items;
|
||||
|
||||
QAction* import_action = menu.addAction("Import...");
|
||||
QAction* import_action = menu.addAction(tr("Import..."));
|
||||
QObject::connect(import_action, SIGNAL(triggered(bool)), project_parent, SLOT(import_dialog()));
|
||||
|
||||
QMenu* new_menu = menu.addMenu("New");
|
||||
QMenu* new_menu = menu.addMenu(tr("New"));
|
||||
mainWindow->make_new_menu(new_menu);
|
||||
|
||||
if (items.size() > 0) {
|
||||
@@ -62,20 +62,20 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
// replace footage
|
||||
int type = m->get_type();
|
||||
if (type == MEDIA_TYPE_FOOTAGE) {
|
||||
QAction* replace_action = menu.addAction("Replace/Relink Media");
|
||||
QAction* replace_action = menu.addAction(tr("Replace/Relink Media"));
|
||||
QObject::connect(replace_action, SIGNAL(triggered(bool)), project_parent, SLOT(replace_selected_file()));
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in Explorer");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in Explorer"));
|
||||
#elif defined(Q_OS_MAC)
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in Finder");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in Finder"));
|
||||
#else
|
||||
QAction* reveal_in_explorer = menu.addAction("Reveal in File Manager");
|
||||
QAction* reveal_in_explorer = menu.addAction(tr("Reveal in File Manager"));
|
||||
#endif
|
||||
QObject::connect(reveal_in_explorer, SIGNAL(triggered(bool)), this, SLOT(reveal_in_browser()));
|
||||
}
|
||||
if (type != MEDIA_TYPE_FOLDER) {
|
||||
QAction* replace_clip_media = menu.addAction("Replace Clips Using This Media");
|
||||
QAction* replace_clip_media = menu.addAction(tr("Replace Clips Using This Media"));
|
||||
QObject::connect(replace_clip_media, SIGNAL(triggered(bool)), project_parent, SLOT(replace_clip_media()));
|
||||
}
|
||||
}
|
||||
@@ -93,41 +93,41 @@ void SourcesCommon::show_context_menu(QWidget* parent, const QModelIndexList& it
|
||||
}
|
||||
|
||||
// create sequence from
|
||||
QAction* create_seq_from = menu.addAction("Create Sequence With This Media");
|
||||
QAction* create_seq_from = menu.addAction(tr("Create Sequence With This Media"));
|
||||
QObject::connect(create_seq_from, SIGNAL(triggered(bool)), this, SLOT(create_seq_from_selected()));
|
||||
|
||||
// ONLY sequences are selected
|
||||
if (all_sequences) {
|
||||
// ONLY sequences are selected
|
||||
QAction* duplicate_action = menu.addAction("Duplicate");
|
||||
QAction* duplicate_action = menu.addAction(tr("Duplicate"));
|
||||
QObject::connect(duplicate_action, SIGNAL(triggered(bool)), project_parent, SLOT(duplicate_selected()));
|
||||
}
|
||||
|
||||
// ONLY footage is selected
|
||||
if (all_footage) {
|
||||
QAction* delete_footage_from_sequences = menu.addAction("Delete All Clips Using This Media");
|
||||
QAction* delete_footage_from_sequences = menu.addAction(tr("Delete All Clips Using This Media"));
|
||||
QObject::connect(delete_footage_from_sequences, SIGNAL(triggered(bool)), project_parent, SLOT(delete_clips_using_selected_media()));
|
||||
}
|
||||
|
||||
// delete media
|
||||
QAction* delete_action = menu.addAction("Delete");
|
||||
QAction* delete_action = menu.addAction(tr("Delete"));
|
||||
QObject::connect(delete_action, SIGNAL(triggered(bool)), project_parent, SLOT(delete_selected_media()));
|
||||
|
||||
if (items.size() == 1) {
|
||||
QAction* properties_action = menu.addAction("Properties...");
|
||||
QAction* properties_action = menu.addAction(tr("Properties..."));
|
||||
QObject::connect(properties_action, SIGNAL(triggered(bool)), project_parent, SLOT(open_properties()));
|
||||
}
|
||||
}
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* tree_view_action = menu.addAction("Tree View");
|
||||
QAction* tree_view_action = menu.addAction(tr("Tree View"));
|
||||
connect(tree_view_action, SIGNAL(triggered(bool)), project_parent, SLOT(set_tree_view()));
|
||||
|
||||
QAction* icon_view_action = menu.addAction("Icon View");
|
||||
QAction* icon_view_action = menu.addAction(tr("Icon View"));
|
||||
connect(icon_view_action, SIGNAL(triggered(bool)), project_parent, SLOT(set_icon_view()));
|
||||
|
||||
QAction* toolbar_action = menu.addAction("Show Toolbar");
|
||||
QAction* toolbar_action = menu.addAction(tr("Show Toolbar"));
|
||||
toolbar_action->setCheckable(true);
|
||||
toolbar_action->setChecked(project_parent->toolbar_widget->isVisible());
|
||||
connect(toolbar_action, SIGNAL(triggered(bool)), project_parent->toolbar_widget, SLOT(setVisible(bool)));
|
||||
@@ -183,7 +183,11 @@ void SourcesCommon::dropEvent(QWidget* parent, QDropEvent *event, const QModelIn
|
||||
&& m->get_type() == MEDIA_TYPE_FOOTAGE
|
||||
&& !QFileInfo(paths.at(0)).isDir()
|
||||
&& config.drop_on_media_to_replace
|
||||
&& QMessageBox::question(parent, "Replace Media", "You dropped a file onto '" + m->get_name() + "'. Would you like to replace it with the dropped file?", QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
|
||||
&& QMessageBox::question(
|
||||
parent,
|
||||
tr("Replace Media"),
|
||||
tr("You dropped a file onto '%1'. Would you like to replace it with the dropped file?").arg(m->get_name()),
|
||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) {
|
||||
replace = true;
|
||||
project_parent->replace_media(m, paths.at(0));
|
||||
}
|
||||
|
||||
@@ -19,12 +19,13 @@
|
||||
#include "panels/timeline.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QCoreApplication>
|
||||
|
||||
Transition::Transition(Clip* c, Clip* s, const EffectMeta* em) :
|
||||
Effect(c, em), secondary_clip(s),
|
||||
length(30)
|
||||
{
|
||||
length_field = add_row("Length:", false)->add_field(EFFECT_FIELD_DOUBLE, "length");
|
||||
length_field = add_row(tr("Length:"), false)->add_field(EFFECT_FIELD_DOUBLE, "length");
|
||||
connect(length_field, SIGNAL(changed()), this, SLOT(set_length_from_slider()));
|
||||
length_field->set_double_default_value(30);
|
||||
length_field->set_double_minimum_value(0);
|
||||
@@ -74,7 +75,10 @@ Transition* get_transition_from_meta(Clip* c, Clip* s, const EffectMeta* em) {
|
||||
}
|
||||
} else {
|
||||
qCritical() << "Invalid transition data";
|
||||
QMessageBox::critical(mainWindow, "Invalid transition", "No candidate for transition '" + em->name + "'. This transition may be corrupt. Try reinstalling it or Olive.");
|
||||
QMessageBox::critical(mainWindow,
|
||||
QCoreApplication::translate("transition", "Invalid transition"),
|
||||
QCoreApplication::translate("transition", "No candidate for transition '%1'. This transition may be corrupt. Try reinstalling it or Olive.").arg(em->name)
|
||||
);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ CollapsibleWidget::CollapsibleWidget(QWidget* parent) : QWidget(parent) {
|
||||
collapse_button = new QPushButton();
|
||||
collapse_button->setIconSize(QSize(8, 8));
|
||||
collapse_button->setStyleSheet("QPushButton { border: none; }");
|
||||
setText("<untitled>");
|
||||
setText(tr("<untitled>"));
|
||||
title_bar_layout->addWidget(collapse_button);
|
||||
title_bar_layout->addWidget(enabled_check);
|
||||
title_bar_layout->addWidget(header);
|
||||
|
||||
+14
-14
@@ -5,18 +5,18 @@
|
||||
#include <QColorDialog>
|
||||
|
||||
ColorButton::ColorButton(QWidget *parent)
|
||||
: QPushButton(parent), color(Qt::white) {
|
||||
set_button_color();
|
||||
connect(this, SIGNAL(clicked(bool)), this, SLOT(open_dialog()));
|
||||
: QPushButton(parent), color(Qt::white) {
|
||||
set_button_color();
|
||||
connect(this, SIGNAL(clicked(bool)), this, SLOT(open_dialog()));
|
||||
}
|
||||
|
||||
QColor ColorButton::get_color() {
|
||||
return color;
|
||||
return color;
|
||||
}
|
||||
|
||||
void ColorButton::set_color(QColor c) {
|
||||
previousColor = color;
|
||||
color = c;
|
||||
color = c;
|
||||
set_button_color();
|
||||
}
|
||||
|
||||
@@ -25,27 +25,27 @@ const QColor &ColorButton::getPreviousValue() {
|
||||
}
|
||||
|
||||
void ColorButton::set_button_color() {
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::Button, color);
|
||||
setPalette(pal);
|
||||
QPalette pal = palette();
|
||||
pal.setColor(QPalette::Button, color);
|
||||
setPalette(pal);
|
||||
}
|
||||
|
||||
void ColorButton::open_dialog() {
|
||||
QColor new_color = QColorDialog::getColor(color, nullptr, "Set Color");
|
||||
QColor new_color = QColorDialog::getColor(color, nullptr, tr("Set Color"));
|
||||
if (new_color.isValid() && color != new_color) {
|
||||
set_color(new_color);
|
||||
set_button_color();
|
||||
set_button_color();
|
||||
emit color_changed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColorCommand::ColorCommand(ColorButton* s, QColor o, QColor n)
|
||||
: sender(s), old_color(o), new_color(n) {}
|
||||
: sender(s), old_color(o), new_color(n) {}
|
||||
|
||||
void ColorCommand::undo() {
|
||||
sender->set_color(old_color);
|
||||
sender->set_color(old_color);
|
||||
}
|
||||
|
||||
void ColorCommand::redo() {
|
||||
sender->set_color(new_color);
|
||||
sender->set_color(new_color);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ void EmbeddedFileChooser::setFilename(const QString &s) {
|
||||
}
|
||||
|
||||
void EmbeddedFileChooser::update_label() {
|
||||
QString l = "<html>File: ";
|
||||
QString l = "<html>" + tr("File:") + " ";
|
||||
if (filename.isEmpty()) {
|
||||
l += "(none)";
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -58,14 +58,14 @@ GraphView::GraphView(QWidget* parent) :
|
||||
void GraphView::show_context_menu(const QPoint& pos) {
|
||||
QMenu menu(this);
|
||||
|
||||
QAction* zoom_to_selection = menu.addAction("Zoom to Selection");
|
||||
QAction* zoom_to_selection = menu.addAction(tr("Zoom to Selection"));
|
||||
if (selected_keys.size() == 0 || row == nullptr) {
|
||||
zoom_to_selection->setEnabled(false);
|
||||
} else {
|
||||
connect(zoom_to_selection, SIGNAL(triggered(bool)), this, SLOT(set_view_to_selection()));
|
||||
}
|
||||
|
||||
QAction* zoom_to_all = menu.addAction("Zoom to Show All");
|
||||
QAction* zoom_to_all = menu.addAction(tr("Zoom to Show All"));
|
||||
if (row == nullptr) {
|
||||
zoom_to_all->setEnabled(false);
|
||||
} else {
|
||||
@@ -74,7 +74,7 @@ void GraphView::show_context_menu(const QPoint& pos) {
|
||||
|
||||
menu.addSeparator();
|
||||
|
||||
QAction* reset_action = menu.addAction("Reset View");
|
||||
QAction* reset_action = menu.addAction(tr("Reset View"));
|
||||
if (row == nullptr) {
|
||||
reset_action->setEnabled(false);
|
||||
} else {
|
||||
|
||||
@@ -53,7 +53,7 @@ KeyframeNavigator::KeyframeNavigator(QWidget *parent) : QWidget(parent) {
|
||||
keyframe_enable->setMaximumSize(button_size);
|
||||
keyframe_enable->setIconSize(clock_size);
|
||||
keyframe_enable->setCheckable(true);
|
||||
keyframe_enable->setToolTip("Enable Keyframes");
|
||||
keyframe_enable->setToolTip(tr("Enable Keyframes"));
|
||||
connect(keyframe_enable, SIGNAL(clicked(bool)), this, SIGNAL(keyframe_enabled_changed(bool)));
|
||||
connect(keyframe_enable, SIGNAL(toggled(bool)), this, SLOT(keyframe_ui_enabled(bool)));
|
||||
connect(keyframe_enable, SIGNAL(clicked(bool)), this, SIGNAL(clicked()));
|
||||
|
||||
+3
-3
@@ -50,11 +50,11 @@ void KeyframeView::show_context_menu(const QPoint& pos) {
|
||||
if (selected_fields.size() > 0) {
|
||||
QMenu menu(this);
|
||||
|
||||
QAction* linear = menu.addAction("Linear");
|
||||
QAction* linear = menu.addAction(tr("Linear"));
|
||||
linear->setData(KEYFRAME_TYPE_LINEAR);
|
||||
QAction* bezier = menu.addAction("Bezier");
|
||||
QAction* bezier = menu.addAction(tr("Bezier"));
|
||||
bezier->setData(KEYFRAME_TYPE_BEZIER);
|
||||
QAction* hold = menu.addAction("Hold");
|
||||
QAction* hold = menu.addAction(tr("Hold"));
|
||||
hold->setData(KEYFRAME_TYPE_HOLD);
|
||||
menu.addSeparator();
|
||||
menu.addAction("Graph Editor");
|
||||
|
||||
+4
-4
@@ -147,8 +147,8 @@ void LabelSlider::mouseReleaseEvent(QMouseEvent*) {
|
||||
if (display_type == LABELSLIDER_FRAMENUMBER) {
|
||||
QString s = QInputDialog::getText(
|
||||
this,
|
||||
"Set Value",
|
||||
"New value:",
|
||||
tr("Set Value"),
|
||||
tr("New value:"),
|
||||
QLineEdit::Normal,
|
||||
valueToString(internal_value)
|
||||
);
|
||||
@@ -158,8 +158,8 @@ void LabelSlider::mouseReleaseEvent(QMouseEvent*) {
|
||||
bool ok;
|
||||
d = QInputDialog::getDouble(
|
||||
this,
|
||||
"Set Value",
|
||||
"New value:",
|
||||
tr("Set Value"),
|
||||
tr("New value:"),
|
||||
(display_type == LABELSLIDER_PERCENT) ? internal_value * 100 : internal_value,
|
||||
(min_enabled) ? min_value : INT_MIN,
|
||||
(max_enabled) ? max_value : INT_MAX,
|
||||
|
||||
+15
-13
@@ -221,10 +221,12 @@ void TimelineWidget::tooltip_timer_timeout() {
|
||||
Clip* c = sequence->clips.at(tooltip_clip);
|
||||
if (c != nullptr) {
|
||||
QToolTip::showText(QCursor::pos(),
|
||||
c->name
|
||||
+ "\nStart: " + frame_to_timecode(c->timeline_in, config.timecode_view, sequence->frame_rate)
|
||||
+ "\nEnd: " + frame_to_timecode(c->timeline_out, config.timecode_view, sequence->frame_rate)
|
||||
+ "\nDuration: " + frame_to_timecode(c->getLength(), config.timecode_view, sequence->frame_rate));
|
||||
tr("%1\nStart: %2\nEnd: %3\nDuration: %4").arg(
|
||||
c->name,
|
||||
frame_to_timecode(c->timeline_in, config.timecode_view, sequence->frame_rate),
|
||||
frame_to_timecode(c->timeline_out, config.timecode_view, sequence->frame_rate),
|
||||
frame_to_timecode(c->getLength(), config.timecode_view, sequence->frame_rate)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,8 +243,8 @@ void TimelineWidget::rename_clip() {
|
||||
}
|
||||
if (selected_clips.size() > 0) {
|
||||
QString s = QInputDialog::getText(this,
|
||||
(selected_clips.size() == 1) ? "Rename '" + selected_clips.at(0)->name + "'" : "Rename multiple clips",
|
||||
"Enter a new name for this clip:",
|
||||
(selected_clips.size() == 1) ? tr("Rename '%1'").arg(selected_clips.at(0)->name) : tr("Rename multiple clips"),
|
||||
tr("Enter a new name for this clip:"),
|
||||
QLineEdit::Normal,
|
||||
selected_clips.at(0)->name
|
||||
);
|
||||
@@ -275,7 +277,7 @@ void TimelineWidget::open_sequence_properties() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
QMessageBox::critical(this, "Error", "Couldn't locate media wrapper for sequence.");
|
||||
QMessageBox::critical(this, tr("Error"), tr("Couldn't locate media wrapper for sequence."));
|
||||
}
|
||||
|
||||
bool same_sign(int a, int b) {
|
||||
@@ -827,27 +829,27 @@ void TimelineWidget::mouseReleaseEvent(QMouseEvent *event) {
|
||||
|
||||
switch (panel_timeline->creating_object) {
|
||||
case ADD_OBJ_TITLE:
|
||||
c->name = "Title";
|
||||
c->name = tr("Title");
|
||||
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_TEXT, EFFECT_TYPE_EFFECT)));
|
||||
break;
|
||||
case ADD_OBJ_SOLID:
|
||||
c->name = "Solid Color";
|
||||
c->name = tr("Solid Color");
|
||||
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_SOLID, EFFECT_TYPE_EFFECT)));
|
||||
break;
|
||||
case ADD_OBJ_BARS:
|
||||
{
|
||||
c->name = "Bars";
|
||||
c->name = tr("Bars");
|
||||
Effect* e = create_effect(c, get_internal_meta(EFFECT_INTERNAL_SOLID, EFFECT_TYPE_EFFECT));
|
||||
e->row(0)->field(0)->set_combo_index(1);
|
||||
c->effects.append(e);
|
||||
}
|
||||
break;
|
||||
case ADD_OBJ_TONE:
|
||||
c->name = "Tone";
|
||||
c->name = tr("Tone");
|
||||
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_TONE, EFFECT_TYPE_EFFECT)));
|
||||
break;
|
||||
case ADD_OBJ_NOISE:
|
||||
c->name = "Noise";
|
||||
c->name = tr("Noise");
|
||||
c->effects.append(create_effect(c, get_internal_meta(EFFECT_INTERNAL_NOISE, EFFECT_TYPE_EFFECT)));
|
||||
break;
|
||||
}
|
||||
@@ -1575,7 +1577,7 @@ void TimelineWidget::update_ghosts(const QPoint& mouse_pos, bool lock_frame) {
|
||||
}
|
||||
|
||||
if (g != nullptr) {
|
||||
tip += " Duration: ";
|
||||
tip += " " + tr("Duration:") + " ";
|
||||
long len = (g->old_out-g->old_in);
|
||||
if (panel_timeline->trim_in_point) {
|
||||
len -= frame_diff;
|
||||
|
||||
+20
-17
@@ -48,10 +48,10 @@ ViewerWidget::ViewerWidget(QWidget *parent) :
|
||||
QOpenGLWidget(parent),
|
||||
default_fbo(nullptr),
|
||||
waveform(false),
|
||||
dragging(false),
|
||||
selected_gizmo(nullptr),
|
||||
waveform_zoom(1.0),
|
||||
waveform_scroll(0)
|
||||
waveform_scroll(0),
|
||||
dragging(false),
|
||||
selected_gizmo(nullptr)
|
||||
{
|
||||
setMouseTracking(true);
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
@@ -87,14 +87,14 @@ void ViewerWidget::set_waveform_scroll(int s) {
|
||||
void ViewerWidget::show_context_menu() {
|
||||
QMenu menu(this);
|
||||
|
||||
QAction* save_frame_as_image = menu.addAction("Save Frame as Image...");
|
||||
QAction* save_frame_as_image = menu.addAction(tr("Save Frame as Image..."));
|
||||
connect(save_frame_as_image, SIGNAL(triggered(bool)), this, SLOT(save_frame()));
|
||||
|
||||
QAction* show_fullscreen_action = menu.addAction("Show Fullscreen");
|
||||
QAction* show_fullscreen_action = menu.addAction(tr("Show Fullscreen"));
|
||||
connect(show_fullscreen_action, SIGNAL(triggered()), this, SLOT(show_fullscreen()));
|
||||
|
||||
QMenu zoom_menu("Zoom");
|
||||
QAction* fit_zoom = zoom_menu.addAction("Fit");
|
||||
QMenu zoom_menu(tr("Zoom"));
|
||||
QAction* fit_zoom = zoom_menu.addAction(tr("Fit"));
|
||||
connect(fit_zoom, SIGNAL(triggered(bool)), this, SLOT(set_fit_zoom()));
|
||||
zoom_menu.addAction("10%")->setData(0.1);
|
||||
zoom_menu.addAction("25%")->setData(0.25);
|
||||
@@ -104,13 +104,13 @@ void ViewerWidget::show_context_menu() {
|
||||
zoom_menu.addAction("150%")->setData(1.5);
|
||||
zoom_menu.addAction("200%")->setData(2.0);
|
||||
zoom_menu.addAction("400%")->setData(4.0);
|
||||
QAction* custom_zoom = zoom_menu.addAction("Custom");
|
||||
QAction* custom_zoom = zoom_menu.addAction(tr("Custom"));
|
||||
connect(custom_zoom, SIGNAL(triggered(bool)), this, SLOT(set_custom_zoom()));
|
||||
connect(&zoom_menu, SIGNAL(triggered(QAction*)), this, SLOT(set_menu_zoom(QAction*)));
|
||||
menu.addMenu(&zoom_menu);
|
||||
|
||||
if (!viewer->is_main_sequence()) {
|
||||
menu.addAction("Close Media", viewer, SLOT(close_media()));
|
||||
menu.addAction(tr("Close Media"), viewer, SLOT(close_media()));
|
||||
}
|
||||
|
||||
menu.exec(QCursor::pos());
|
||||
@@ -120,7 +120,7 @@ void ViewerWidget::save_frame() {
|
||||
QFileDialog fd(this);
|
||||
fd.setAcceptMode(QFileDialog::AcceptSave);
|
||||
fd.setFileMode(QFileDialog::AnyFile);
|
||||
fd.setWindowTitle("Save Frame");
|
||||
fd.setWindowTitle(tr("Save Frame"));
|
||||
fd.setNameFilter("Portable Network Graphic (*.png);;JPEG (*.jpg);;Windows Bitmap (*.bmp);;Portable Pixmap (*.ppm);;X11 Bitmap (*.xbm);;X11 Pixmap (*.xpm)");
|
||||
|
||||
if (fd.exec()) {
|
||||
@@ -159,7 +159,10 @@ void ViewerWidget::set_fit_zoom() {
|
||||
|
||||
void ViewerWidget::set_custom_zoom() {
|
||||
bool ok;
|
||||
double d = QInputDialog::getDouble(this, "Viewer Zoom", "Set Custom Zoom Value:", container->zoom*100, 0, 2147483647, 2, &ok);
|
||||
double d = QInputDialog::getDouble(this,
|
||||
tr("Viewer Zoom"),
|
||||
tr("Set Custom Zoom Value:"),
|
||||
container->zoom*100, 0, 2147483647, 2, &ok);
|
||||
if (ok) {
|
||||
container->fit = false;
|
||||
container->zoom = d*0.01;
|
||||
@@ -205,7 +208,7 @@ void ViewerWidget::seek_from_click(int x) {
|
||||
|
||||
EffectGizmo* ViewerWidget::get_gizmo_from_mouse(int x, int y) {
|
||||
if (gizmos != nullptr) {
|
||||
double multiplier = (double) viewer->seq->width / (double) width();
|
||||
double multiplier = double(viewer->seq->width) / double(width());
|
||||
QPoint mouse_pos(qRound(x*multiplier), qRound(y*multiplier));
|
||||
int dot_size = 2 * qRound(GIZMO_DOT_SIZE * multiplier);
|
||||
int target_size = 2 * qRound(GIZMO_TARGET_SIZE * multiplier);
|
||||
@@ -243,7 +246,7 @@ EffectGizmo* ViewerWidget::get_gizmo_from_mouse(int x, int y) {
|
||||
|
||||
void ViewerWidget::move_gizmos(QMouseEvent *event, bool done) {
|
||||
if (selected_gizmo != nullptr) {
|
||||
double multiplier = (double) viewer->seq->width / (double) width();
|
||||
double multiplier = double(viewer->seq->width) / double(width());
|
||||
|
||||
int x_movement = (event->pos().x() - drag_start_x)*multiplier;
|
||||
int y_movement = (event->pos().y() - drag_start_y)*multiplier;
|
||||
@@ -431,9 +434,9 @@ void ViewerWidget::process_effect(Clip* c, Effect* e, double timecode, GLTexture
|
||||
if (e->enable_coords) {
|
||||
e->process_coords(timecode, coords, data);
|
||||
}
|
||||
if ((e->enable_shader && shaders_are_enabled) || e->enable_superimpose) {
|
||||
if ((e->enable_shader && shaders_are_enabled) || e->enable_superimpose) {
|
||||
e->startEffect();
|
||||
if ((e->enable_shader && shaders_are_enabled) && e->is_glsl_linked()) {
|
||||
if ((e->enable_shader && shaders_are_enabled) && e->is_glsl_linked()) {
|
||||
e->process_shader(timecode, coords);
|
||||
composite_texture = draw_clip(c->fbo[fbo_switcher], composite_texture, true);
|
||||
fbo_switcher = !fbo_switcher;
|
||||
@@ -635,8 +638,8 @@ GLuint ViewerWidget::compose_sequence(QVector<Clip*>& nests, bool render_audio)
|
||||
|
||||
// set up autoscale
|
||||
if (c->autoscale && (video_width != s->width && video_height != s->height)) {
|
||||
float width_multiplier = (float) s->width / (float) video_width;
|
||||
float height_multiplier = (float) s->height / (float) video_height;
|
||||
float width_multiplier = float(s->width) / float(video_width);
|
||||
float height_multiplier = float(s->height) / float(video_height);
|
||||
float scale_multiplier = qMin(width_multiplier, height_multiplier);
|
||||
glScalef(scale_multiplier, scale_multiplier, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user