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

* Added 'RDGpioSlotsModel'.
	* Refactored the 'Livewire GPIO Source Assignments' dialog in
	rdadmin(1) to use the model-based API.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-02-01 14:08:39 -05:00
parent e25bec42a2
commit 0be2a7696b
26 changed files with 762 additions and 368 deletions

View File

@ -20965,3 +20965,7 @@
* Added 'RDNodeSlotsModel'. * Added 'RDNodeSlotsModel'.
* Refactored the 'Viewing Livewire Node' dialog in rdadmin(1) to use * Refactored the 'Viewing Livewire Node' dialog in rdadmin(1) to use
the model-based API. the model-based API.
2021-02-01 Fred Gleason <fredg@paravelsystems.com>
* Added 'RDGpioSlotsModel'.
* Refactored the 'Livewire GPIO Source Assignments' dialog in
rdadmin(1) to use the model-based API.

View File

@ -145,6 +145,7 @@ dist_librd_la_SOURCES = dbversion.h\
rdgetpasswd.cpp rdgetpasswd.h\ rdgetpasswd.cpp rdgetpasswd.h\
rdgpio.cpp rdgpio.h\ rdgpio.cpp rdgpio.h\
rdgpioselector.cpp rdgpioselector.h\ rdgpioselector.cpp rdgpioselector.h\
rdgpioslotsmodel.cpp rdgpioslotsmodel.h\
rdgrid.cpp rdgrid.h\ rdgrid.cpp rdgrid.h\
rdgroup.cpp rdgroup.h\ rdgroup.cpp rdgroup.h\
rdgroup_list.cpp rdgroup_list.h\ rdgroup_list.cpp rdgroup_list.h\
@ -328,6 +329,7 @@ nodist_librd_la_SOURCES = moc_rd3emptycart.cpp\
moc_rdgetpasswd.cpp\ moc_rdgetpasswd.cpp\
moc_rdgpio.cpp\ moc_rdgpio.cpp\
moc_rdgpioselector.cpp\ moc_rdgpioselector.cpp\
moc_rdgpioslotsmodel.cpp\
moc_rdgrouplistmodel.cpp\ moc_rdgrouplistmodel.cpp\
moc_rdhotkeys.cpp\ moc_rdhotkeys.cpp\
moc_rdhotkeylist.cpp\ moc_rdhotkeylist.cpp\

View File

@ -106,6 +106,7 @@ SOURCES += rdframe.cpp
SOURCES += rdget_ath.cpp SOURCES += rdget_ath.cpp
SOURCES += rdgetpasswd.cpp SOURCES += rdgetpasswd.cpp
SOURCES += rdgpioselector.cpp SOURCES += rdgpioselector.cpp
SOURCES += rdgpioslotsmodel.cpp
SOURCES += rdgrid.cpp SOURCES += rdgrid.cpp
SOURCES += rdgroup.cpp SOURCES += rdgroup.cpp
SOURCES += rdgroup_list.cpp SOURCES += rdgroup_list.cpp
@ -274,6 +275,7 @@ HEADERS += rdframe.h
HEADERS += rdget_ath.h HEADERS += rdget_ath.h
HEADERS += rdgetpasswd.h HEADERS += rdgetpasswd.h
HEADERS += rdgpioselector.h HEADERS += rdgpioselector.h
HEADERS += rdgpioslotsmodel.h
HEADERS += rdgrid.h HEADERS += rdgrid.h
HEADERS += rdgpio.h HEADERS += rdgpio.h
HEADERS += rdgroup_list.h HEADERS += rdgroup_list.h

View File

@ -2505,6 +2505,29 @@ pro dobu zprávy.
<translation>PIN:</translation> <translation>PIN:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2482,6 +2482,29 @@ figure for the report period.
<translation>PIN:</translation> <translation>PIN:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2477,6 +2477,29 @@ para el período a reportar.
<translation>Pin:</translation> <translation>Pin:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2128,6 +2128,29 @@ figure for the report period.
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2463,6 +2463,29 @@ for rapportperioden.
<translation>Pin-nummer:</translation> <translation>Pin-nummer:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2463,6 +2463,29 @@ for rapportperioden.
<translation>Pin-nummer:</translation> <translation>Pin-nummer:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

View File

@ -2470,6 +2470,29 @@ para o período do relatório
<translation>Pin:</translation> <translation>Pin:</translation>
</message> </message>
</context> </context>
<context>
<name>RDGpioSlotsModel</name>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>RDGroupListModel</name> <name>RDGroupListModel</name>
<message> <message>

297
lib/rdgpioslotsmodel.cpp Normal file
View File

@ -0,0 +1,297 @@
// rdgpioslotsmodel.cpp
//
// Data model for Livewire multicast GPIO slots
//
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
//
// 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 "rdgpioslotsmodel.h"
RDGpioSlotsModel::RDGpioSlotsModel(RDMatrix *mtx,int slot_quan,QObject *parent)
: QAbstractTableModel(parent)
{
d_mtx=mtx;
d_slot_quantity=slot_quan;
//
// Column Attributes
//
unsigned left=Qt::AlignLeft|Qt::AlignVCenter;
unsigned center=Qt::AlignCenter;
// unsigned right=Qt::AlignRight|Qt::AlignVCenter;
d_headers.push_back(tr("Lines"));
d_alignments.push_back(center);
d_headers.push_back(tr("Source #"));
d_alignments.push_back(center);
d_headers.push_back(tr("Surface Address"));
d_alignments.push_back(left);
updateModel();
}
RDGpioSlotsModel::~RDGpioSlotsModel()
{
}
QPalette RDGpioSlotsModel::palette()
{
return d_palette;
}
void RDGpioSlotsModel::setPalette(const QPalette &pal)
{
d_palette=pal;
}
void RDGpioSlotsModel::setFont(const QFont &font)
{
d_font=font;
d_bold_font=font;
d_bold_font.setWeight(QFont::Bold);
}
int RDGpioSlotsModel::columnCount(const QModelIndex &parent) const
{
return d_headers.size();
}
int RDGpioSlotsModel::rowCount(const QModelIndex &parent) const
{
return d_texts.size();
}
QVariant RDGpioSlotsModel::headerData(int section,Qt::Orientation orient,
int role) const
{
if((orient==Qt::Horizontal)&&(role==Qt::DisplayRole)) {
return d_headers.at(section);
}
return QVariant();
}
QVariant RDGpioSlotsModel::data(const QModelIndex &index,int role) const
{
QString str;
int col=index.column();
int row=index.row();
if(row<d_texts.size()) {
switch((Qt::ItemDataRole)role) {
case Qt::DisplayRole:
return d_texts.at(row).at(col);
case Qt::DecorationRole:
// Nothing to do!
break;
case Qt::TextAlignmentRole:
return d_alignments.at(col);
case Qt::FontRole:
if(col==0) {
return d_bold_font;
}
return d_font;
case Qt::TextColorRole:
// Nothing to do!
break;
case Qt::BackgroundRole:
// Nothing to do!
break;
default:
break;
}
}
return QVariant();
}
int RDGpioSlotsModel::slotId(const QModelIndex &row) const
{
return d_ids.at(row.row());
}
QModelIndex RDGpioSlotsModel::addSlot(int id)
{
//
// Find the insertion offset
//
int offset=d_ids.size();
for(int i=0;i<d_ids.size();i++) {
if(id<d_ids.at(i)) {
offset=i;
break;
}
}
beginInsertRows(QModelIndex(),offset,offset);
QList<QVariant> list;
for(int i=0;i<columnCount();i++) {
list.push_back(QVariant());
}
d_texts.insert(offset,list);
d_ids.insert(offset,id);
updateRowLine(offset);
endInsertRows();
return createIndex(offset,0);
}
void RDGpioSlotsModel::removeSlot(const QModelIndex &row)
{
beginRemoveRows(QModelIndex(),row.row(),row.row());
d_ids.removeAt(row.row());
d_texts.removeAt(row.row());
endRemoveRows();
}
void RDGpioSlotsModel::removeSlot(int id)
{
for(int i=0;i<d_ids.size();i++) {
if(d_ids.at(i)==id) {
removeSlot(createIndex(i,0));
return;
}
}
}
void RDGpioSlotsModel::refresh(const QModelIndex &row)
{
if(row.row()<d_texts.size()) {
QString sql=sqlFields()+
QString().sprintf("where ID=%u",d_ids.at(row.row()));
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
updateRow(row.row(),q);
emit dataChanged(createIndex(row.row(),0),
createIndex(row.row(),columnCount()));
}
delete q;
}
}
void RDGpioSlotsModel::refresh(int id)
{
for(int i=0;i<d_texts.size();i++) {
if(d_ids.at(i)==id) {
updateRowLine(i);
return;
}
}
}
void RDGpioSlotsModel::updateModel()
{
QList<QVariant> texts;
RDSqlQuery *q=NULL;
QString sql=sqlFields()+
"where "+
"STATION_NAME=\""+RDEscapeString(d_mtx->station())+"\" && "+
QString().sprintf("MATRIX=%d && ",d_mtx->matrix())+
QString().sprintf("SLOT<%d ",d_slot_quantity/5)+
"order by SLOT ";
beginResetModel();
d_texts.clear();
q=new RDSqlQuery(sql);
while(q->next()) {
d_ids.push_back(0);
d_texts.push_back(texts);
updateRow(d_texts.size()-1,q);
}
delete q;
endResetModel();
}
void RDGpioSlotsModel::updateRowLine(int line)
{
if(line<d_texts.size()) {
QString sql=sqlFields()+
QString().sprintf("where ID=%u",d_ids.at(line));
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
updateRow(line,q);
}
delete q;
}
}
void RDGpioSlotsModel::updateRow(int row,RDSqlQuery *q)
{
QList<QVariant> texts;
// Lines
texts.push_back(QString().sprintf("%d - %d",5*row+1,5*row+5));
// Source Number
if(q->value(2).toInt()>0) {
texts.push_back(QString().sprintf("%05d",q->value(2).toInt()));
}
else {
texts.push_back(tr("[none]"));
}
// Surface Address
if(q->value(3).toString().isEmpty()) {
texts.push_back(tr("[all]"));
}
else {
texts.push_back(q->value(3));
}
d_ids[row]=q->value(0).toInt();
d_texts[row]=texts;
}
QString RDGpioSlotsModel::sqlFields() const
{
QString sql=QString("select ")+
"ID," // 00
"SLOT,"+ // 01
"SOURCE_NUMBER," // 02
"IP_ADDRESS "+ // 03
"from LIVEWIRE_GPIO_SLOTS ";
return sql;
}

75
lib/rdgpioslotsmodel.h Normal file
View File

@ -0,0 +1,75 @@
// rdgpioslotsmodel.h
//
// Data model for Livewire multicast GPIO slots
//
// (C) Copyright 2021 Fred Gleason <fredg@paravelsystems.com>
//
// 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 RDGPIOSLOTSMODEL_H
#define RDGPIOSLOTSMODEL_H
#include <QAbstractTableModel>
#include <QFont>
#include <QList>
#include <QPalette>
#include <QTimer>
#include <rddb.h>
#include <rdmatrix.h>
#include <rdnotification.h>
#include <rduser.h>
class RDGpioSlotsModel : public QAbstractTableModel
{
Q_OBJECT
public:
RDGpioSlotsModel(RDMatrix *mtx,int slot_quan,QObject *parent=0);
~RDGpioSlotsModel();
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;
int slotId(const QModelIndex &row) const;
QModelIndex addSlot(int id);
void removeSlot(const QModelIndex &row);
void removeSlot(int id);
void refresh(const QModelIndex &row);
void refresh(int id);
protected:
void updateModel();
void updateRowLine(int line);
void updateRow(int row,RDSqlQuery *q);
QString sqlFields() const;
private:
QPalette d_palette;
QFont d_font;
QFont d_bold_font;
QList<QVariant> d_headers;
QList<QVariant> d_alignments;
QList<QList<QVariant> > d_texts;
QList<int> d_ids;
RDMatrix *d_mtx;
int d_slot_quantity;
};
#endif // RDGPIOSLOTSMODEL_H

View File

@ -340,7 +340,7 @@ void RDResourceListModel::updateRow(int row,RDSqlQuery *q)
} }
break; break;
defaults: default:
break; break;
} }

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Livewire GPIO Slot Association // Edit a Rivendell Livewire GPIO Slot Association
// //
// (C) Copyright 2013-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -23,36 +23,27 @@
#include <qmessagebox.h> #include <qmessagebox.h>
#include <rd.h> #include <rd.h>
#include <rdescape_string.h>
#include <edit_livewiregpio.h> #include "edit_livewiregpio.h"
EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr, EditLiveWireGpio::EditLiveWireGpio(QWidget *parent)
QWidget *parent)
: RDDialog(parent) : RDDialog(parent)
{ {
setModal(true);
edit_slot=slot;
edit_source=source;
edit_address=addr;
// //
// Fix the Window Size // Fix the Window Size
// //
setMinimumWidth(sizeHint().width()); setMinimumSize(sizeHint());
setMaximumWidth(sizeHint().width()); setMaximumSize(sizeHint());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setWindowTitle("RDAdmin - "+tr("Edit GPIO Source")); setWindowTitle("RDAdmin - "+tr("Edit GPIO Source"));
// //
// GPIO Lines // GPIO Lines
// //
QLabel *label=new QLabel(tr("GPIO Lines")+ edit_title_label=new QLabel(this);
QString().sprintf(" %d - %d",5*slot+1,5*slot+5),this); edit_title_label->setGeometry(10,10,sizeHint().width()-20,20);
label->setGeometry(10,10,sizeHint().width()-20,20); edit_title_label->setFont(labelFont());
label->setFont(labelFont()); edit_title_label->setAlignment(Qt::AlignCenter);
label->setAlignment(Qt::AlignCenter);
// //
// Livewire Source Number // Livewire Source Number
@ -61,7 +52,7 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr,
edit_source_number_spin->setGeometry(130,32,60,20); edit_source_number_spin->setGeometry(130,32,60,20);
edit_source_number_spin->setRange(0,RD_LIVEWIRE_MAX_SOURCE); edit_source_number_spin->setRange(0,RD_LIVEWIRE_MAX_SOURCE);
edit_source_number_spin->setSpecialValueText(tr("None")); edit_source_number_spin->setSpecialValueText(tr("None"));
label=new QLabel(tr("Livewire Source: "),this); QLabel *label=new QLabel(tr("Livewire Source: "),this);
label->setGeometry(10,32,115,20); label->setGeometry(10,32,115,20);
label->setFont(labelFont()); label->setFont(labelFont());
label->setAlignment(Qt::AlignVCenter|Qt::AlignRight); label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
@ -94,14 +85,6 @@ EditLiveWireGpio::EditLiveWireGpio(int slot,int *source,QHostAddress *addr,
button->setFont(buttonFont()); button->setFont(buttonFont());
button->setText(tr("&Cancel")); button->setText(tr("&Cancel"));
connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Load Data
//
edit_source_number_spin->setValue(*edit_source);
if(!edit_address->isNull()) {
edit_ip_address_edit->setText(edit_address->toString());
}
} }
@ -117,6 +100,37 @@ QSizePolicy EditLiveWireGpio::sizePolicy() const
} }
int EditLiveWireGpio::exec(int slot_id)
{
QHostAddress addr;
edit_id=slot_id;
QString sql=QString("select ")+
"SLOT,"+ // 00
"SOURCE_NUMBER,"+ // 01
"IP_ADDRESS "+ // 02
"from LIVEWIRE_GPIO_SLOTS where "+
QString().sprintf("ID=%u",slot_id);
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
edit_title_label->
setText(tr("GPIO Lines")+
QString().sprintf(" %d - %d",
5*q->value(0).toInt()+1,5*q->value(0).toInt()+5));
edit_source_number_spin->setValue(q->value(1).toInt());
if(addr.setAddress(q->value(2).toString())) {
edit_ip_address_edit->setText(addr.toString());
}
else {
edit_ip_address_edit->setText("");
}
}
return QDialog::exec();
}
void EditLiveWireGpio::okData() void EditLiveWireGpio::okData()
{ {
QHostAddress addr; QHostAddress addr;
@ -125,17 +139,20 @@ void EditLiveWireGpio::okData()
if(addr.isNull()&&(!edit_ip_address_edit->text().isEmpty())&& if(addr.isNull()&&(!edit_ip_address_edit->text().isEmpty())&&
(edit_ip_address_edit->text()!="0.0.0.0")) { (edit_ip_address_edit->text()!="0.0.0.0")) {
QMessageBox::warning(this,"RDAdmin - "+tr("Invalid IP Address"), QMessageBox::warning(this,"RDAdmin - "+tr("Invalid IP Address"),
tr("The IP address is invalid!")); tr("The Surface Address is invalid!"));
return; return;
} }
*edit_source=edit_source_number_spin->value(); QString sql=QString("update LIVEWIRE_GPIO_SLOTS set ")+
edit_address->setAddress(addr.toString()); QString().sprintf("SOURCE_NUMBER=%d,",edit_source_number_spin->value())+
"IP_ADDRESS=\""+RDEscapeString(addr.toString())+"\" "+
QString().sprintf("where ID=%u",edit_id);
RDSqlQuery::apply(sql);
done(0); done(true);
} }
void EditLiveWireGpio::cancelData() void EditLiveWireGpio::cancelData()
{ {
done(-1); done(false);
} }

View File

@ -2,7 +2,7 @@
// //
// Edit a Rivendell Livewire GPIO Slot Association // Edit a Rivendell Livewire GPIO Slot Association
// //
// (C) Copyright 2013-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -21,9 +21,10 @@
#ifndef EDIT_LIVEWIREGPIO_H #ifndef EDIT_LIVEWIREGPIO_H
#define EDIT_LIVEWIREGPIO_H #define EDIT_LIVEWIREGPIO_H
#include <qspinbox.h> #include <QLabel>
#include <qlineedit.h> #include <QLineEdit>
#include <qhostaddress.h> #include <QSpinBox>
#include <QHostAddress>
#include <rddialog.h> #include <rddialog.h>
#include <rdmatrix.h> #include <rdmatrix.h>
@ -32,18 +33,20 @@ class EditLiveWireGpio : public RDDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
EditLiveWireGpio(int slot,int *source,QHostAddress *addr,QWidget *parent=0); EditLiveWireGpio(QWidget *parent=0);
QSize sizeHint() const; QSize sizeHint() const;
QSizePolicy sizePolicy() const; QSizePolicy sizePolicy() const;
public slots:
int exec(int slot_id);
private slots: private slots:
void okData(); void okData();
void cancelData(); void cancelData();
private: private:
int edit_slot; int edit_id;
int *edit_source; QLabel *edit_title_label;
QHostAddress *edit_address;
QSpinBox *edit_source_number_spin; QSpinBox *edit_source_number_spin;
QLineEdit *edit_ip_address_edit; QLineEdit *edit_ip_address_edit;
}; };

View File

@ -1068,8 +1068,9 @@ void EditMatrix::livewireButtonData()
void EditMatrix::livewireGpioButtonData() void EditMatrix::livewireGpioButtonData()
{ {
ListLiveWireGpios *dialog=new ListLiveWireGpios(edit_matrix, AddGpioSlots();
edit_gpis_box->value()/RD_LIVEWIRE_GPIO_BUNDLE_SIZE,this); ListLiveWireGpios *dialog=
new ListLiveWireGpios(edit_matrix,edit_gpis_box->value(),this);
dialog->exec(); dialog->exec();
delete dialog; delete dialog;
} }
@ -1326,6 +1327,8 @@ bool EditMatrix::WriteMatrix()
AddEndpoints(RDMatrix::Output); AddEndpoints(RDMatrix::Output);
AddResources(RDMatrix::VguestTypeRelay); AddResources(RDMatrix::VguestTypeRelay);
AddResources(RDMatrix::VguestTypeDisplay); AddResources(RDMatrix::VguestTypeDisplay);
AddGpioSlots();
PurgeGpioSlots();
// //
// Update GPIO Tables // Update GPIO Tables
@ -1544,8 +1547,8 @@ void EditMatrix::AddResources(RDMatrix::VguestType type) const
sql+=QString().sprintf("NUMBER=%d",i+1); sql+=QString().sprintf("NUMBER=%d",i+1);
RDSqlQuery::apply(sql); RDSqlQuery::apply(sql);
} }
delete q;
} }
delete q;
} }
@ -1610,3 +1613,40 @@ bool EditMatrix::ConfirmPruneResources(RDMatrix::VguestType type)
delete q; delete q;
return true; return true;
} }
void EditMatrix::AddGpioSlots()
{
if(edit_matrix->type()==RDMatrix::LiveWireMcastGpio) {
int bundle_end=edit_gpis_box->value()/5;
for(int i=0;i<bundle_end;i++) {
QString sql=QString("select ")+
"ID "+ // 00
"from LIVEWIRE_GPIO_SLOTS where "+
"STATION_NAME=\""+RDEscapeString(edit_matrix->station())+"\" && "+
QString().sprintf("MATRIX=%d && ",edit_matrix->matrix())+
QString().sprintf("SLOT=%d",i);
RDSqlQuery *q=new RDSqlQuery(sql);
if(!q->first()) {
sql=QString("insert into LIVEWIRE_GPIO_SLOTS set ")+
"STATION_NAME=\""+RDEscapeString(edit_matrix->station())+"\","+
QString().sprintf("MATRIX=%d,",edit_matrix->matrix())+
QString().sprintf("SLOT=%d",i);
RDSqlQuery::apply(sql);
}
delete q;
}
}
}
void EditMatrix::PurgeGpioSlots()
{
if(edit_matrix->type()==RDMatrix::LiveWireMcastGpio) {
QString sql=QString("delete from LIVEWIRE_GPIO_SLOTS where ")+
"STATION_NAME=\""+RDEscapeString(edit_matrix->station())+"\" && "+
QString().sprintf("MATRIX=%d && ",edit_matrix->matrix())+
QString().sprintf("SLOT>=%d",edit_gpis_box->value()/5);
RDSqlQuery::apply(sql);
}
}

View File

@ -77,6 +77,9 @@ class EditMatrix : public RDDialog
void PruneResources(RDMatrix::VguestType type) const; void PruneResources(RDMatrix::VguestType type) const;
bool ConfirmPruneResources(RDMatrix::VguestType type); bool ConfirmPruneResources(RDMatrix::VguestType type);
void AddGpioSlots();
void PurgeGpioSlots();
RDMatrix *edit_matrix; RDMatrix *edit_matrix;
QString edit_stationname; QString edit_stationname;
int edit_matrix_number; int edit_matrix_number;
@ -142,9 +145,7 @@ class EditMatrix : public RDDialog
QSpinBox *edit_card_box; QSpinBox *edit_card_box;
QLabel *edit_displays_label; QLabel *edit_displays_label;
QSpinBox *edit_displays_box; QSpinBox *edit_displays_box;
}; };
#endif #endif // EDIT_MATRIX_H

View File

@ -2,7 +2,7 @@
// //
// List Rivendell Livewire GPIO Slot Associations // List Rivendell Livewire GPIO Slot Associations
// //
// (C) Copyright 2013-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -30,8 +30,6 @@ ListLiveWireGpios::ListLiveWireGpios(RDMatrix *matrix,int slot_quan,
QWidget *parent) QWidget *parent)
: RDDialog(parent) : RDDialog(parent)
{ {
setModal(true);
// //
// Fix the Window Size // Fix the Window Size
// //
@ -41,25 +39,24 @@ ListLiveWireGpios::ListLiveWireGpios(RDMatrix *matrix,int slot_quan,
list_slot_quan=slot_quan; list_slot_quan=slot_quan;
setWindowTitle("RDAdmin - "+tr("Livewire GPIO Source Assignments")); setWindowTitle("RDAdmin - "+tr("Livewire GPIO Source Assignments"));
//
// Dialogs
//
list_gpio_dialog=new EditLiveWireGpio(this);
// //
// Matrix List Box // Matrix List Box
// //
list_view=new RDListView(this); list_view=new RDTableView(this);
list_title_label=new QLabel(list_view,tr("Switchers:"),this); list_model=new RDGpioSlotsModel(matrix,slot_quan,this);
list_title_label->setFont(labelFont()); list_model->setFont(defaultFont());
list_view->setAllColumnsShowFocus(true); list_model->setPalette(palette());
list_view->setItemMargin(5); list_view->setModel(list_model);
list_view->addColumn(tr("Lines")); connect(list_view,SIGNAL(doubleClicked(const QModelIndex &)),
list_view->setColumnAlignment(0,Qt::AlignHCenter); this,SLOT(doubleClickedData(const QModelIndex &)));
list_view->addColumn(tr("Source #")); connect(list_model,SIGNAL(modelReset()),
list_view->setColumnAlignment(1,Qt::AlignCenter); list_view,SLOT(resizeColumnsToContents()));
list_view->addColumn(tr("Surface Address")); list_view->resizeColumnsToContents();
list_view->setColumnAlignment(2,Qt::AlignCenter);
list_view->setColumnSortType(0,RDListView::GpioSort);
connect(list_view,SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),
this,SLOT(doubleClickedData(Q3ListViewItem *,const QPoint &,int)));
RefreshList();
// //
// Edit Button // Edit Button
@ -70,28 +67,21 @@ ListLiveWireGpios::ListLiveWireGpios(RDMatrix *matrix,int slot_quan,
connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData())); connect(list_edit_button,SIGNAL(clicked()),this,SLOT(editData()));
// //
// Ok Button // Close Button
// //
list_ok_button=new QPushButton(this); list_close_button=new QPushButton(this);
list_ok_button->setDefault(true); list_close_button->setDefault(true);
list_ok_button->setFont(buttonFont()); list_close_button->setFont(buttonFont());
list_ok_button->setText(tr("&OK")); list_close_button->setText(tr("&Close"));
connect(list_ok_button,SIGNAL(clicked()),this,SLOT(okData())); connect(list_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
//
// Cancel Button
//
list_cancel_button=new QPushButton(this);
list_cancel_button->setDefault(true);
list_cancel_button->setFont(buttonFont());
list_cancel_button->setText(tr("&Cancel"));
connect(list_cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
} }
ListLiveWireGpios::~ListLiveWireGpios() ListLiveWireGpios::~ListLiveWireGpios()
{ {
delete list_gpio_dialog;
delete list_view; delete list_view;
delete list_model;
} }
@ -109,129 +99,33 @@ QSizePolicy ListLiveWireGpios::sizePolicy() const
void ListLiveWireGpios::editData() void ListLiveWireGpios::editData()
{ {
if(list_view->selectedItem()==NULL) { QModelIndexList rows=list_view->selectionModel()->selectedRows();
if(rows.size()!=1) {
return; return;
} }
int source=list_view->currentItem()->text(1).toInt(); int id=list_model->slotId(rows.first());
QHostAddress addr; if(list_gpio_dialog->exec(id)) {
addr.setAddress(list_view->currentItem()->text(2)); list_model->refresh(rows.first());
EditLiveWireGpio *d=
new EditLiveWireGpio(list_view->currentItem()->text(0).toInt(),
&source,&addr);
if(d->exec()==0) {
if(source==0) {
list_view->currentItem()->setText(1,tr("[none]"));
}
else {
list_view->currentItem()->setText(1,QString().sprintf("%d",source));
}
if(addr.isNull()) {
list_view->currentItem()->setText(2,tr("[all]"));
}
else {
list_view->currentItem()->setText(2,addr.toString());
}
} }
delete d;
} }
void ListLiveWireGpios::doubleClickedData(Q3ListViewItem *item,const QPoint &pt, void ListLiveWireGpios::doubleClickedData(const QModelIndex &index)
int col)
{ {
editData(); editData();
} }
void ListLiveWireGpios::okData() void ListLiveWireGpios::closeData()
{ {
QString sql; done(true);
RDSqlQuery *q;
int slot=0;
QString addr_str="NULL";
RDListViewItem *item=(RDListViewItem *)list_view->firstChild();
while(item!=NULL) {
QHostAddress addr;
addr_str="NULL";
addr.setAddress(item->text(2));
if(!addr.isNull()) {
addr_str="\""+addr.toString()+"\"";
}
sql=QString("update LIVEWIRE_GPIO_SLOTS set ")+
QString().sprintf("SOURCE_NUMBER=%d,",item->text(1).toInt())+
"IP_ADDRESS="+addr_str+" "+
"where (STATION_NAME=\""+RDEscapeString(list_matrix->station())+"\")&&"+
QString().sprintf("(MATRIX=%d)&&",list_matrix->matrix())+
QString().sprintf("(SLOT=%d)",slot);
q=new RDSqlQuery(sql);
delete q;
slot++;
item=(RDListViewItem *)item->nextSibling();
}
done(0);
}
void ListLiveWireGpios::cancelData()
{
done(-1);
} }
void ListLiveWireGpios::resizeEvent(QResizeEvent *e) void ListLiveWireGpios::resizeEvent(QResizeEvent *e)
{ {
list_view->setGeometry(10,24,size().width()-20,size().height()-94); list_view->setGeometry(10,3,size().width()-20,size().height()-73);
list_title_label->setGeometry(14,5,85,19);
list_edit_button->setGeometry(10,size().height()-60,80,50); list_edit_button->setGeometry(10,size().height()-60,80,50);
list_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); list_close_button->setGeometry(size().width()-90,size().height()-60,80,50);
list_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50);
}
void ListLiveWireGpios::RefreshList()
{
Q3ListViewItem *l;
QString sql;
RDSqlQuery *q;
RDSqlQuery *q1;
list_view->clear();
sql=QString("select SLOT,SOURCE_NUMBER,IP_ADDRESS from LIVEWIRE_GPIO_SLOTS ")+
"where (STATION_NAME=\""+RDEscapeString(list_matrix->station())+"\")&&"+
QString().sprintf("(MATRIX=%d) ",list_matrix->matrix())+
"order by SLOT";
q=new RDSqlQuery(sql);
q->first();
for(int i=0;i<list_slot_quan;i++) {
l=new RDListViewItem(list_view);
l->setText(0,QString().sprintf("%d - %d",5*i+1,5*i+5));
if(q->isValid()&&(q->value(0).toInt()==i)) {
if(q->value(1).toInt()==0) {
l->setText(1,tr("[none]"));
}
else {
l->setText(1,QString().sprintf("%d",q->value(1).toInt()));
}
if(q->value(2).toString().isEmpty()) {
l->setText(2,tr("[all]"));
}
else {
l->setText(2,q->value(2).toString());
}
q->next();
}
else {
sql=QString("insert into LIVEWIRE_GPIO_SLOTS set ")+
"STATION_NAME=\""+RDEscapeString(list_matrix->station())+"\","+
QString().sprintf("MATRIX=%d,",list_matrix->matrix())+
QString().sprintf("SLOT=%d",i);
q1=new RDSqlQuery(sql);
delete q1;
l->setText(1,tr("[none]"));
l->setText(2,tr("[all]"));
}
}
delete q;
} }

View File

@ -2,7 +2,7 @@
// //
// List Rivendell Livewire GPIO Slot Associations // List Rivendell Livewire GPIO Slot Associations
// //
// (C) Copyright 2013-2019 Fred Gleason <fredg@paravelsystems.com> // (C) Copyright 2013-2021 Fred Gleason <fredg@paravelsystems.com>
// //
// This program is free software; you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License version 2 as
@ -21,13 +21,16 @@
#ifndef LIST_LIVEWIREGPIOS_H #ifndef LIST_LIVEWIREGPIOS_H
#define LIST_LIVEWIREGPIOS_H #define LIST_LIVEWIREGPIOS_H
#include <qlabel.h>
#include <qpushbutton.h> #include <qpushbutton.h>
#include <rd.h> #include <rd.h>
#include <rddialog.h> #include <rddialog.h>
#include <rdlistview.h> //#include <rdlistview.h>
#include <rdgpioslotsmodel.h>
#include <rdmatrix.h> #include <rdmatrix.h>
#include <rdtableview.h>
#include "edit_livewiregpio.h"
class ListLiveWireGpios : public RDDialog class ListLiveWireGpios : public RDDialog
{ {
@ -40,22 +43,25 @@ class ListLiveWireGpios : public RDDialog
private slots: private slots:
void editData(); void editData();
void doubleClickedData(Q3ListViewItem *item,const QPoint &pt,int col); void doubleClickedData(const QModelIndex &index);
void okData(); void closeData();
void cancelData(); // void cancelData();
protected: protected:
void resizeEvent(QResizeEvent *e); void resizeEvent(QResizeEvent *e);
private: private:
void RefreshList(); // void RefreshList();
QLabel *list_title_label; // QLabel *list_title_label;
QPushButton *list_edit_button; QPushButton *list_edit_button;
QPushButton *list_ok_button; QPushButton *list_close_button;
QPushButton *list_cancel_button; // QPushButton *list_cancel_button;
RDListView *list_view; // RDListView *list_view;
RDTableView *list_view;
RDGpioSlotsModel *list_model;
RDMatrix *list_matrix; RDMatrix *list_matrix;
int list_slot_quan; int list_slot_quan;
EditLiveWireGpio *list_gpio_dialog;
}; };

View File

@ -2152,11 +2152,11 @@ Stále ještě chcete uložit?</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>None</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>None</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5786,7 +5786,7 @@ Stále ještě jej chcete smazat?</translation>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Přepínače:</translation> <translation type="obsolete">Přepínače:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
@ -5794,36 +5794,24 @@ Stále ještě jej chcete smazat?</translation>
</message> </message>
<message> <message>
<source>&amp;OK</source> <source>&amp;OK</source>
<translation type="unfinished">&amp;OK</translation> <translation type="obsolete">&amp;OK</translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">Z&amp;rušit</translation> <translation type="obsolete">Z&amp;rušit</translation>
</message> </message>
<message> <message>
<source>[none]</source> <source>[none]</source>
<translation type="unfinished">[žádný]</translation> <translation type="obsolete">[žádný]</translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Zavřít</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -1998,11 +1998,11 @@ Do you still want to save?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>None</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>None</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5432,7 +5432,7 @@ Generieren</translation>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Schalter:</translation> <translation type="obsolete">Schalter:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
@ -5440,36 +5440,24 @@ Generieren</translation>
</message> </message>
<message> <message>
<source>&amp;OK</source> <source>&amp;OK</source>
<translation type="unfinished">&amp;OK</translation> <translation type="obsolete">&amp;OK</translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">Abbre&amp;chen</translation> <translation type="obsolete">Abbre&amp;chen</translation>
</message> </message>
<message> <message>
<source>[none]</source> <source>[none]</source>
<translation type="unfinished">[keine]</translation> <translation type="obsolete">[keine]</translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Schliessen</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -2166,7 +2166,7 @@ Do you still want to save?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5737,7 +5737,7 @@ Do you still want to delete it?</source>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Suicheras:</translation> <translation type="obsolete">Suicheras:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
@ -5745,36 +5745,20 @@ Do you still want to delete it?</source>
</message> </message>
<message> <message>
<source>&amp;OK</source> <source>&amp;OK</source>
<translation type="unfinished">&amp;Aceptar</translation> <translation type="obsolete">&amp;Aceptar</translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">&amp;Cancelar</translation> <translation type="obsolete">&amp;Cancelar</translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Cerrar</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -1592,11 +1592,11 @@ Do you still want to save?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>None</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>None</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -4308,46 +4308,18 @@ Permissions</source>
</context> </context>
<context> <context>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message>
<source>Switchers:</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[none]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -1973,7 +1973,7 @@ Vil du framleis lagra?</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5297,7 +5297,7 @@ Klikk på &quot;Lisens&quot;-knappen for fleire opplysningar.</translation>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Svitsjarar:</translation> <translation type="obsolete">Svitsjarar:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
@ -5305,36 +5305,24 @@ Klikk på &quot;Lisens&quot;-knappen for fleire opplysningar.</translation>
</message> </message>
<message> <message>
<source>&amp;OK</source> <source>&amp;OK</source>
<translation type="unfinished">&amp;OK</translation> <translation type="obsolete">&amp;OK</translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">&amp;Avbryt</translation> <translation type="obsolete">&amp;Avbryt</translation>
</message> </message>
<message> <message>
<source>[none]</source> <source>[none]</source>
<translation type="unfinished">[ingen]</translation> <translation type="obsolete">[ingen]</translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Lukk</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -1973,7 +1973,7 @@ Vil du framleis lagra?</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5297,7 +5297,7 @@ Klikk på &quot;Lisens&quot;-knappen for fleire opplysningar.</translation>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Svitsjarar:</translation> <translation type="obsolete">Svitsjarar:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
@ -5305,36 +5305,24 @@ Klikk på &quot;Lisens&quot;-knappen for fleire opplysningar.</translation>
</message> </message>
<message> <message>
<source>&amp;OK</source> <source>&amp;OK</source>
<translation type="unfinished">&amp;OK</translation> <translation type="obsolete">&amp;OK</translation>
</message> </message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">&amp;Avbryt</translation> <translation type="obsolete">&amp;Avbryt</translation>
</message> </message>
<message> <message>
<source>[none]</source> <source>[none]</source>
<translation type="unfinished">[ingen]</translation> <translation type="obsolete">[ingen]</translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Lukk</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>

View File

@ -1979,7 +1979,7 @@ Você ainda quer salvar?</translation>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>The IP address is invalid!</source> <source>The Surface Address is invalid!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -5412,44 +5412,28 @@ Você ainda quer Deletar?</translation>
<name>ListLiveWireGpios</name> <name>ListLiveWireGpios</name>
<message> <message>
<source>Switchers:</source> <source>Switchers:</source>
<translation type="unfinished">Switchers:</translation> <translation type="obsolete">Switchers:</translation>
</message> </message>
<message> <message>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished">&amp;Editar</translation> <translation type="unfinished">&amp;Editar</translation>
</message> </message>
<message>
<source>&amp;OK</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>&amp;Cancel</source> <source>&amp;Cancel</source>
<translation type="unfinished">&amp;Cancelar</translation> <translation type="obsolete">&amp;Cancelar</translation>
</message> </message>
<message> <message>
<source>[none]</source> <source>[none]</source>
<translation type="unfinished">[Nenhum]</translation> <translation type="obsolete">[Nenhum]</translation>
</message>
<message>
<source>Lines</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Surface Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>[all]</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Source #</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Livewire GPIO Source Assignments</source> <source>Livewire GPIO Source Assignments</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&amp;Close</source>
<translation type="unfinished">&amp;Fechar</translation>
</message>
</context> </context>
<context> <context>
<name>ListMatrices</name> <name>ListMatrices</name>