2021-01-22 Fred Gleason <fredg@paravelsystems.com>

* Modified the 'Edit Deck' dialog in rdadmin(1) to use
	'RDStationListModel'.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-01-22 15:18:24 -05:00
parent d5c465d78f
commit 957e0516b9
14 changed files with 47 additions and 66 deletions

View File

@@ -22,11 +22,13 @@
#include "rdescape_string.h"
#include "rdstationlistmodel.h"
RDStationListModel::RDStationListModel(const QString &localhost_name,
RDStationListModel::RDStationListModel(bool incl_none,
const QString &localhost_name,
QObject *parent)
: QAbstractTableModel(parent)
{
d_localhost_name=localhost_name;
d_include_none=incl_none;
//
// Column Attributes
@@ -269,6 +271,17 @@ void RDStationListModel::updateModel()
d_hostnames.clear();
d_texts.clear();
d_icons.clear();
if(d_include_none) {
d_hostnames.push_back(tr("[none]"));
d_texts.push_back(texts);
d_texts.back().push_back(tr("[none]"));
d_icons.push_back(texts);
for(int i=1;i<columnCount();i++) {
d_texts.back().push_back(QVariant());
d_icons.back().push_back(QVariant());
}
d_icons.push_back(texts);
}
q=new RDSqlQuery(sql);
while(q->next()) {
d_hostnames.push_back(QString());