GUI: merge: remove the "mux this" column from the track list

The "codec" column contains a checklist that shows the same information
by now. Therefore "mux this" is superfluous.
This commit is contained in:
Moritz Bunkus 2015-12-23 19:08:26 +01:00
parent cd3acf5b26
commit 20188b5eea

View File

@ -43,7 +43,6 @@ TrackModel::retranslateUi() {
Util::setDisplayableAndSymbolicColumnNames(*this, {
{ QY("Codec"), Q("codec") },
{ QY("Type"), Q("type") },
{ QY("Mux this"), Q("muxThis") },
{ QY("Language"), Q("language") },
{ QY("Name"), Q("name") },
{ QY("Source file"), Q("sourceFile") },
@ -53,7 +52,7 @@ TrackModel::retranslateUi() {
{ QY("Properties"), Q("properties") },
});
horizontalHeaderItem(6)->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
horizontalHeaderItem(5)->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
for (auto const &track : *m_tracks) {
trackUpdated(track);
@ -99,14 +98,13 @@ TrackModel::setItemsFromTrack(QList<QStandardItem *> items,
Track *track) {
items[0]->setText(track->isChapters() || track->isGlobalTags() || track->isTags() ? QY("%1 entries").arg(track->m_size) : track->m_codec);
items[1]->setText(track->nameForType());
items[2]->setText(track->m_muxThis ? QY("yes") : QY("no"));
items[3]->setText(track->isAppended() ? QString{} : track->m_language);
items[4]->setText(track->isAppended() ? QString{} : track->m_name);
items[5]->setText(QFileInfo{ track->m_file->m_fileName }.fileName());
items[6]->setText(-1 == track->m_id ? Q("") : QString::number(track->m_id));
items[7]->setText(!track->m_effectiveDefaultTrackFlag ? Q("") : *track->m_effectiveDefaultTrackFlag ? QY("yes") : QY("no"));
items[8]->setText(!track->isRegular() ? Q("") : track->m_forcedTrackFlag ? QY("yes") : QY("no"));
items[9]->setText(summarizeProperties(*track));
items[2]->setText(track->isAppended() ? QString{} : track->m_language);
items[3]->setText(track->isAppended() ? QString{} : track->m_name);
items[4]->setText(QFileInfo{ track->m_file->m_fileName }.fileName());
items[5]->setText(-1 == track->m_id ? Q("") : QString::number(track->m_id));
items[6]->setText(!track->m_effectiveDefaultTrackFlag ? Q("") : *track->m_effectiveDefaultTrackFlag ? QY("yes") : QY("no"));
items[7]->setText(!track->isRegular() ? Q("") : track->m_forcedTrackFlag ? QY("yes") : QY("no"));
items[8]->setText(summarizeProperties(*track));
items[0]->setData(QVariant::fromValue(reinterpret_cast<qulonglong>(track)), Util::TrackRole);
items[0]->setCheckable(true);
@ -119,10 +117,9 @@ TrackModel::setItemsFromTrack(QList<QStandardItem *> items,
: track->isTags() ? m_tagsIcon
: track->isGlobalTags() ? m_tagsIcon
: m_genericIcon);
items[2]->setIcon(track->m_muxThis ? MainWindow::yesIcon() : MainWindow::noIcon());
items[7]->setIcon(!track->m_effectiveDefaultTrackFlag ? QIcon{} : *track->m_effectiveDefaultTrackFlag ? MainWindow::yesIcon() : MainWindow::noIcon());
items[8]->setIcon(!track->isRegular() ? QIcon{} : track->m_forcedTrackFlag ? MainWindow::yesIcon() : MainWindow::noIcon());
items[6]->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
items[6]->setIcon(!track->m_effectiveDefaultTrackFlag ? QIcon{} : *track->m_effectiveDefaultTrackFlag ? MainWindow::yesIcon() : MainWindow::noIcon());
items[7]->setIcon(!track->isRegular() ? QIcon{} : track->m_forcedTrackFlag ? MainWindow::yesIcon() : MainWindow::noIcon());
items[5]->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
}
Track *