diff --git a/src/mkvtoolnix-gui/merge/input.cpp b/src/mkvtoolnix-gui/merge/input.cpp index 785253365..c750d7e95 100644 --- a/src/mkvtoolnix-gui/merge/input.cpp +++ b/src/mkvtoolnix-gui/merge/input.cpp @@ -338,103 +338,103 @@ Tab::setupInputControls() { auto mw = MainWindow::get(); using CMSAction = Util::Settings::ClearMergeSettingsAction; - connect(p.ui->aacIsSBR, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onAacIsSBRChanged); - connect(p.ui->addFiles, &QToolButton::clicked, this, &Tab::onAddFiles); - connect(p.ui->addToJobQueue, &QPushButton::clicked, this, [=]() { addToJobQueue(false); }); - connect(p.ui->additionalTrackOptions, &QLineEdit::textChanged, this, &Tab::onAdditionalTrackOptionsChanged); - connect(p.ui->aspectRatio, &QComboBox::currentTextChanged, this, &Tab::onAspectRatioChanged); - connect(p.ui->aspectRatio, &QComboBox::editTextChanged, this, &Tab::onAspectRatioChanged); - connect(p.ui->browseTimestamps, &QPushButton::clicked, this, &Tab::onBrowseTimestamps); - connect(p.ui->browseTrackTags, &QPushButton::clicked, this, &Tab::onBrowseTrackTags); - connect(p.ui->compression, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onCompressionChanged); - connect(p.ui->cropping, &QLineEdit::textChanged, this, &Tab::onCroppingChanged); - connect(p.ui->cues, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onCuesChanged); - connect(p.ui->defaultDuration, &QComboBox::currentTextChanged, this, &Tab::onDefaultDurationChanged); - connect(p.ui->defaultDuration, &QComboBox::editTextChanged, this, &Tab::onDefaultDurationChanged); - connect(p.ui->defaultTrackFlag, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onDefaultTrackFlagChanged); - connect(p.ui->delay, &QLineEdit::textChanged, this, &Tab::onDelayChanged); - connect(p.ui->displayHeight, &QLineEdit::textChanged, this, &Tab::onDisplayHeightChanged); - connect(p.ui->displayWidth, &QLineEdit::textChanged, this, &Tab::onDisplayWidthChanged); - connect(p.ui->editAdditionalOptions, &QPushButton::clicked, this, &Tab::onEditAdditionalOptions); - connect(p.ui->files, &Util::BasicTreeView::ctrlDownPressed, this, &Tab::onMoveFilesDown); - connect(p.ui->files, &Util::BasicTreeView::ctrlUpPressed, this, &Tab::onMoveFilesUp); - connect(p.ui->files, &Util::BasicTreeView::customContextMenuRequested, this, &Tab::showFilesContextMenu); - connect(p.ui->files, &Util::BasicTreeView::deletePressed, this, &Tab::onRemoveFiles); - connect(p.ui->files, &Util::BasicTreeView::insertPressed, this, &Tab::onAddFiles); - connect(p.ui->files, &Util::BasicTreeView::filesDropped, this, &Tab::addOrAppendDroppedFiles); - connect(p.ui->files->selectionModel(), &QItemSelectionModel::selectionChanged, p.filesModel, &SourceFileModel::updateSelectionStatus); - connect(p.ui->files->selectionModel(), &QItemSelectionModel::selectionChanged, this, &Tab::enableMoveFilesButtons); - connect(p.ui->fixBitstreamTimingInfo, &QCheckBox::toggled, this, &Tab::onFixBitstreamTimingInfoChanged); - connect(p.ui->forcedTrackFlag, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onForcedTrackFlagChanged); - connect(p.ui->moveFilesDown, &QPushButton::clicked, this, &Tab::onMoveFilesDown); - connect(p.ui->moveFilesUp, &QPushButton::clicked, this, &Tab::onMoveFilesUp); - connect(p.ui->moveTracksDown, &QPushButton::clicked, this, &Tab::onMoveTracksDown); - connect(p.ui->moveTracksUp, &QPushButton::clicked, this, &Tab::onMoveTracksUp); - connect(p.ui->muxThis, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onMuxThisChanged); - connect(p.ui->naluSizeLength, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onNaluSizeLengthChanged); - connect(p.ui->reduceToAudioCore, &QCheckBox::toggled, this, &Tab::onReduceAudioToCoreChanged); - connect(p.ui->removeDialogNormalizationGain, &QCheckBox::toggled, this, &Tab::onRemoveDialogNormalizationGainChanged); - connect(p.ui->setAspectRatio, &QPushButton::clicked, this, &Tab::onSetAspectRatio); - connect(p.ui->setDisplayWidthHeight, &QPushButton::clicked, this, &Tab::onSetDisplayDimensions); - connect(p.ui->startMuxing, &QPushButton::clicked, this, [=]() { addToJobQueue(true); }); - connect(p.ui->stereoscopy, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onStereoscopyChanged); - connect(p.ui->stretchBy, &QLineEdit::textChanged, this, &Tab::onStretchByChanged); - connect(p.ui->subtitleCharacterSet, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onSubtitleCharacterSetChanged); - connect(p.ui->subtitleCharacterSetPreview, &QPushButton::clicked, this, &Tab::onPreviewSubtitleCharacterSet); - connect(p.ui->timestamps, &QLineEdit::textChanged, this, &Tab::onTimestampsChanged); - connect(p.ui->trackLanguage, &Util::LanguageDisplayWidget::languageChanged, this, &Tab::onTrackLanguageChanged); - connect(p.ui->trackName, &QComboBox::editTextChanged, this, &Tab::onTrackNameChanged); - connect(p.ui->trackTags, &QLineEdit::textChanged, this, &Tab::onTrackTagsChanged); - connect(p.ui->tracks, &QTreeView::doubleClicked, this, &Tab::toggleMuxThisForSelectedTracks); - connect(p.ui->tracks, &Util::BasicTreeView::allSelectedActivated, this, &Tab::toggleMuxThisForSelectedTracks); - connect(p.ui->tracks, &Util::BasicTreeView::ctrlDownPressed, this, &Tab::onMoveTracksDown); - connect(p.ui->tracks, &Util::BasicTreeView::ctrlUpPressed, this, &Tab::onMoveTracksUp); - connect(p.ui->tracks, &Util::BasicTreeView::customContextMenuRequested, this, &Tab::showTracksContextMenu); - connect(p.ui->tracks, &Util::BasicTreeView::filesDropped, this, &Tab::addOrAppendDroppedFiles); - connect(p.ui->tracks->selectionModel(), &QItemSelectionModel::selectionChanged, p.tracksModel, &TrackModel::updateSelectionStatus); - connect(p.ui->tracks->selectionModel(), &QItemSelectionModel::selectionChanged, this, &Tab::onTrackSelectionChanged); + connect(p.ui->aacIsSBR, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onAacIsSBRChanged); + connect(p.ui->addFiles, &QToolButton::clicked, this, &Tab::onAddFiles); + connect(p.ui->addToJobQueue, &QPushButton::clicked, this, [=]() { addToJobQueue(false); }); + connect(p.ui->additionalTrackOptions, &QLineEdit::textChanged, this, &Tab::onAdditionalTrackOptionsChanged); + connect(p.ui->aspectRatio, &QComboBox::currentTextChanged, this, &Tab::onAspectRatioChanged); + connect(p.ui->aspectRatio, &QComboBox::editTextChanged, this, &Tab::onAspectRatioChanged); + connect(p.ui->browseTimestamps, &QPushButton::clicked, this, &Tab::onBrowseTimestamps); + connect(p.ui->browseTrackTags, &QPushButton::clicked, this, &Tab::onBrowseTrackTags); + connect(p.ui->compression, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onCompressionChanged); + connect(p.ui->cropping, &QLineEdit::textChanged, this, &Tab::onCroppingChanged); + connect(p.ui->cues, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onCuesChanged); + connect(p.ui->defaultDuration, &QComboBox::currentTextChanged, this, &Tab::onDefaultDurationChanged); + connect(p.ui->defaultDuration, &QComboBox::editTextChanged, this, &Tab::onDefaultDurationChanged); + connect(p.ui->defaultTrackFlag, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onDefaultTrackFlagChanged); + connect(p.ui->delay, &QLineEdit::textChanged, this, &Tab::onDelayChanged); + connect(p.ui->displayHeight, &QLineEdit::textChanged, this, &Tab::onDisplayHeightChanged); + connect(p.ui->displayWidth, &QLineEdit::textChanged, this, &Tab::onDisplayWidthChanged); + connect(p.ui->editAdditionalOptions, &QPushButton::clicked, this, &Tab::onEditAdditionalOptions); + connect(p.ui->files, &Util::BasicTreeView::ctrlDownPressed, this, &Tab::onMoveFilesDown); + connect(p.ui->files, &Util::BasicTreeView::ctrlUpPressed, this, &Tab::onMoveFilesUp); + connect(p.ui->files, &Util::BasicTreeView::customContextMenuRequested, this, &Tab::showFilesContextMenu); + connect(p.ui->files, &Util::BasicTreeView::deletePressed, this, &Tab::onRemoveFiles); + connect(p.ui->files, &Util::BasicTreeView::insertPressed, this, &Tab::onAddFiles); + connect(p.ui->files, &Util::BasicTreeView::filesDropped, this, &Tab::addOrAppendDroppedFiles); + connect(p.ui->files->selectionModel(), &QItemSelectionModel::selectionChanged, p.filesModel, &SourceFileModel::updateSelectionStatus); + connect(p.ui->files->selectionModel(), &QItemSelectionModel::selectionChanged, this, &Tab::enableMoveFilesButtons); + connect(p.ui->fixBitstreamTimingInfo, &QCheckBox::toggled, this, &Tab::onFixBitstreamTimingInfoChanged); + connect(p.ui->forcedTrackFlag, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onForcedTrackFlagChanged); + connect(p.ui->moveFilesDown, &QPushButton::clicked, this, &Tab::onMoveFilesDown); + connect(p.ui->moveFilesUp, &QPushButton::clicked, this, &Tab::onMoveFilesUp); + connect(p.ui->moveTracksDown, &QPushButton::clicked, this, &Tab::onMoveTracksDown); + connect(p.ui->moveTracksUp, &QPushButton::clicked, this, &Tab::onMoveTracksUp); + connect(p.ui->muxThis, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onMuxThisChanged); + connect(p.ui->naluSizeLength, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onNaluSizeLengthChanged); + connect(p.ui->reduceToAudioCore, &QCheckBox::toggled, this, &Tab::onReduceAudioToCoreChanged); + connect(p.ui->removeDialogNormalizationGain, &QCheckBox::toggled, this, &Tab::onRemoveDialogNormalizationGainChanged); + connect(p.ui->setAspectRatio, &QPushButton::clicked, this, &Tab::onSetAspectRatio); + connect(p.ui->setDisplayWidthHeight, &QPushButton::clicked, this, &Tab::onSetDisplayDimensions); + connect(p.ui->startMuxing, &QPushButton::clicked, this, [=]() { addToJobQueue(true); }); + connect(p.ui->stereoscopy, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onStereoscopyChanged); + connect(p.ui->stretchBy, &QLineEdit::textChanged, this, &Tab::onStretchByChanged); + connect(p.ui->subtitleCharacterSet, static_cast(&QComboBox::currentIndexChanged), this, &Tab::onSubtitleCharacterSetChanged); + connect(p.ui->subtitleCharacterSetPreview, &QPushButton::clicked, this, &Tab::onPreviewSubtitleCharacterSet); + connect(p.ui->timestamps, &QLineEdit::textChanged, this, &Tab::onTimestampsChanged); + connect(p.ui->trackLanguage, &Util::LanguageDisplayWidget::languageChanged, this, &Tab::onTrackLanguageChanged); + connect(p.ui->trackName, &QComboBox::editTextChanged, this, &Tab::onTrackNameChanged); + connect(p.ui->trackTags, &QLineEdit::textChanged, this, &Tab::onTrackTagsChanged); + connect(p.ui->tracks, &QTreeView::doubleClicked, this, &Tab::toggleMuxThisForSelectedTracks); + connect(p.ui->tracks, &Util::BasicTreeView::allSelectedActivated, this, &Tab::toggleMuxThisForSelectedTracks); + connect(p.ui->tracks, &Util::BasicTreeView::ctrlDownPressed, this, &Tab::onMoveTracksDown); + connect(p.ui->tracks, &Util::BasicTreeView::ctrlUpPressed, this, &Tab::onMoveTracksUp); + connect(p.ui->tracks, &Util::BasicTreeView::customContextMenuRequested, this, &Tab::showTracksContextMenu); + connect(p.ui->tracks, &Util::BasicTreeView::filesDropped, this, &Tab::addOrAppendDroppedFiles); + connect(p.ui->tracks->selectionModel(), &QItemSelectionModel::selectionChanged, p.tracksModel, &TrackModel::updateSelectionStatus); + connect(p.ui->tracks->selectionModel(), &QItemSelectionModel::selectionChanged, this, &Tab::onTrackSelectionChanged); - connect(p.addFilesAction, &QAction::triggered, this, &Tab::onAddFiles); - connect(p.addFilesAction2, &QAction::triggered, this, &Tab::onAddFiles); - connect(p.appendFilesAction, &QAction::triggered, this, &Tab::onAppendFiles); - connect(p.appendFilesAction2, &QAction::triggered, this, &Tab::onAppendFiles); - connect(p.addAdditionalPartsAction, &QAction::triggered, this, &Tab::onAddAdditionalParts); - connect(p.addAdditionalPartsAction2, &QAction::triggered, this, &Tab::onAddAdditionalParts); - connect(p.removeFilesAction, &QAction::triggered, this, &Tab::onRemoveFiles); - connect(p.removeAllFilesAction, &QAction::triggered, this, &Tab::onRemoveAllFiles); - connect(p.setDestinationFileNameAction, &QAction::triggered, this, &Tab::setDestinationFileNameFromSelectedFile); - connect(p.openFilesInMediaInfoAction, &QAction::triggered, this, &Tab::onOpenFilesInMediaInfo); - connect(p.openTracksInMediaInfoAction, &QAction::triggered, this, &Tab::onOpenTracksInMediaInfo); + connect(p.addFilesAction, &QAction::triggered, this, &Tab::onAddFiles); + connect(p.addFilesAction2, &QAction::triggered, this, &Tab::onAddFiles); + connect(p.appendFilesAction, &QAction::triggered, this, &Tab::onAppendFiles); + connect(p.appendFilesAction2, &QAction::triggered, this, &Tab::onAppendFiles); + connect(p.addAdditionalPartsAction, &QAction::triggered, this, &Tab::onAddAdditionalParts); + connect(p.addAdditionalPartsAction2, &QAction::triggered, this, &Tab::onAddAdditionalParts); + connect(p.removeFilesAction, &QAction::triggered, this, &Tab::onRemoveFiles); + connect(p.removeAllFilesAction, &QAction::triggered, this, &Tab::onRemoveAllFiles); + connect(p.setDestinationFileNameAction, &QAction::triggered, this, &Tab::setDestinationFileNameFromSelectedFile); + connect(p.openFilesInMediaInfoAction, &QAction::triggered, this, &Tab::onOpenFilesInMediaInfo); + connect(p.openTracksInMediaInfoAction, &QAction::triggered, this, &Tab::onOpenTracksInMediaInfo); - connect(p.selectAllTracksAction, &QAction::triggered, this, &Tab::selectAllTracks); - connect(p.selectAllVideoTracksAction, &QAction::triggered, this, &Tab::selectAllVideoTracks); - connect(p.selectAllAudioTracksAction, &QAction::triggered, this, &Tab::selectAllAudioTracks); - connect(p.selectAllSubtitlesTracksAction, &QAction::triggered, this, &Tab::selectAllSubtitlesTracks); - connect(p.selectTracksFromFilesAction, &QAction::triggered, this, &Tab::selectAllTracksFromSelectedFiles); - connect(p.enableAllTracksAction, &QAction::triggered, this, &Tab::enableAllTracks); - connect(p.disableAllTracksAction, &QAction::triggered, this, &Tab::disableAllTracks); + connect(p.selectAllTracksAction, &QAction::triggered, this, &Tab::selectAllTracks); + connect(p.selectAllVideoTracksAction, &QAction::triggered, this, &Tab::selectAllVideoTracks); + connect(p.selectAllAudioTracksAction, &QAction::triggered, this, &Tab::selectAllAudioTracks); + connect(p.selectAllSubtitlesTracksAction, &QAction::triggered, this, &Tab::selectAllSubtitlesTracks); + connect(p.selectTracksFromFilesAction, &QAction::triggered, this, &Tab::selectAllTracksFromSelectedFiles); + connect(p.enableAllTracksAction, &QAction::triggered, this, &Tab::enableAllTracks); + connect(p.disableAllTracksAction, &QAction::triggered, this, &Tab::disableAllTracks); - connect(p.startMuxingLeaveAsIs, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::None); }); - connect(p.startMuxingCreateNewSettings, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::NewSettings); }); - connect(p.startMuxingCloseSettings, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::CloseSettings); }); - connect(p.startMuxingRemoveInputFiles, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::RemoveInputFiles); }); + connect(p.startMuxingLeaveAsIs, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::None); }); + connect(p.startMuxingCreateNewSettings, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::NewSettings); }); + connect(p.startMuxingCloseSettings, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::CloseSettings); }); + connect(p.startMuxingRemoveInputFiles, &QAction::triggered, this, [=]() { addToJobQueue(true, CMSAction::RemoveInputFiles); }); - connect(p.addToJobQueueLeaveAsIs, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::None); }); - connect(p.addToJobQueueCreateNewSettings, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::NewSettings); }); - connect(p.addToJobQueueCloseSettings, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::CloseSettings); }); - connect(p.addToJobQueueRemoveInputFiles, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::RemoveInputFiles); }); + connect(p.addToJobQueueLeaveAsIs, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::None); }); + connect(p.addToJobQueueCreateNewSettings, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::NewSettings); }); + connect(p.addToJobQueueCloseSettings, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::CloseSettings); }); + connect(p.addToJobQueueRemoveInputFiles, &QAction::triggered, this, [=]() { addToJobQueue(false, CMSAction::RemoveInputFiles); }); - connect(p.addFilesMenu, &QMenu::aboutToShow, this, &Tab::enableFilesActions); + connect(p.addFilesMenu, &QMenu::aboutToShow, this, &Tab::enableFilesActions); - connect(p.filesModel, &SourceFileModel::rowsInserted, this, &Tab::onFileRowsInserted); - connect(p.tracksModel, &TrackModel::rowsInserted, this, &Tab::onTrackRowsInserted); - connect(p.tracksModel, &TrackModel::itemChanged, this, &Tab::onTrackItemChanged); + connect(p.filesModel, &SourceFileModel::rowsInserted, this, &Tab::onFileRowsInserted); + connect(p.tracksModel, &TrackModel::rowsInserted, this, &Tab::onTrackRowsInserted); + connect(p.tracksModel, &TrackModel::itemChanged, this, &Tab::onTrackItemChanged); - connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupMoveUpDownButtons); - connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupInputLayout); - connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupPredefinedTrackNames); - connect(mw, &MainWindow::preferencesChanged, p.ui->subtitleCharacterSet, &Util::ComboBoxBase::reInitialize); - connect(mw, &MainWindow::preferencesChanged, p.ui->chapterCharacterSet, &Util::ComboBoxBase::reInitialize); + connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupMoveUpDownButtons); + connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupInputLayout); + connect(mw, &MainWindow::preferencesChanged, this, &Tab::setupPredefinedTrackNames); + connect(mw, &MainWindow::preferencesChanged, p.ui->subtitleCharacterSet, &Util::ComboBoxBase::reInitialize); + connect(mw, &MainWindow::preferencesChanged, p.ui->chapterCharacterSet, &Util::ComboBoxBase::reInitialize); enableMoveFilesButtons(); onTrackSelectionChanged();