mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-11 17:13:47 +02:00
2018-06-12 Fred Gleason <fredg@paravelsystems.com>
* Added a 'card-num' parameter to the 'Meter Enable' ['ME'] command in caed(8). * Added an 'RDCae::enableMetering()' method. * Modified rdairplay(1) to enable metering explicitly. * Modified rdcartslots(1) to enable metering explicitly. * Modified rdlibrary(1) to enable metering explicitly. * Modified rdpanel(1) to enable metering explicitly.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <rdapplication.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rddbheartbeat.h>
|
||||
#include <rdescape_string.h>
|
||||
|
||||
#include "rdcartslots.h"
|
||||
|
||||
@@ -92,6 +93,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),
|
||||
this,SLOT(caeConnectedData(bool)));
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
@@ -166,6 +169,22 @@ QSize MainWidget::sizeHint() const
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::caeConnectedData(bool state)
|
||||
{
|
||||
std::vector<int> cards;
|
||||
|
||||
QString sql=QString("select CARD from CARTSLOTS where ")+
|
||||
"STATION_NAME=\""+RDEscapeString(rda->config()->stationName())+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
cards.push_back(q->value(0).toInt());
|
||||
}
|
||||
delete q;
|
||||
|
||||
rda->cae()->enableMetering(&cards);
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::rmlReceivedData(RDMacro *rml)
|
||||
{
|
||||
RunLocalMacros(rml);
|
||||
|
Reference in New Issue
Block a user