mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-08 16:37:46 +02:00
Fixed conflicts in 'ChangeLog'
Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
commit
b04a668481
@ -23681,3 +23681,6 @@
|
||||
2022-11-15 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a check for conflicting events to the 'Edit Playout' dialog
|
||||
in rdcatch(1).
|
||||
2022-11-15 David Klann <dklann@broadcasttool.com>
|
||||
* Implemented sorting of the dropbox list in the 'Rivendell
|
||||
Dropbox List' dialog in rdadmin(1).
|
||||
|
@ -26,6 +26,19 @@ RDDropboxListModel::RDDropboxListModel(const QString &hostname,QObject *parent)
|
||||
: QAbstractTableModel(parent)
|
||||
{
|
||||
d_hostname=hostname;
|
||||
d_sort_column=0;
|
||||
d_sort_order=Qt::AscendingOrder;
|
||||
d_column_fields.push_back("`ID`");
|
||||
d_column_fields.push_back("`GROUP_NAME`");
|
||||
d_column_fields.push_back("`PATH`");
|
||||
d_column_fields.push_back("`NORMALIZATION_LEVEL`");
|
||||
d_column_fields.push_back("`AUTOTRIM_LEVEL`");
|
||||
d_column_fields.push_back("`TO_CART`");
|
||||
d_column_fields.push_back("`FORCE_TO_MONO`");
|
||||
d_column_fields.push_back("`USE_CARTCHUNK_ID`");
|
||||
d_column_fields.push_back("`DELETE_CUTS`");
|
||||
d_column_fields.push_back("`METADATA_PATTERN`");
|
||||
d_column_fields.push_back("`SET_USER_DEFINED`");
|
||||
|
||||
//
|
||||
// Column Attributes
|
||||
@ -161,6 +174,16 @@ QVariant RDDropboxListModel::data(const QModelIndex &index,int role) const
|
||||
}
|
||||
|
||||
|
||||
void RDDropboxListModel::sort(int col,Qt::SortOrder order)
|
||||
{
|
||||
if((col!=d_sort_column)||(order!=d_sort_order)) {
|
||||
d_sort_column=col;
|
||||
d_sort_order=order;
|
||||
updateModel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int RDDropboxListModel::dropboxId(const QModelIndex &row) const
|
||||
{
|
||||
return d_box_ids.at(row.row());
|
||||
@ -251,8 +274,13 @@ void RDDropboxListModel::updateModel()
|
||||
QList<QVariant> texts;
|
||||
RDSqlQuery *q=NULL;
|
||||
QString sql=sqlFields()+
|
||||
"where `DROPBOXES`.`STATION_NAME`='"+RDEscapeString(d_hostname)+"' "+
|
||||
"order by `DROPBOXES`.`ID` ";
|
||||
"where `DROPBOXES`.`STATION_NAME`='"+RDEscapeString(d_hostname)+"' "; //+
|
||||
// "order by `DROPBOXES`.`ID` ";
|
||||
sql+="order by "+d_column_fields.at(d_sort_column)+" ";
|
||||
if(d_sort_order==Qt::DescendingOrder) {
|
||||
sql+="desc ";
|
||||
}
|
||||
|
||||
beginResetModel();
|
||||
d_box_ids.clear();
|
||||
d_group_colors.clear();
|
||||
|
@ -43,6 +43,7 @@ class RDDropboxListModel : public QAbstractTableModel
|
||||
QVariant headerData(int section,Qt::Orientation orient,
|
||||
int role=Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||
void sort(int col,Qt::SortOrder order=Qt::AscendingOrder);
|
||||
int dropboxId(const QModelIndex &row) const;
|
||||
QModelIndex addDropbox(int box_id);
|
||||
void removeDropbox(const QModelIndex &row);
|
||||
@ -67,6 +68,9 @@ class RDDropboxListModel : public QAbstractTableModel
|
||||
QList<QVariant> d_group_colors;
|
||||
QList<int> d_box_ids;
|
||||
QString d_hostname;
|
||||
QStringList d_column_fields;
|
||||
int d_sort_column;
|
||||
Qt::SortOrder d_sort_order;
|
||||
};
|
||||
|
||||
|
||||
|
@ -84,6 +84,8 @@ ListDropboxes::ListDropboxes(const QString &stationname,QWidget *parent)
|
||||
// Dropbox List
|
||||
//
|
||||
list_dropboxes_view=new RDTableView(this);
|
||||
list_dropboxes_view->setSortingEnabled(true);
|
||||
list_dropboxes_view->sortByColumn(0,Qt::AscendingOrder);
|
||||
list_dropboxes_model=new RDDropboxListModel(stationname,this);
|
||||
list_dropboxes_model->setFont(defaultFont());
|
||||
list_dropboxes_model->setPalette(palette());
|
||||
|
Loading…
x
Reference in New Issue
Block a user