mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 00:53:53 +02:00
2021-02-08 Fred Gleason <fredg@paravelsystems.com>
* Refactored the library list in the 'Edit Event' dialog in rdlogmanger(1) to use the model based API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -168,6 +168,25 @@ QString RDGroupListModel::groupName(const QModelIndex &row) const
|
||||
}
|
||||
|
||||
|
||||
QStringList RDGroupListModel::allGroupNames() const
|
||||
{
|
||||
QStringList ret;
|
||||
|
||||
if(d_show_all) {
|
||||
for(int i=1;i<d_texts.size();i++) {
|
||||
ret.push_back(d_texts.at(i).at(0).toString());
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(int i=0;i<d_texts.size();i++) {
|
||||
ret.push_back(d_texts.at(i).at(0).toString());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
QModelIndex RDGroupListModel::addGroup(const QString &grpname)
|
||||
{
|
||||
//
|
||||
|
@@ -44,6 +44,7 @@ class RDGroupListModel : public QAbstractTableModel
|
||||
int role=Qt::DisplayRole) const;
|
||||
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
|
||||
QString groupName(const QModelIndex &row) const;
|
||||
QStringList allGroupNames() const;
|
||||
QModelIndex addGroup(const QString &name);
|
||||
QModelIndex renameGroup(const QString &oldname,const QString &newname);
|
||||
void removeGroup(const QModelIndex &row);
|
||||
|
Reference in New Issue
Block a user