mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-16 07:31:19 +02:00
2023-10-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed regressions in 'RDCae' that broke various mixer CAE commands. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -59,11 +59,9 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
applicationIcon(RDIconEngine::RdCartSlots,22));
|
||||
|
||||
//
|
||||
// CAE Connection
|
||||
// Start Meters
|
||||
//
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),
|
||||
this,SLOT(caeConnectedData(bool)));
|
||||
rda->cae()->connectToHost();
|
||||
EnableMetering();
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
@@ -137,22 +135,6 @@ QSize MainWidget::sizeHint() const
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::caeConnectedData(bool state)
|
||||
{
|
||||
QList<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);
|
||||
@@ -198,6 +180,22 @@ void MainWidget::closeEvent(QCloseEvent *e)
|
||||
}
|
||||
|
||||
|
||||
void MainWidget::EnableMetering()
|
||||
{
|
||||
QList<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::SetCaption()
|
||||
{
|
||||
QString service=tr("[None]");
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Dedicated Cart Slot Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2012-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2012-2023 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
|
||||
@@ -41,7 +41,6 @@ class MainWidget : public RDMainWindow
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
private slots:
|
||||
void caeConnectedData(bool state);
|
||||
void userData();
|
||||
void rmlReceivedData(RDMacro *rml);
|
||||
|
||||
@@ -50,6 +49,7 @@ class MainWidget : public RDMainWindow
|
||||
void closeEvent(QCloseEvent *e);
|
||||
|
||||
private:
|
||||
void EnableMetering();
|
||||
void RunLocalMacros(RDMacro *rml);
|
||||
void SetCaption();
|
||||
RDEventPlayer *panel_player;
|
||||
|
Reference in New Issue
Block a user