From e25bec42a2fb0c16451357573dbec6f44548e571 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Mon, 1 Feb 2021 11:11:27 -0500 Subject: [PATCH] 2021-02-01 Fred Gleason * Added 'RDNodeSlotsModel'. * Refactored the 'Viewing Livewire Node' dialog in rdadmin(1) to use the model-based API. Signed-off-by: Fred Gleason --- ChangeLog | 4 + lib/Makefile.am | 2 + lib/lib.pro | 2 + lib/librd_cs.ts | 51 ++++++++ lib/librd_de.ts | 51 ++++++++ lib/librd_es.ts | 51 ++++++++ lib/librd_fr.ts | 51 ++++++++ lib/librd_nb.ts | 51 ++++++++ lib/librd_nn.ts | 51 ++++++++ lib/librd_pt_BR.ts | 51 ++++++++ lib/rdnodeslotsmodel.cpp | 240 +++++++++++++++++++++++++++++++++++++ lib/rdnodeslotsmodel.h | 70 +++++++++++ rdadmin/view_node_info.cpp | 146 ++++++---------------- rdadmin/view_node_info.h | 22 ++-- 14 files changed, 722 insertions(+), 121 deletions(-) create mode 100644 lib/rdnodeslotsmodel.cpp create mode 100644 lib/rdnodeslotsmodel.h diff --git a/ChangeLog b/ChangeLog index 45035ea0..f9af5fac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20961,3 +20961,7 @@ * Added 'RDNodeListModel'. * Refactored the 'LivewireNode List' dialog in rdadmin(1) to use the model-based API. +2021-02-01 Fred Gleason + * Added 'RDNodeSlotsModel'. + * Refactored the 'Viewing Livewire Node' dialog in rdadmin(1) to use + the model-based API. diff --git a/lib/Makefile.am b/lib/Makefile.am index 1535d74a..477ec2ea 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -195,6 +195,7 @@ dist_librd_la_SOURCES = dbversion.h\ rdmp4.cpp rdmp4.h\ rdmulticaster.cpp rdmulticaster.h\ rdnodelistmodel.cpp rdnodelistmodelh\ + rdnodeslotsmodel.cpp rdnodeslotsmodel.h\ rdnotification.cpp rdnotification.h\ rdoneshot.cpp rdoneshot.h\ rdpam.cpp rdpam.h\ @@ -356,6 +357,7 @@ nodist_librd_la_SOURCES = moc_rd3emptycart.cpp\ moc_rdmblookup.cpp\ moc_rdmulticaster.cpp\ moc_rdnodelistmodel.cpp\ + moc_rdnodeslotsmodel.cpp\ moc_rdoneshot.cpp\ moc_rdpanel_button.cpp\ moc_rdpasswd.cpp\ diff --git a/lib/lib.pro b/lib/lib.pro index b048d6c6..b0a8d4e2 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -144,6 +144,7 @@ SOURCES += rdmatrixlistmodel.cpp SOURCES += rdmblookup.cpp SOURCES += rdmonitor_config.cpp SOURCES += rdnodelistmodel.cpp +SOURCES += rdnodeslotsmodel.cpp SOURCES += rdnotification.cpp SOURCES += rdoneshot.cpp SOURCES += rdpanel_button.cpp @@ -312,6 +313,7 @@ HEADERS += rdmatrixlistmodel.h HEADERS += rdmblookup.h HEADERS += rdmonitor_config.h HEADERS += rdnodelistmodel.h +HEADERS += rdnodeslotsmodel.h HEADERS += rdnotification.h HEADERS += rdoneshot.h HEADERS += rdpanel_button.h diff --git a/lib/librd_cs.ts b/lib/librd_cs.ts index b8bbf4e5..db577025 100644 --- a/lib/librd_cs.ts +++ b/lib/librd_cs.ts @@ -3387,6 +3387,57 @@ Bitte Kofiguration prüfen und erneut versuchen. + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_de.ts b/lib/librd_de.ts index 9aff6b40..6378b7ec 100644 --- a/lib/librd_de.ts +++ b/lib/librd_de.ts @@ -3368,6 +3368,57 @@ Bitte Kofiguration prüfen und erneut versuchen. + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_es.ts b/lib/librd_es.ts index e37db3d1..d8b2b564 100644 --- a/lib/librd_es.ts +++ b/lib/librd_es.ts @@ -3355,6 +3355,57 @@ Do you still want to proceed? + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_fr.ts b/lib/librd_fr.ts index 782abc7d..ce6006d0 100644 --- a/lib/librd_fr.ts +++ b/lib/librd_fr.ts @@ -2791,6 +2791,57 @@ Do you want to overwrite it? + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_nb.ts b/lib/librd_nb.ts index 04924632..8faae615 100644 --- a/lib/librd_nb.ts +++ b/lib/librd_nb.ts @@ -3322,6 +3322,57 @@ Sjekk eksportoppsettet ditt og prøv att. + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_nn.ts b/lib/librd_nn.ts index 04924632..8faae615 100644 --- a/lib/librd_nn.ts +++ b/lib/librd_nn.ts @@ -3322,6 +3322,57 @@ Sjekk eksportoppsettet ditt og prøv att. + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/librd_pt_BR.ts b/lib/librd_pt_BR.ts index a3978843..3230dae9 100644 --- a/lib/librd_pt_BR.ts +++ b/lib/librd_pt_BR.ts @@ -3357,6 +3357,57 @@ Por Favor, cheque suas configurações e tenbte outra vez. + + RDNodeSlotsModel + + # + + + + Input # + + + + Name + + + + Active + + + + Shareable + + + + Chans + + + + Gain + + + + Output # + + + + [unassigned] + + + + Yes + + + + No + + + + Load + + + RDPanelButton diff --git a/lib/rdnodeslotsmodel.cpp b/lib/rdnodeslotsmodel.cpp new file mode 100644 index 00000000..a9cb2165 --- /dev/null +++ b/lib/rdnodeslotsmodel.cpp @@ -0,0 +1,240 @@ +// rdnodeslotsmodel.cpp +// +// Data model for Rivendell switcher nodes. +// +// (C) Copyright 2021 Fred Gleason +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#include "rdapplication.h" +#include "rdescape_string.h" +#include "rdnodeslotsmodel.h" + +RDNodeSlotsModel::RDNodeSlotsModel(bool is_src,QObject *parent) + : QAbstractTableModel(parent) +{ + d_is_source=is_src; + d_base_output=0; + + // + // Column Attributes + // + unsigned left=Qt::AlignLeft|Qt::AlignVCenter; + unsigned center=Qt::AlignCenter; + unsigned right=Qt::AlignRight|Qt::AlignVCenter; + + if(d_is_source) { + d_headers.push_back(tr("#")); + d_alignments.push_back(right); + + d_headers.push_back(tr("Input #")); + d_alignments.push_back(right); + + d_headers.push_back(tr("Name")); + d_alignments.push_back(left); + + d_headers.push_back(tr("Active")); + d_alignments.push_back(center); + + d_headers.push_back(tr("Shareable")); + d_alignments.push_back(center); + + d_headers.push_back(tr("Chans")); + d_alignments.push_back(center); + + d_headers.push_back(tr("Gain")); + d_alignments.push_back(right); + } + else { + d_headers.push_back(tr("#")); + d_alignments.push_back(right); + + d_headers.push_back(tr("Output #")); + d_alignments.push_back(right); + + d_headers.push_back(tr("Name")); + d_alignments.push_back(left); + + d_headers.push_back(tr("Chans")); + d_alignments.push_back(center); + + d_headers.push_back(tr("Load")); + d_alignments.push_back(center); + + d_headers.push_back(tr("Gain")); + d_alignments.push_back(right); + } +} + + +RDNodeSlotsModel::~RDNodeSlotsModel() +{ +} + + +QPalette RDNodeSlotsModel::palette() +{ + return d_palette; +} + + +void RDNodeSlotsModel::setPalette(const QPalette &pal) +{ + d_palette=pal; +} + + +void RDNodeSlotsModel::setFont(const QFont &font) +{ + d_font=font; + d_bold_font=font; + d_bold_font.setWeight(QFont::Bold); +} + + +int RDNodeSlotsModel::columnCount(const QModelIndex &parent) const +{ + return d_headers.size(); +} + + +int RDNodeSlotsModel::rowCount(const QModelIndex &parent) const +{ + return d_texts.size(); +} + + +QVariant RDNodeSlotsModel::headerData(int section,Qt::Orientation orient, + int role) const +{ + if((orient==Qt::Horizontal)&&(role==Qt::DisplayRole)) { + return d_headers.at(section); + } + return QVariant(); +} + + +QVariant RDNodeSlotsModel::data(const QModelIndex &index,int role) const +{ + QString str; + int col=index.column(); + int row=index.row(); + + if(row texts; + for(int i=0;islotNumber()-1; + if(src->channelNumber()<=0) { + d_texts[slotnum][1]=tr("[unassigned]"); + } + else { + d_texts[slotnum][1]=QString().sprintf("%d",src->channelNumber()); + } + d_texts[slotnum][2]=src->primaryName(); + if(src->rtpEnabled()) { + d_texts[slotnum][3]=tr("Yes"); + } + else { + d_texts[slotnum][3]=tr("No"); + } + if(src->shareable()) { + d_texts[slotnum][4]=tr("Yes"); + } + else { + d_texts[slotnum][4]=tr("No"); + } + d_texts[slotnum][5]=QString().sprintf("%d",src->channels()); + d_texts[slotnum][6]=QString().sprintf("%4.1f",(float)src->inputGain()/10.0); + + emit dataChanged(createIndex(slotnum,0), + createIndex(slotnum,columnCount()-1)); + } +} + + +void RDNodeSlotsModel::updateDestination(unsigned id,RDLiveWireDestination *dst) +{ + if(!d_is_source) { + int slotnum=dst->slotNumber()-1; + + d_texts[slotnum][1]= + QString().sprintf("%u",d_base_output+dst->slotNumber()-1); + d_texts[slotnum][2]=dst->primaryName(); + d_texts[slotnum][3]=QString().sprintf("%d",dst->channels()); + d_texts[slotnum][4]=RDLiveWireDestination::loadString(dst->load()); + d_texts[slotnum][5]= + QString().sprintf("%4.1f",(float)dst->outputGain()/10.0); + + emit dataChanged(createIndex(slotnum,0), + createIndex(slotnum,columnCount()-1)); + } +} diff --git a/lib/rdnodeslotsmodel.h b/lib/rdnodeslotsmodel.h new file mode 100644 index 00000000..ea4cdc61 --- /dev/null +++ b/lib/rdnodeslotsmodel.h @@ -0,0 +1,70 @@ +// rdnodeslotsmodel.h +// +// Data model for Rivendell switcher nodes. +// +// (C) Copyright 2021 Fred Gleason +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2 as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// + +#ifndef RDNODESLOTSMODEL_H +#define RDNODESLOTSMODEL_H + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +class RDNodeSlotsModel : public QAbstractTableModel +{ + Q_OBJECT + public: + RDNodeSlotsModel(bool is_src,QObject *parent=0); + ~RDNodeSlotsModel(); + QPalette palette(); + void setPalette(const QPalette &pal); + void setFont(const QFont &font); + int columnCount(const QModelIndex &parent=QModelIndex()) const; + int rowCount(const QModelIndex &parent=QModelIndex()) const; + QVariant headerData(int section,Qt::Orientation orient, + int role=Qt::DisplayRole) const; + QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const; + void setBaseOutput(int output); + void setSlotQuantity(int slot_quan); + + public slots: + void updateSource(unsigned id,RDLiveWireSource *src); + void updateDestination(unsigned id,RDLiveWireDestination *dst); + + private: + QPalette d_palette; + QFont d_font; + QFont d_bold_font; + QList d_headers; + QList d_alignments; + QList > d_texts; + QList d_ids; + bool d_is_source; + int d_base_output; +}; + + +#endif // RDNODESLOTSMODEL_H diff --git a/rdadmin/view_node_info.cpp b/rdadmin/view_node_info.cpp index b9bbcf79..b9264a06 100644 --- a/rdadmin/view_node_info.cpp +++ b/rdadmin/view_node_info.cpp @@ -2,7 +2,7 @@ // // Edit a Rivendell LiveWire Node // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -30,8 +30,6 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) : RDDialog(parent) { - setModal(true); - setWindowTitle("RDAdmin - "+tr("Viewing Livewire Node")); // @@ -46,12 +44,6 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) view_livewire=new RDLiveWire(0,this); connect(view_livewire,SIGNAL(connected(unsigned)), this,SLOT(connectedData(unsigned))); - connect(view_livewire,SIGNAL(sourceChanged(unsigned,RDLiveWireSource *)), - this,SLOT(sourceChangedData(unsigned,RDLiveWireSource *))); - connect(view_livewire, - SIGNAL(destinationChanged(unsigned,RDLiveWireDestination *)), - this, - SLOT(destinationChangedData(unsigned,RDLiveWireDestination *))); // // Node Hostname @@ -159,25 +151,19 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) label->setGeometry(15,98,90,20); label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - view_sources_view=new RDListView(this); + view_sources_view=new RDTableView(this); view_sources_view->setGeometry(10,118,sizeHint().width()-20,200); - view_sources_view->setAllColumnsShowFocus(true); - view_sources_view->setItemMargin(5); - view_sources_view->addColumn(tr("#")); - view_sources_view->setColumnAlignment(0,Qt::AlignCenter); - view_sources_view->setColumnSortType(0,RDListView::LineSort); - view_sources_view->addColumn(tr("Input #")); - view_sources_view->setColumnAlignment(1,Qt::AlignRight); - view_sources_view->addColumn(tr("Name")); - view_sources_view->setColumnAlignment(2,Qt::AlignLeft); - view_sources_view->addColumn(tr("Active")); - view_sources_view->setColumnAlignment(3,Qt::AlignCenter); - view_sources_view->addColumn(tr("Shareable")); - view_sources_view->setColumnAlignment(4,Qt::AlignCenter); - view_sources_view->addColumn(tr("Chans")); - view_sources_view->setColumnAlignment(5,Qt::AlignCenter); - view_sources_view->addColumn(tr("Gain")); - view_sources_view->setColumnAlignment(6,Qt::AlignCenter); + view_sources_model=new RDNodeSlotsModel(true,this); + view_sources_model->setFont(defaultFont()); + view_sources_model->setPalette(palette()); + view_sources_view->setModel(view_sources_model); + view_sources_view->resizeColumnsToContents(); + connect(view_sources_model, + SIGNAL(dataChanged(const QModelIndex &,const QModelIndex &)), + this, + SLOT(sourceChangedData(const QModelIndex &,const QModelIndex &))); + connect(view_livewire,SIGNAL(sourceChanged(unsigned,RDLiveWireSource *)), + view_sources_model,SLOT(updateSource(unsigned,RDLiveWireSource *))); // // Destinations List @@ -186,24 +172,22 @@ ViewNodeInfo::ViewNodeInfo(QWidget *parent) label->setGeometry(15,325,90,20); label->setFont(labelFont()); label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter); - view_destinations_view=new RDListView(this); + view_destinations_view=new RDTableView(this); view_destinations_view-> setGeometry(10,345,sizeHint().width()-20,200); - view_destinations_view->setAllColumnsShowFocus(true); - view_destinations_view->setItemMargin(5); - view_destinations_view->addColumn(tr("#")); - view_destinations_view->setColumnAlignment(0,Qt::AlignCenter); - view_destinations_view->setColumnSortType(0,RDListView::LineSort); - view_destinations_view->addColumn(tr("Output #")); - view_destinations_view->setColumnAlignment(1,Qt::AlignRight); - view_destinations_view->addColumn(tr("Name")); - view_destinations_view->setColumnAlignment(2,Qt::AlignLeft); - view_destinations_view->addColumn(tr("Chans")); - view_destinations_view->setColumnAlignment(3,Qt::AlignCenter); - view_destinations_view->addColumn(tr("Load")); - view_destinations_view->setColumnAlignment(4,Qt::AlignCenter); - view_destinations_view->addColumn(tr("Gain")); - view_destinations_view->setColumnAlignment(5,Qt::AlignCenter); + view_destinations_model=new RDNodeSlotsModel(false,this); + view_destinations_model->setFont(defaultFont()); + view_destinations_model->setPalette(palette()); + view_destinations_view->setModel(view_destinations_model); + view_destinations_view->resizeColumnsToContents(); + connect(view_destinations_model, + SIGNAL(dataChanged(const QModelIndex &,const QModelIndex &)), + this, + SLOT(destinationChangedData(const QModelIndex &,const QModelIndex &))); + connect(view_livewire, + SIGNAL(destinationChanged(unsigned,RDLiveWireDestination *)), + view_destinations_model, + SLOT(updateDestination(unsigned,RDLiveWireDestination *))); // // Close Button @@ -234,7 +218,7 @@ void ViewNodeInfo::exec(const QString &hostname,Q_UINT16 port, { view_hostname_edit->setText(hostname); view_tcpport_edit->setText(QString().sprintf("%u",(unsigned)port)); - view_base_output=base_output; + view_destinations_model->setBaseOutput(base_output); view_livewire->connectToHost(hostname,port,passwd,base_output); QDialog::exec(); } @@ -242,6 +226,9 @@ void ViewNodeInfo::exec(const QString &hostname,Q_UINT16 port, void ViewNodeInfo::connectedData(unsigned id) { + view_sources_model->setSlotQuantity(view_livewire->sources()); + view_destinations_model->setSlotQuantity(view_livewire->destinations()); + view_protocol_edit->setText(view_livewire->protocolVersion()); view_system_edit->setText(view_livewire->systemVersion()); view_sources_edit->setText(QString().sprintf("%d",view_livewire->sources())); @@ -262,36 +249,17 @@ void ViewNodeInfo::connectedData(unsigned id) } -void ViewNodeInfo::sourceChangedData(unsigned id,RDLiveWireSource *src) +void ViewNodeInfo::sourceChangedData(const QModelIndex &first, + const QModelIndex &last) { - RDListViewItem *item=(RDListViewItem *)view_sources_view->firstChild(); - while(item!=NULL) { - if(item->text(0).toInt()==src->slotNumber()) { - WriteSourceItem(src,item); - return; - } - item=(RDListViewItem *)item->nextSibling(); - } - item=new RDListViewItem(view_sources_view); - item->setText(0,QString().sprintf("%d",src->slotNumber())); - WriteSourceItem(src,item); + view_sources_view->resizeColumnsToContents(); } -void ViewNodeInfo::destinationChangedData(unsigned id, - RDLiveWireDestination *dst) +void ViewNodeInfo::destinationChangedData(const QModelIndex &first, + const QModelIndex &last) { - RDListViewItem *item=(RDListViewItem *)view_destinations_view->firstChild(); - while(item!=NULL) { - if(item->text(0).toInt()==dst->slotNumber()) { - WriteDestinationItem(dst,item); - return; - } - item=(RDListViewItem *)item->nextSibling(); - } - item=new RDListViewItem(view_destinations_view); - item->setText(0,QString().sprintf("%d",dst->slotNumber())); - WriteDestinationItem(dst,item); + view_destinations_view->resizeColumnsToContents(); } @@ -299,43 +267,3 @@ void ViewNodeInfo::closeData() { done(0); } - - -void ViewNodeInfo::WriteSourceItem(RDLiveWireSource *src,RDListViewItem *item) -{ - item->setLine(src->slotNumber()); - if(src->channelNumber()<=0) { - item->setText(1,tr("[unassigned]")); - } - else { - item->setText(1,QString().sprintf("%d",src->channelNumber())); - } - item->setText(2,src->primaryName()); - if(src->rtpEnabled()) { - item->setText(3,tr("Yes")); - } - else { - item->setText(3,tr("No")); - } - if(src->shareable()) { - item->setText(4,tr("Yes")); - } - else { - item->setText(4,tr("No")); - } - item->setText(5,QString().sprintf("%d",src->channels())); - item->setText(6,QString().sprintf("%4.1f",(float)src->inputGain()/10.0)); -} - - -void ViewNodeInfo::WriteDestinationItem(RDLiveWireDestination *dst, - RDListViewItem *item) -{ - item->setLine(dst->slotNumber()); - item-> - setText(1,QString().sprintf("%u",view_base_output+dst->slotNumber()-1)); - item->setText(2,dst->primaryName()); - item->setText(3,QString().sprintf("%d",dst->channels())); - item->setText(4,RDLiveWireDestination::loadString(dst->load())); - item->setText(5,QString().sprintf("%4.1f",(float)dst->outputGain()/10.0)); -} diff --git a/rdadmin/view_node_info.h b/rdadmin/view_node_info.h index 078fd90e..817dfa4b 100644 --- a/rdadmin/view_node_info.h +++ b/rdadmin/view_node_info.h @@ -2,7 +2,7 @@ // // Edit a Rivendell Livewire Node // -// (C) Copyright 2002-2019 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as @@ -21,12 +21,11 @@ #ifndef VIEW_NODE_INFO_H #define VIEW_NODE_INFO_H -#include +#include #include -#include -#include -#include +#include +#include class ViewNodeInfo : public RDDialog { @@ -42,13 +41,11 @@ class ViewNodeInfo : public RDDialog private slots: void connectedData(unsigned id); - void sourceChangedData(unsigned id,RDLiveWireSource *src); - void destinationChangedData(unsigned id,RDLiveWireDestination *dst); + void sourceChangedData(const QModelIndex &first,const QModelIndex &last); + void destinationChangedData(const QModelIndex &first,const QModelIndex &last); void closeData(); private: - void WriteSourceItem(RDLiveWireSource *src,RDListViewItem *item); - void WriteDestinationItem(RDLiveWireDestination *dst,RDListViewItem *item); RDLiveWire *view_livewire; QLineEdit *view_hostname_edit; QLineEdit *view_tcpport_edit; @@ -60,9 +57,10 @@ class ViewNodeInfo : public RDDialog QLineEdit *view_channels_edit; QLineEdit *view_gpis_edit; QLineEdit *view_gpos_edit; - RDListView *view_sources_view; - RDListView *view_destinations_view; - unsigned view_base_output; + RDTableView *view_sources_view; + RDNodeSlotsModel *view_sources_model; + RDTableView *view_destinations_view; + RDNodeSlotsModel *view_destinations_model; };