mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 22:48:01 +02:00
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
* Updated the 'Rip Disc' dialog in rdlibrary(1) to use new 'pretty text' styling for cart and cut objects. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
02337abb32
commit
987ad7e45b
@ -23445,3 +23445,6 @@
|
|||||||
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
|
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in 'RDCartFilter' that caused 'RDLibraryModel' to
|
* Fixed a bug in 'RDCartFilter' that caused 'RDLibraryModel' to
|
||||||
fail to be initialized properly.
|
fail to be initialized properly.
|
||||||
|
2022-09-30 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Updated the 'Rip Disc' dialog in rdlibrary(1) to use new
|
||||||
|
'pretty text' styling for cart and cut objects.
|
||||||
|
@ -112,7 +112,9 @@ QVariant RDDiscModel::data(const QModelIndex &index,int role) const
|
|||||||
return d_texts.at(row).at(col);
|
return d_texts.at(row).at(col);
|
||||||
|
|
||||||
case Qt::DecorationRole:
|
case Qt::DecorationRole:
|
||||||
// Nothing to do!
|
if((col==5)&&(!d_texts.at(row).at(5).toString().isEmpty())) {
|
||||||
|
return rda->iconEngine()->catchIcon(RDRecording::Playout);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::TextAlignmentRole:
|
case Qt::TextAlignmentRole:
|
||||||
@ -181,21 +183,7 @@ void RDDiscModel::setCutName(const QModelIndex &row,const QString &cutname)
|
|||||||
d_texts[row.row()][5]=QString();
|
d_texts[row.row()][5]=QString();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QString sql=QString("select ")+
|
d_texts[row.row()][5]=RDCut::prettyText(cutname);
|
||||||
"`CART`.`TITLE`,"+ // 00
|
|
||||||
"`CUTS`.`DESCRIPTION` "+ // 01
|
|
||||||
"from `CART` left join `CUTS` "+
|
|
||||||
"on `CART`.`NUMBER`=`CUTS`.`CART_NUMBER` "+
|
|
||||||
"where `CUTS`.`CUT_NAME`='"+RDEscapeString(cutname)+"'";
|
|
||||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
|
||||||
if(q->first()) {
|
|
||||||
d_texts[row.row()][5]=q->value(0).toString()+"->"+q->value(1).toString();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
d_texts[row.row()][5]="["+tr("New cart")+
|
|
||||||
QString::asprintf(" %06u]",RDCut::cartNumber(cutname));
|
|
||||||
}
|
|
||||||
delete q;
|
|
||||||
}
|
}
|
||||||
emit dataChanged(createIndex(row.row(),5),createIndex(row.row(),5));
|
emit dataChanged(createIndex(row.row(),5),createIndex(row.row(),5));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user