mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-14 15:48:23 +02:00
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
* Converted rdairplay(1) to use RDApplication.
This commit is contained in:
parent
f692a3ac0d
commit
a8ac305bdd
@ -16599,3 +16599,5 @@
|
||||
2018-01-30 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'RDApplication'class.
|
||||
* Converted rdlibrary(1) to use RDApplication.
|
||||
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Converted rdairplay(1) to use RDApplication.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The button log widget for RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -22,11 +22,12 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdlistviewitem.h>
|
||||
|
||||
#include <button_log.h>
|
||||
#include <colors.h>
|
||||
#include <globals.h>
|
||||
#include "button_log.h"
|
||||
#include "colors.h"
|
||||
#include "globals.h"
|
||||
|
||||
ButtonLog::ButtonLog(LogPlay *log,RDCae *cae,int id,RDAirPlayConf *conf,
|
||||
bool allow_pause,QWidget *parent)
|
||||
@ -68,8 +69,8 @@ ButtonLog::ButtonLog(LogPlay *log,RDCae *cae,int id,RDAirPlayConf *conf,
|
||||
for(int i=0;i<BUTTON_PLAY_BUTTONS;i++) {
|
||||
log_line_box[i]=new LogLineBox(conf,this);
|
||||
log_line_box[i]->setMode(LogLineBox::Full);
|
||||
log_line_box[i]->setAcceptDrops(rdstation_conf->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rdstation_conf->enableDragdrop());
|
||||
log_line_box[i]->setAcceptDrops(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setGeometry(10+log_line_box[i]->sizeHint().height(),
|
||||
(log_line_box[i]->sizeHint().height()+12)*i,
|
||||
log_line_box[i]->sizeHint().width(),
|
||||
@ -91,8 +92,8 @@ ButtonLog::ButtonLog(LogPlay *log,RDCae *cae,int id,RDAirPlayConf *conf,
|
||||
for(int i=BUTTON_PLAY_BUTTONS;i<BUTTON_TOTAL_BUTTONS;i++) {
|
||||
log_line_box[i]=new LogLineBox(conf,this);
|
||||
log_line_box[i]->setMode(LogLineBox::Half);
|
||||
log_line_box[i]->setAcceptDrops(rdstation_conf->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rdstation_conf->enableDragdrop());
|
||||
log_line_box[i]->setAcceptDrops(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setAllowDrags(rda->station()->enableDragdrop());
|
||||
log_line_box[i]->setGeometry(10+log_line_box[0]->sizeHint().height(),
|
||||
(log_line_box[0]->sizeHint().height()+12)*3+
|
||||
(log_line_box[i]->sizeHint().height()+12)*(i-3),
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Event Editor for RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -23,10 +23,11 @@
|
||||
#include <qpainter.h>
|
||||
#include <qmessagebox.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
|
||||
#include <edit_event.h>
|
||||
#include <globals.h>
|
||||
#include "edit_event.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditEvent::EditEvent(LogPlay *log,RDCae *cae,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
@ -132,9 +133,8 @@ EditEvent::EditEvent(LogPlay *log,RDCae *cae,QWidget *parent)
|
||||
//
|
||||
// Cue Editor
|
||||
//
|
||||
edit_cue_edit=
|
||||
new RDCueEdit(edit_cae,rdstation_conf->cueCard(),
|
||||
rdstation_conf->cuePort(),this);
|
||||
edit_cue_edit=new RDCueEdit(edit_cae,rda->station()->cueCard(),
|
||||
rda->station()->cuePort(),this);
|
||||
|
||||
//
|
||||
// Cart Notes
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Global Variable Declarations for RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -21,31 +21,18 @@
|
||||
#ifndef GLOBALS_H
|
||||
#define GLOBALS_H
|
||||
|
||||
#include <rdstation.h>
|
||||
#include <rdsystem.h>
|
||||
#include <rdairplay_conf.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdcae.h>
|
||||
#include <rdevent_player.h>
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rdconfig.h>
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
extern RDStation *rdstation_conf;
|
||||
extern RDSystem *rdsystem_conf;
|
||||
extern RDAirPlayConf *rdairplay_conf;
|
||||
extern RDAudioPort *rdaudioport_conf;
|
||||
extern RDUser *rduser;
|
||||
extern RDRipc *rdripc;
|
||||
extern RDEventPlayer *rdevent_player;
|
||||
extern RDCartDialog *rdcart_dialog;
|
||||
extern void LogLine(RDConfig::LogPriority prio,const QString &line);
|
||||
extern QString logfile;
|
||||
extern RDConfig *air_config;
|
||||
|
||||
|
||||
#endif // GLOBALS_H
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The full log list for RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2006,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2006,2016-2018 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
|
||||
@ -22,17 +22,19 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qpainter.h>
|
||||
#include <qmessagebox.h>
|
||||
#include <rddb.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rddebug.h>
|
||||
#include <rdlog.h>
|
||||
#include <rdcreate_log.h>
|
||||
|
||||
#include <list_log.h>
|
||||
#include <button_log.h>
|
||||
#include <colors.h>
|
||||
#include <globals.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcreate_log.h>
|
||||
#include <rddb.h>
|
||||
#include <rddebug.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rdlog.h>
|
||||
|
||||
#include "button_log.h"
|
||||
#include "colors.h"
|
||||
#include "globals.h"
|
||||
#include "list_log.h"
|
||||
|
||||
#include "../icons/play.xpm"
|
||||
#include "../icons/rml5.xpm"
|
||||
@ -162,10 +164,10 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_log_list->setFont(list_font);
|
||||
int y=0;
|
||||
int h=sizeHint().height()-60;
|
||||
if(rdairplay_conf->showCounters()) {
|
||||
if(rda->airplayConf()->showCounters()) {
|
||||
h-=60;
|
||||
}
|
||||
if(rdairplay_conf->hourSelectorEnabled()) {
|
||||
if(rda->airplayConf()->hourSelectorEnabled()) {
|
||||
y+=80;
|
||||
h-=80;
|
||||
list_hour_selector->setGeometry(0,0,sizeHint().width(),80);
|
||||
@ -233,7 +235,7 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
label->setFont(label_font);
|
||||
label->setAlignment(AlignCenter);
|
||||
label->setBackgroundColor(QColor(system_mid_color));
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
label->hide();
|
||||
}
|
||||
|
||||
@ -247,7 +249,7 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_stoptime_label->setFont(label_font);
|
||||
list_stoptime_label->setAlignment(AlignRight|AlignVCenter);
|
||||
list_stoptime_label->setBackgroundColor(QColor(system_mid_color));
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
list_stoptime_edit->hide();
|
||||
list_stoptime_label->hide();
|
||||
}
|
||||
@ -262,7 +264,7 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_endtime_label->setFont(label_font);
|
||||
list_endtime_label->setAlignment(AlignRight|AlignVCenter);
|
||||
list_endtime_label->setBackgroundColor(QColor(system_mid_color));
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
list_endtime_edit->hide();
|
||||
list_endtime_label->hide();
|
||||
}
|
||||
@ -289,7 +291,7 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_head_button->setText(tr("Audition\nHead"));
|
||||
list_head_button->setFocusPolicy(QWidget::NoFocus);
|
||||
connect(list_head_button,SIGNAL(clicked()),this,SLOT(headButtonData()));
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
list_head_button->hide();
|
||||
}
|
||||
|
||||
@ -303,7 +305,7 @@ ListLog::ListLog(LogPlay *log,RDCae *cae,int id,bool allow_pause,
|
||||
list_tail_button->setText(tr("Audition\nTail"));
|
||||
list_tail_button->setFocusPolicy(QWidget::NoFocus);
|
||||
connect(list_tail_button,SIGNAL(clicked()),this,SLOT(tailButtonData()));
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
list_tail_button->hide();
|
||||
}
|
||||
|
||||
@ -872,7 +874,7 @@ void ListLog::loadButtonData()
|
||||
break;
|
||||
|
||||
case ListLogs::SaveAs:
|
||||
if(!RDLog::create(name,svcname,rdripc->user(),&err_msg,air_config)) {
|
||||
if(!RDLog::create(name,svcname,rda->ripc()->user(),&err_msg,rda->config())) {
|
||||
QMessageBox::warning(this,"RDAirPlay - "+tr("Error"),err_msg);
|
||||
return;
|
||||
}
|
||||
@ -1085,7 +1087,7 @@ void ListLog::cartDroppedData(int line,RDLogLine *ll)
|
||||
|
||||
void ListLog::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
if(!rdairplay_conf->showCounters()) {
|
||||
if(!rda->airplayConf()->showCounters()) {
|
||||
return;
|
||||
}
|
||||
int x=336;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Select a Rivendell Log
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -22,11 +22,12 @@
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#include <rdadd_log.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <list_logs.h>
|
||||
#include "globals.h"
|
||||
#include "list_logs.h"
|
||||
|
||||
ListLogs::ListLogs(LogPlay *log,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
@ -49,7 +50,7 @@ ListLogs::ListLogs(LogPlay *log,QWidget *parent)
|
||||
// Filter Widget
|
||||
//
|
||||
list_filter_widget=
|
||||
new RDLogFilter(RDLogFilter::StationFilter,rduser,air_config,this);
|
||||
new RDLogFilter(RDLogFilter::StationFilter,rda->user(),rda->config(),this);
|
||||
connect(list_filter_widget,SIGNAL(filterChanged(const QString &)),
|
||||
this,SLOT(filterChangedData(const QString &)));
|
||||
|
||||
@ -127,10 +128,10 @@ int ListLogs::exec(QString *logname,QString *svcname,RDLogLock **log_lock)
|
||||
list_logname=logname;
|
||||
list_svcname=svcname;
|
||||
list_log_lock=log_lock;
|
||||
list_saveas_button->setEnabled(rduser->createLog());
|
||||
list_saveas_button->setEnabled(rda->user()->createLog());
|
||||
QStringList services_list;
|
||||
QString sql=QString("select SERVICE_NAME from SERVICE_PERMS where ")+
|
||||
"STATION_NAME=\""+RDEscapeString(rdstation_conf->name())+"\"";
|
||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\"";
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
services_list.push_back(tr("ALL"));
|
||||
while(q->next()) {
|
||||
@ -179,7 +180,7 @@ void ListLogs::saveButtonData()
|
||||
saveAsButtonData();
|
||||
}
|
||||
else {
|
||||
*list_log_lock=new RDLogLock(*list_logname,rduser,rdstation_conf,this);
|
||||
*list_log_lock=new RDLogLock(*list_logname,rda->user(),rda->station(),this);
|
||||
if(!TryLock(*list_log_lock)) {
|
||||
delete *list_log_lock;
|
||||
*list_log_lock=NULL;
|
||||
@ -202,8 +203,8 @@ void ListLogs::saveAsButtonData()
|
||||
QString logname;
|
||||
QString svcname=*list_svcname;
|
||||
RDAddLog *log;
|
||||
log=new RDAddLog(&logname,&svcname,RDLogFilter::StationFilter,rduser,
|
||||
rdstation_conf,tr("Rename Log"),this);
|
||||
log=new RDAddLog(&logname,&svcname,RDLogFilter::StationFilter,rda->user(),
|
||||
rda->station(),tr("Rename Log"),this);
|
||||
if(log->exec()<0) {
|
||||
delete log;
|
||||
return;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Local RML Macros for the Rivendell's RDAirPlay
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -20,13 +20,14 @@
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
|
||||
#include <rdmacro.h>
|
||||
#include <rdairplay.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdmacro.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <button_log.h>
|
||||
#include "globals.h"
|
||||
#include "button_log.h"
|
||||
#include "rdairplay.h"
|
||||
|
||||
void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
{
|
||||
@ -66,7 +67,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -92,7 +93,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -100,14 +101,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((rml->argQuantity()<1)||(rml->argQuantity()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -119,7 +120,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(!RDLog::exists(logname)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -161,7 +162,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -169,14 +170,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=2) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -184,7 +185,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(!RDLog::exists(logname)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -195,14 +196,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=2) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -210,14 +211,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(1).toInt()>=air_log[rml->arg(0).toInt()-1]->size())) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
air_log[rml->arg(0).toInt()-1]->makeNext(rml->arg(1).toInt());
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -225,7 +226,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=1) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -233,14 +234,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(0).toInt()>BUTTON_TOTAL_BUTTONS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
return;
|
||||
}
|
||||
}
|
||||
air_button_list->startButton(rml->arg(0).toInt()-1);
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -248,14 +249,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<5) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -265,7 +266,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -280,7 +281,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
rml->arg(rml->argQuantity()-1).toString());
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -288,14 +289,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=4) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -306,7 +307,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(3).toUInt()>999999)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -314,7 +315,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
rml->arg(1).toInt()-1,rml->arg(3).toUInt());
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -322,14 +323,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=2) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -337,7 +338,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(1).toInt()>=air_log[rml->arg(0).toInt()-1]->size())) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -346,14 +347,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
RDLogLine::StartMacro)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -361,7 +362,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((rml->argQuantity()!=1)&&(rml->argQuantity()!=2)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -370,7 +371,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((mach<0)||(mach>RDAIRPLAY_LOG_QUANTITY)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -391,13 +392,13 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
default:
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -405,14 +406,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((rml->argQuantity()<1)||(rml->argQuantity()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -420,7 +421,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((rml->arg(1).toInt()<1)||(rml->arg(1).toInt()>2)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -428,7 +429,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if((rml->arg(2).toInt()<0)||(rml->arg(2).toInt()>1)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -456,7 +457,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -464,14 +465,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<3 || rml->argQuantity()>5) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -481,7 +482,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -513,7 +514,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -521,14 +522,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<1 || rml->argQuantity()>3) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<0)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -556,7 +557,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -564,14 +565,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<3 || rml->argQuantity()>4) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<0)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -596,7 +597,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -604,14 +605,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<3 || rml->argQuantity()>6) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -621,7 +622,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -665,7 +666,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -673,14 +674,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<3 || rml->argQuantity()>4) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -690,7 +691,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -704,7 +705,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(ret);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -712,14 +713,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()<5 || rml->argQuantity()>6) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!GetPanel(rml->arg(0).toString(),&panel_type,&panel_number)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -729,7 +730,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -744,7 +745,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -753,14 +754,14 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=1) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<0)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -777,7 +778,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -785,7 +786,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=2) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -793,7 +794,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(1).toUInt()>999999)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -811,7 +812,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -819,27 +820,27 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=1) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(!air_log[rml->arg(0).toInt()-1]->refresh()) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -847,7 +848,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
if(rml->argQuantity()!=3) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -855,21 +856,21 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
(rml->arg(0).toString().lower()!="next")) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if((rml->arg(1).toInt()<1)||(rml->arg(1).toInt()>3)) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(rml->arg(2).toUInt()>999999) {
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(false);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -881,7 +882,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
||||
}
|
||||
if(rml->echoRequested()) {
|
||||
rml->acknowledge(true);
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -930,7 +931,7 @@ bool MainWidget::GetPanel(QString str,RDAirPlayConf::PanelType *type,
|
||||
if(sscanf(((const char *)str)+1,"%d",panel)!=1) {
|
||||
return false;
|
||||
}
|
||||
if((*panel<=0)||(*panel>rdairplay_conf->panels(*type))) {
|
||||
if((*panel<=0)||(*panel>rda->airplayConf()->panels(*type))) {
|
||||
return false;
|
||||
}
|
||||
(*panel)--;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Rivendell Log Playout Machine
|
||||
//
|
||||
// (C) Copyright 2002-2009,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2009,2016-2018 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
|
||||
@ -21,13 +21,15 @@
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <rdmixer.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rddb.h>
|
||||
#include <rddebug.h>
|
||||
#include <rdlog.h>
|
||||
#include <rddb.h>
|
||||
#include <log_play.h>
|
||||
#include <log_traffic.h>
|
||||
#include <globals.h>
|
||||
#include <rdmixer.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include "log_play.h"
|
||||
#include "log_traffic.h"
|
||||
|
||||
LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
std::vector<RLMHost *> *rlm_hosts,QObject *parent)
|
||||
@ -40,8 +42,8 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
play_id=id;
|
||||
play_rlm_hosts=rlm_hosts;
|
||||
play_onair_flag=false;
|
||||
play_segue_length=rdairplay_conf->segueLength()+1;
|
||||
play_trans_length=rdairplay_conf->transLength()+1;
|
||||
play_segue_length=rda->airplayConf()->segueLength()+1;
|
||||
play_trans_length=rda->airplayConf()->transLength()+1;
|
||||
play_duck_volume_port1=0;
|
||||
play_duck_volume_port2=0;
|
||||
play_start_next=false;
|
||||
@ -58,7 +60,7 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
play_timescaling_available=false;
|
||||
play_rescan_pos=0;
|
||||
play_refreshable=false;
|
||||
play_audition_preroll=rdairplay_conf->auditionPreroll();
|
||||
play_audition_preroll=rda->airplayConf()->auditionPreroll();
|
||||
for(int i=0;i<LOGPLAY_MAX_PLAYS;i++) {
|
||||
play_slot_id[i]=i;
|
||||
}
|
||||
@ -66,7 +68,7 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
play_cae=new RDCae(rdstation_conf,air_config,parent);
|
||||
play_cae=new RDCae(rda->station(),rda->config(),parent);
|
||||
play_cae->connectHost();
|
||||
|
||||
for(int i=0;i<2;i++) {
|
||||
@ -83,10 +85,10 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
}
|
||||
play_macro_running=false;
|
||||
play_refresh_pending=false;
|
||||
play_nownext_string=rdairplay_conf->udpString(id);
|
||||
play_nownext_address=rdairplay_conf->udpAddress(id);
|
||||
play_nownext_port=rdairplay_conf->udpPort(id);
|
||||
play_nownext_rml=rdairplay_conf->logRml(id);
|
||||
play_nownext_string=rda->airplayConf()->udpString(id);
|
||||
play_nownext_address=rda->airplayConf()->udpAddress(id);
|
||||
play_nownext_port=rda->airplayConf()->udpPort(id);
|
||||
play_nownext_rml=rda->airplayConf()->logRml(id);
|
||||
play_now_cartnum=0;
|
||||
play_next_cartnum=0;
|
||||
play_prevnow_cartnum=0;
|
||||
@ -96,7 +98,7 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
//
|
||||
// Macro Cart Decks
|
||||
//
|
||||
play_macro_deck=new RDMacroEvent(rdstation_conf->address(),rdripc,this);
|
||||
play_macro_deck=new RDMacroEvent(rda->station()->address(),rda->ripc(),this);
|
||||
connect(play_macro_deck,SIGNAL(started()),this,SLOT(macroStartedData()));
|
||||
connect(play_macro_deck,SIGNAL(finished()),this,SLOT(macroFinishedData()));
|
||||
connect(play_macro_deck,SIGNAL(stopped()),this,SLOT(macroStoppedData()));
|
||||
@ -110,18 +112,18 @@ LogPlay::LogPlay(int id,QSocketDevice *nn_sock,QString logname,
|
||||
//
|
||||
// RIPC Signals
|
||||
//
|
||||
connect(rdripc,SIGNAL(onairFlagChanged(bool)),
|
||||
connect(rda->ripc(),SIGNAL(onairFlagChanged(bool)),
|
||||
this,SLOT(onairFlagChangedData(bool)));
|
||||
|
||||
//
|
||||
// Audition Player
|
||||
//
|
||||
play_audition_line=-1;
|
||||
if((rdstation_conf->cueCard()>=0)&&
|
||||
(rdstation_conf->cuePort()>=0)) {
|
||||
if((rda->station()->cueCard()>=0)&&
|
||||
(rda->station()->cuePort()>=0)) {
|
||||
play_audition_player=
|
||||
new RDSimplePlayer(play_cae,rdripc,rdstation_conf->cueCard(),
|
||||
rdstation_conf->cuePort(),0,0);
|
||||
new RDSimplePlayer(play_cae,rda->ripc(),rda->station()->cueCard(),
|
||||
rda->station()->cuePort(),0,0);
|
||||
play_audition_player->playButton()->hide();
|
||||
play_audition_player->stopButton()->hide();
|
||||
connect(play_audition_player,SIGNAL(played()),
|
||||
@ -212,7 +214,7 @@ void LogPlay::setLogName(QString name)
|
||||
if(logName()!=name) {
|
||||
RDLogEvent::setLogName(name);
|
||||
emit renamed();
|
||||
rdairplay_conf->setCurrentLog(play_id,name.left(name.length()-4));
|
||||
rda->airplayConf()->setCurrentLog(play_id,name.left(name.length()-4));
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,7 +757,7 @@ bool LogPlay::refresh()
|
||||
|
||||
void LogPlay::save(int line)
|
||||
{
|
||||
RDLogEvent::save(air_config,line);
|
||||
RDLogEvent::save(rda->config(),line);
|
||||
if(play_log!=NULL) {
|
||||
delete play_log;
|
||||
}
|
||||
@ -834,7 +836,7 @@ void LogPlay::insert(int line,int cartnum,RDLogLine::TransType next_type,
|
||||
play_next_line=line;
|
||||
}
|
||||
logline->loadCart(cartnum,next_type,play_id,play_timescaling_available,
|
||||
rdairplay_conf->defaultTransType());
|
||||
rda->airplayConf()->defaultTransType());
|
||||
logline->
|
||||
setTimescalingActive(play_timescaling_available&&logline->enforceLength());
|
||||
UpdateStartTimes(line);
|
||||
@ -1601,7 +1603,7 @@ void LogPlay::macroStartedData()
|
||||
logline->setStatus(RDLogLine::Playing);
|
||||
logline->
|
||||
setStartTime(RDLogLine::Initial,
|
||||
QTime::currentTime().addMSecs(rdstation_conf->timeOffset()));
|
||||
QTime::currentTime().addMSecs(rda->station()->timeOffset()));
|
||||
UpdateStartTimes(line);
|
||||
emit played(line);
|
||||
UpdatePostPoint();
|
||||
@ -1803,7 +1805,7 @@ bool LogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
|
||||
switch(logline->type()) {
|
||||
case RDLogLine::Cart:
|
||||
if(!StartAudioEvent(line)) {
|
||||
rdairplay_conf->setLogCurrentLine(play_id,nextLine());
|
||||
rda->airplayConf()->setLogCurrentLine(play_id,nextLine());
|
||||
return false;
|
||||
}
|
||||
aport=GetNextChannel(mport,&card,&port);
|
||||
@ -1832,7 +1834,7 @@ bool LogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
|
||||
LogLine(RDConfig::LogErr,QString().
|
||||
sprintf("LogPlay::StartEvent(): no audio,CUT=%s",
|
||||
(const char *)logline->cutName()));
|
||||
rdairplay_conf->setLogCurrentLine(play_id,nextLine());
|
||||
rda->airplayConf()->setLogCurrentLine(play_id,nextLine());
|
||||
return false;
|
||||
}
|
||||
emit modified(line);
|
||||
@ -1918,7 +1920,7 @@ bool LogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
|
||||
rml->setEchoRequested(false);
|
||||
rml->setArgQuantity(1);
|
||||
rml->setArg(0,logline->cartNumber());
|
||||
rdripc->sendRml(rml);
|
||||
rda->ripc()->sendRml(rml);
|
||||
delete rml;
|
||||
emit played(line);
|
||||
logline->setStartTime(RDLogLine::Actual,QTime::currentTime());
|
||||
@ -2013,13 +2015,13 @@ bool LogPlay::StartEvent(int line,RDLogLine::TransType trans_type,
|
||||
if((logline->state()==RDLogLine::Ok)||
|
||||
(logline->state()==RDLogLine::NoCart)||
|
||||
(logline->state()==RDLogLine::NoCut)) {
|
||||
rdairplay_conf->setLogCurrentLine(play_id,nextLine());
|
||||
rda->airplayConf()->setLogCurrentLine(play_id,nextLine());
|
||||
return true;
|
||||
}
|
||||
play_next_line++;
|
||||
}
|
||||
play_next_line=-1;
|
||||
rdairplay_conf->setLogCurrentLine(play_id,nextLine());
|
||||
rda->airplayConf()->setLogCurrentLine(play_id,nextLine());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Add an entry to the reconciliation table.
|
||||
//
|
||||
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2016-2018 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
|
||||
@ -18,15 +18,14 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qsqldatabase.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdsvc.h>
|
||||
|
||||
#include <log_traffic.h>
|
||||
#include <globals.h>
|
||||
#include "globals.h"
|
||||
#include "log_traffic.h"
|
||||
|
||||
void LogTraffic(const QString &svcname,const QString &logname,
|
||||
RDLogLine *logline,RDLogLine::PlaySource src,
|
||||
@ -56,7 +55,7 @@ void LogTraffic(const QString &svcname,const QString &logname,
|
||||
"LOG_NAME=\""+RDEscapeString(logname.utf8())+"\","+
|
||||
QString().sprintf("LOG_ID=%d,",logline->id())+
|
||||
QString().sprintf("CART_NUMBER=%u,",logline->cartNumber())+
|
||||
"STATION_NAME=\""+RDEscapeString(rdstation_conf->name().utf8())+"\","+
|
||||
"STATION_NAME=\""+RDEscapeString(rda->station()->name().utf8())+"\","+
|
||||
"EVENT_DATETIME="+eventDateTimeSQL+","+
|
||||
QString().sprintf("EVENT_TYPE=%d,",action)+
|
||||
QString().sprintf("EVENT_SOURCE=%d,",logline->source())+
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// On Air Playout Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -20,14 +20,14 @@
|
||||
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdplay_deck.h>
|
||||
#include <rdairplay_conf.h>
|
||||
#include <rdnownext.h>
|
||||
|
||||
#include <loglinebox.h>
|
||||
#include <colors.h>
|
||||
#include <globals.h>
|
||||
#include "colors.h"
|
||||
#include "globals.h"
|
||||
#include "loglinebox.h"
|
||||
|
||||
#include "../icons/play.xpm"
|
||||
#include "../icons/rml5.xpm"
|
||||
@ -882,7 +882,7 @@ void LogLineBox::SetColor(QColor color)
|
||||
|
||||
void LogLineBox::UpdateCountdown()
|
||||
{
|
||||
QTime current=QTime::currentTime().addMSecs(rdstation_conf->timeOffset());
|
||||
QTime current=QTime::currentTime().addMSecs(rda->station()->timeOffset());
|
||||
|
||||
if(current<line_end_time) {
|
||||
line_length_label->setText(RDGetTimeLength(current.msecsTo(line_end_time),
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The post counter widget for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -21,9 +21,11 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <post_counter.h>
|
||||
#include <colors.h>
|
||||
#include <globals.h>
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "colors.h"
|
||||
#include "globals.h"
|
||||
#include "post_counter.h"
|
||||
|
||||
PostCounter::PostCounter(QWidget *parent)
|
||||
: QPushButton(parent)
|
||||
@ -130,7 +132,7 @@ void PostCounter::UpdateDisplay()
|
||||
QString point;
|
||||
QString state;
|
||||
QTime current_time=
|
||||
QTime::currentTime().addMSecs(rdstation_conf->timeOffset());
|
||||
QTime::currentTime().addMSecs(rda->station()->timeOffset());
|
||||
int offset=post_offset;
|
||||
if(!post_running) {
|
||||
offset-=current_time.msecsTo(post_set_time);
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The On Air Playout Utility for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2010,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2010,2016-2018 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
|
||||
@ -42,17 +42,14 @@
|
||||
#include <qtranslator.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdairplay.h>
|
||||
#include <rdstation.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rdcart_search_text.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rdairplay_conf.h>
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rdmacro.h>
|
||||
#include <rdcmd_switch.h>
|
||||
@ -60,26 +57,19 @@
|
||||
#include <rddatedecode.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <dbversion.h>
|
||||
|
||||
#include <wall_clock.h>
|
||||
#include <globals.h>
|
||||
|
||||
#include<rdhotkeys.h>
|
||||
#include <rdhotkeys.h>
|
||||
#include <rdhotkeylist.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include "rdairplay.h"
|
||||
#include "wall_clock.h"
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
RDStation *rdstation_conf;
|
||||
RDSystem *rdsystem_conf;
|
||||
RDAirPlayConf *rdairplay_conf;
|
||||
RDAudioPort *rdaudioport_conf;
|
||||
RDUser *rduser;
|
||||
RDRipc *rdripc;
|
||||
RDEventPlayer *rdevent_player;
|
||||
RDCartDialog *rdcart_dialog;
|
||||
RDConfig *air_config;
|
||||
MainWidget *prog_ptr;
|
||||
RDHotKeyList *rdkeylist;
|
||||
RDHotkeys *rdhotkeys;
|
||||
@ -112,10 +102,10 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
QPixmap *mainmap=NULL;
|
||||
QPixmap *pm=NULL;
|
||||
QPainter *pd=NULL;
|
||||
QString err_msg;
|
||||
|
||||
air_refresh_pixmap=NULL;
|
||||
air_panel=NULL;
|
||||
bool skip_db_check=false;
|
||||
unsigned schema=0;
|
||||
|
||||
//
|
||||
// Ensure Single Instance
|
||||
@ -150,7 +140,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
RDAIRPLAY_USAGE);
|
||||
for(unsigned i=0;i<cmd->keys();i++) {
|
||||
if(cmd->key(i)=="--skip-db-check") {
|
||||
skip_db_check=true;
|
||||
}
|
||||
}
|
||||
for(unsigned i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
@ -163,7 +152,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
if(cmd->value(j).at(k)==QChar(':')) {
|
||||
air_start_logname[i]=
|
||||
RDDateTimeDecode(cmd->value(j).left(k),air_startup_datetime,
|
||||
rdstation_conf,air_config);
|
||||
rda->station(),rda->config());
|
||||
lineno=cmd->value(j).right(cmd->value(j).length()-(k+1));
|
||||
if(lineno.right(1)=="+") {
|
||||
air_start_start[i]=true;
|
||||
@ -222,35 +211,17 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
|
||||
air_action_mode=StartButton::Play;
|
||||
|
||||
//
|
||||
// Load Local Configs
|
||||
//
|
||||
air_config=new RDConfig(RD_CONF_FILE);
|
||||
air_config->load();
|
||||
air_config->setModuleName("RDAirPlay");
|
||||
rda=new RDApplication("RDAirPlay",this);
|
||||
if(!rda->open(&err_msg)) {
|
||||
QMessageBox::critical(this,"RDAirPlay - "+tr("Error"),err_msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
logfile=air_config->airplayLogname();
|
||||
logfile=rda->config()->airplayLogname();
|
||||
|
||||
str=QString("RDAirPlay")+" v"+VERSION+" - "+tr("Host:");
|
||||
setCaption(QString().sprintf("%s %s",(const char *)str,
|
||||
(const char *)air_config->stationName()));
|
||||
setCaption(str+" "+rda->config()->stationName());
|
||||
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
QString err;
|
||||
QSqlDatabase *db=RDInitDb(&schema,&err);
|
||||
if(!db) {
|
||||
QMessageBox::warning(this,tr("Database Error"),
|
||||
//tr("Can't Connect","Unable to connect to mySQL Server!"));
|
||||
err);
|
||||
exit(0);
|
||||
}
|
||||
if((schema!=RD_VERSION_DATABASE)&&(!skip_db_check)) {
|
||||
fprintf(stderr,"rdlogin: database version mismatch, should be %u, is %u\n",
|
||||
RD_VERSION_DATABASE,schema);
|
||||
exit(256);
|
||||
}
|
||||
connect (RDDbStatus(),SIGNAL(logText(RDConfig::LogPriority,const QString &)),
|
||||
this,SLOT(logLine(RDConfig::LogPriority,const QString &)));
|
||||
|
||||
@ -264,19 +235,16 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Allocate Global Resources
|
||||
//
|
||||
rdstation_conf=new RDStation(air_config->stationName());
|
||||
rdsystem_conf=new RDSystem();
|
||||
rdairplay_conf=new RDAirPlayConf(air_config->stationName(),"RDAIRPLAY");
|
||||
rdairplay_previous_exit_code=rdairplay_conf->exitCode();
|
||||
rdairplay_conf->setExitCode(RDAirPlayConf::ExitDirty);
|
||||
air_clear_filter=rdairplay_conf->clearFilter();
|
||||
air_bar_action=rdairplay_conf->barAction();
|
||||
air_op_mode_style=rdairplay_conf->opModeStyle();
|
||||
rdairplay_previous_exit_code=rda->airplayConf()->exitCode();
|
||||
rda->airplayConf()->setExitCode(RDAirPlayConf::ExitDirty);
|
||||
air_clear_filter=rda->airplayConf()->clearFilter();
|
||||
air_bar_action=rda->airplayConf()->barAction();
|
||||
air_op_mode_style=rda->airplayConf()->opModeStyle();
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
air_op_mode[i]=RDAirPlayConf::Previous;
|
||||
}
|
||||
air_editor_cmd=rdstation_conf->editorPath();
|
||||
mainmap=new QPixmap(rdairplay_conf->skinPath());
|
||||
air_editor_cmd=rda->station()->editorPath();
|
||||
mainmap=new QPixmap(rda->airplayConf()->skinPath());
|
||||
if(mainmap->isNull()||(mainmap->width()<1024)||(mainmap->height()<738)) {
|
||||
delete mainmap;
|
||||
mainmap=NULL;
|
||||
@ -290,21 +258,21 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
for(unsigned i=0;i<RDAirPlayConf::LastChannel;i++) {
|
||||
RDAirPlayConf::Channel chan=(RDAirPlayConf::Channel)i;
|
||||
air_start_gpi_matrices[i]=rdairplay_conf->startGpiMatrix(chan);
|
||||
air_start_gpi_lines[i]=rdairplay_conf->startGpiLine(chan)-1;
|
||||
air_start_gpo_matrices[i]=rdairplay_conf->startGpoMatrix(chan);
|
||||
air_start_gpo_lines[i]=rdairplay_conf->startGpoLine(chan)-1;
|
||||
air_stop_gpi_matrices[i]=rdairplay_conf->stopGpiMatrix(chan);
|
||||
air_stop_gpi_lines[i]=rdairplay_conf->stopGpiLine(chan)-1;
|
||||
air_stop_gpo_matrices[i]=rdairplay_conf->stopGpoMatrix(chan);
|
||||
air_stop_gpo_lines[i]=rdairplay_conf->stopGpoLine(chan)-1;
|
||||
air_channel_gpio_types[i]=rdairplay_conf->gpioType(chan);
|
||||
air_start_gpi_matrices[i]=rda->airplayConf()->startGpiMatrix(chan);
|
||||
air_start_gpi_lines[i]=rda->airplayConf()->startGpiLine(chan)-1;
|
||||
air_start_gpo_matrices[i]=rda->airplayConf()->startGpoMatrix(chan);
|
||||
air_start_gpo_lines[i]=rda->airplayConf()->startGpoLine(chan)-1;
|
||||
air_stop_gpi_matrices[i]=rda->airplayConf()->stopGpiMatrix(chan);
|
||||
air_stop_gpi_lines[i]=rda->airplayConf()->stopGpiLine(chan)-1;
|
||||
air_stop_gpo_matrices[i]=rda->airplayConf()->stopGpoMatrix(chan);
|
||||
air_stop_gpo_lines[i]=rda->airplayConf()->stopGpoLine(chan)-1;
|
||||
air_channel_gpio_types[i]=rda->airplayConf()->gpioType(chan);
|
||||
air_audio_channels[i]=
|
||||
AudioChannel(rdairplay_conf->card(chan),rdairplay_conf->port(chan));
|
||||
AudioChannel(rda->airplayConf()->card(chan),rda->airplayConf()->port(chan));
|
||||
|
||||
if((rdairplay_conf->card(chan)>=0)&&(rdairplay_conf->port(chan)>=0)) {
|
||||
if((rda->airplayConf()->card(chan)>=0)&&(rda->airplayConf()->port(chan)>=0)) {
|
||||
int achan=
|
||||
AudioChannel(rdairplay_conf->card(chan),rdairplay_conf->port(chan));
|
||||
AudioChannel(rda->airplayConf()->card(chan),rda->airplayConf()->port(chan));
|
||||
if(air_channel_timers[0][achan]==NULL) {
|
||||
air_channel_timers[0][achan]=new QTimer(this);
|
||||
air_channel_timers[1][achan]=new QTimer(this);
|
||||
@ -315,11 +283,11 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Fixup Main Log GPIO Channel Assignments
|
||||
//
|
||||
if(((rdairplay_conf->card(RDAirPlayConf::MainLog1Channel)==
|
||||
rdairplay_conf->card(RDAirPlayConf::MainLog2Channel))&&
|
||||
(rdairplay_conf->port(RDAirPlayConf::MainLog1Channel)==
|
||||
rdairplay_conf->port(RDAirPlayConf::MainLog2Channel)))||
|
||||
rdairplay_conf->card(RDAirPlayConf::MainLog2Channel)<0) {
|
||||
if(((rda->airplayConf()->card(RDAirPlayConf::MainLog1Channel)==
|
||||
rda->airplayConf()->card(RDAirPlayConf::MainLog2Channel))&&
|
||||
(rda->airplayConf()->port(RDAirPlayConf::MainLog1Channel)==
|
||||
rda->airplayConf()->port(RDAirPlayConf::MainLog2Channel)))||
|
||||
rda->airplayConf()->card(RDAirPlayConf::MainLog2Channel)<0) {
|
||||
air_start_gpi_matrices[RDAirPlayConf::MainLog2Channel]=-1;
|
||||
air_start_gpo_matrices[RDAirPlayConf::MainLog2Channel]=-1;
|
||||
air_stop_gpi_matrices[RDAirPlayConf::MainLog2Channel]=
|
||||
@ -330,35 +298,33 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
air_cae=new RDCae(rdstation_conf,air_config,parent);
|
||||
air_cae->connectHost();
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
// Set Audio Assignments
|
||||
//
|
||||
air_segue_length=rdairplay_conf->segueLength()+1;
|
||||
RDSetMixerPorts(air_config->stationName(),air_cae);
|
||||
air_segue_length=rda->airplayConf()->segueLength()+1;
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
rdripc=new RDRipc(rdstation_conf,air_config,this);
|
||||
connect(rdripc,SIGNAL(connected(bool)),this,SLOT(ripcConnected(bool)));
|
||||
connect(rdripc,SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rdripc,SIGNAL(rmlReceived(RDMacro *)),
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(ripcConnected(bool)));
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(userData()));
|
||||
connect(rda->ripc(),SIGNAL(rmlReceived(RDMacro *)),
|
||||
this,SLOT(rmlReceivedData(RDMacro *)));
|
||||
connect(rdripc,SIGNAL(gpiStateChanged(int,int,bool)),
|
||||
connect(rda->ripc(),SIGNAL(gpiStateChanged(int,int,bool)),
|
||||
this,SLOT(gpiStateChangedData(int,int,bool)));
|
||||
|
||||
//
|
||||
// Macro Player
|
||||
//
|
||||
rdevent_player=new RDEventPlayer(rdripc,this);
|
||||
rdevent_player=new RDEventPlayer(rda->ripc(),this);
|
||||
|
||||
//
|
||||
// User
|
||||
//
|
||||
rduser=NULL;
|
||||
// rduser=NULL;
|
||||
|
||||
//
|
||||
// UDP Transmission Socket
|
||||
@ -372,12 +338,12 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
connect(reload_mapper,SIGNAL(mapped(int)),this,SLOT(logReloadedData(int)));
|
||||
QSignalMapper *rename_mapper=new QSignalMapper(this);
|
||||
connect(rename_mapper,SIGNAL(mapped(int)),this,SLOT(logRenamedData(int)));
|
||||
QString default_svcname=rdairplay_conf->defaultSvc();
|
||||
QString default_svcname=rda->airplayConf()->defaultSvc();
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
air_log[i]=new LogPlay(i,air_nownext_socket,"",&air_plugin_hosts);
|
||||
air_log[i]->setDefaultServiceName(default_svcname);
|
||||
air_log[i]->setNowCart(rdairplay_conf->logNowCart(i));
|
||||
air_log[i]->setNextCart(rdairplay_conf->logNextCart(i));
|
||||
air_log[i]->setNowCart(rda->airplayConf()->logNowCart(i));
|
||||
air_log[i]->setNextCart(rda->airplayConf()->logNextCart(i));
|
||||
reload_mapper->setMapping(air_log[i],i);
|
||||
connect(air_log[i],SIGNAL(reloaded()),reload_mapper,SLOT(map()));
|
||||
rename_mapper->setMapping(air_log[i],i);
|
||||
@ -395,15 +361,15 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Audio Channel Assignments
|
||||
//
|
||||
air_cue_card=rdairplay_conf->card(RDAirPlayConf::CueChannel);
|
||||
air_cue_port=rdairplay_conf->port(RDAirPlayConf::CueChannel);
|
||||
air_cue_card=rda->airplayConf()->card(RDAirPlayConf::CueChannel);
|
||||
air_cue_port=rda->airplayConf()->port(RDAirPlayConf::CueChannel);
|
||||
for(int i=0;i<3;i++) {
|
||||
air_meter_card[i]=rdairplay_conf->card((RDAirPlayConf::Channel)i);
|
||||
air_meter_port[i]=rdairplay_conf->port((RDAirPlayConf::Channel)i);
|
||||
cards[i]=rdairplay_conf->card((RDAirPlayConf::Channel)i);
|
||||
ports[i]=rdairplay_conf->port((RDAirPlayConf::Channel)i);
|
||||
start_rmls[i]=rdairplay_conf->startRml((RDAirPlayConf::Channel)i);
|
||||
stop_rmls[i]=rdairplay_conf->stopRml((RDAirPlayConf::Channel)i);
|
||||
air_meter_card[i]=rda->airplayConf()->card((RDAirPlayConf::Channel)i);
|
||||
air_meter_port[i]=rda->airplayConf()->port((RDAirPlayConf::Channel)i);
|
||||
cards[i]=rda->airplayConf()->card((RDAirPlayConf::Channel)i);
|
||||
ports[i]=rda->airplayConf()->port((RDAirPlayConf::Channel)i);
|
||||
start_rmls[i]=rda->airplayConf()->startRml((RDAirPlayConf::Channel)i);
|
||||
stop_rmls[i]=rda->airplayConf()->stopRml((RDAirPlayConf::Channel)i);
|
||||
}
|
||||
if(air_meter_card[1]<0) { // Fixup disabled main log port 2 playout
|
||||
air_meter_card[1]=air_meter_card[0];
|
||||
@ -414,18 +380,18 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
air_log[0]->setChannels(cards,ports,start_rmls,stop_rmls);
|
||||
|
||||
for(int i=0;i<2;i++) {
|
||||
cards[i]=rdairplay_conf->card(RDAirPlayConf::AuxLog1Channel);
|
||||
ports[i]=rdairplay_conf->port(RDAirPlayConf::AuxLog1Channel);
|
||||
start_rmls[i]=rdairplay_conf->startRml(RDAirPlayConf::AuxLog1Channel);
|
||||
stop_rmls[i]=rdairplay_conf->stopRml(RDAirPlayConf::AuxLog1Channel);
|
||||
cards[i]=rda->airplayConf()->card(RDAirPlayConf::AuxLog1Channel);
|
||||
ports[i]=rda->airplayConf()->port(RDAirPlayConf::AuxLog1Channel);
|
||||
start_rmls[i]=rda->airplayConf()->startRml(RDAirPlayConf::AuxLog1Channel);
|
||||
stop_rmls[i]=rda->airplayConf()->stopRml(RDAirPlayConf::AuxLog1Channel);
|
||||
}
|
||||
air_log[1]->setChannels(cards,ports,start_rmls,stop_rmls);
|
||||
|
||||
for(int i=0;i<2;i++) {
|
||||
cards[i]=rdairplay_conf->card(RDAirPlayConf::AuxLog2Channel);
|
||||
ports[i]=rdairplay_conf->port(RDAirPlayConf::AuxLog2Channel);
|
||||
start_rmls[i]=rdairplay_conf->startRml(RDAirPlayConf::AuxLog2Channel);
|
||||
stop_rmls[i]=rdairplay_conf->stopRml(RDAirPlayConf::AuxLog2Channel);
|
||||
cards[i]=rda->airplayConf()->card(RDAirPlayConf::AuxLog2Channel);
|
||||
ports[i]=rda->airplayConf()->port(RDAirPlayConf::AuxLog2Channel);
|
||||
start_rmls[i]=rda->airplayConf()->startRml(RDAirPlayConf::AuxLog2Channel);
|
||||
stop_rmls[i]=rda->airplayConf()->stopRml(RDAirPlayConf::AuxLog2Channel);
|
||||
}
|
||||
air_log[2]->setChannels(cards,ports,start_rmls,stop_rmls);
|
||||
|
||||
@ -434,7 +400,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
rdcart_dialog=
|
||||
new RDCartDialog(&air_add_filter,&air_add_group,&air_add_schedcode,
|
||||
air_cae,rdripc,rdstation_conf,rdsystem_conf,air_config,this);
|
||||
rda->cae(),rda->ripc(),rda->station(),rda->system(),rda->config(),this);
|
||||
|
||||
//
|
||||
// Wall Clock
|
||||
@ -442,7 +408,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
WallClock *clock=new WallClock(this);
|
||||
clock->
|
||||
setGeometry(10,5,clock->sizeHint().width(),clock->sizeHint().height());
|
||||
clock->setCheckSyncEnabled(rdairplay_conf->checkTimesync());
|
||||
clock->setCheckSyncEnabled(rda->airplayConf()->checkTimesync());
|
||||
connect(air_master_timer,SIGNAL(timeout()),clock,SLOT(tickClock()));
|
||||
clock->setFocusPolicy(QWidget::NoFocus);
|
||||
connect(clock,SIGNAL(timeModeChanged(RDAirPlayConf::TimeMode)),
|
||||
@ -464,11 +430,11 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Pie Counter
|
||||
//
|
||||
air_pie_counter=new PieCounter(rdairplay_conf->pieCountLength(),this);
|
||||
air_pie_counter=new PieCounter(rda->airplayConf()->pieCountLength(),this);
|
||||
air_pie_counter->setGeometry(426,5,air_pie_counter->sizeHint().width(),
|
||||
air_pie_counter->sizeHint().height());
|
||||
air_pie_counter->setCountLength(rdairplay_conf->pieCountLength());
|
||||
air_pie_end=rdairplay_conf->pieEndPoint();
|
||||
air_pie_counter->setCountLength(rda->airplayConf()->pieCountLength());
|
||||
air_pie_end=rda->airplayConf()->pieEndPoint();
|
||||
air_pie_counter->setOpMode(air_op_mode[0]);
|
||||
air_pie_counter->setFocusPolicy(QWidget::NoFocus);
|
||||
if(mainmap!=NULL) {
|
||||
@ -482,7 +448,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
}
|
||||
connect(air_master_timer,SIGNAL(timeout()),
|
||||
air_pie_counter,SLOT(tickCounter()));
|
||||
connect(rdripc,SIGNAL(onairFlagChanged(bool)),
|
||||
connect(rda->ripc(),SIGNAL(onairFlagChanged(bool)),
|
||||
air_pie_counter,SLOT(setOnairFlag(bool)));
|
||||
|
||||
//
|
||||
@ -493,7 +459,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
air_stereo_meter->sizeHint().height());
|
||||
air_stereo_meter->setMode(RDSegMeter::Peak);
|
||||
air_stereo_meter->setFocusPolicy(QWidget::NoFocus);
|
||||
if(air_config->useStreamMeters()) {
|
||||
if(rda->config()->useStreamMeters()) {
|
||||
air_stereo_meter->hide();
|
||||
}
|
||||
|
||||
@ -628,18 +594,18 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Sound Panel Array
|
||||
//
|
||||
if (rdairplay_conf->panels(RDAirPlayConf::StationPanel) ||
|
||||
rdairplay_conf->panels(RDAirPlayConf::UserPanel)){
|
||||
if (rda->airplayConf()->panels(RDAirPlayConf::StationPanel) ||
|
||||
rda->airplayConf()->panels(RDAirPlayConf::UserPanel)){
|
||||
int card=-1;
|
||||
air_panel=
|
||||
new RDSoundPanel(AIR_PANEL_BUTTON_COLUMNS,AIR_PANEL_BUTTON_ROWS,
|
||||
rdairplay_conf->panels(RDAirPlayConf::StationPanel),
|
||||
rdairplay_conf->panels(RDAirPlayConf::UserPanel),
|
||||
rdairplay_conf->flashPanel(),
|
||||
rdairplay_conf->buttonLabelTemplate(),false,
|
||||
rdevent_player,rdripc,air_cae,rdstation_conf,
|
||||
rda->airplayConf()->panels(RDAirPlayConf::StationPanel),
|
||||
rda->airplayConf()->panels(RDAirPlayConf::UserPanel),
|
||||
rda->airplayConf()->flashPanel(),
|
||||
rda->airplayConf()->buttonLabelTemplate(),false,
|
||||
rdevent_player,rda->ripc(),rda->cae(),rda->station(),
|
||||
rdcart_dialog,this);
|
||||
air_panel->setLogfile(air_config->airplayLogname());
|
||||
air_panel->setLogfile(rda->config()->airplayLogname());
|
||||
air_panel->setGeometry(510,140,air_panel->sizeHint().width(),
|
||||
air_panel->sizeHint().height());
|
||||
if(mainmap!=NULL) {
|
||||
@ -651,58 +617,58 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
delete pd;
|
||||
delete pm;
|
||||
}
|
||||
air_panel->setPauseEnabled(rdairplay_conf->panelPauseEnabled());
|
||||
air_panel->setCard(0,rdairplay_conf->card(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setPort(0,rdairplay_conf->port(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setPauseEnabled(rda->airplayConf()->panelPauseEnabled());
|
||||
air_panel->setCard(0,rda->airplayConf()->card(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setPort(0,rda->airplayConf()->port(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setFocusPolicy(QWidget::NoFocus);
|
||||
if((card=rdairplay_conf->card(RDAirPlayConf::SoundPanel2Channel))<0) {
|
||||
if((card=rda->airplayConf()->card(RDAirPlayConf::SoundPanel2Channel))<0) {
|
||||
air_panel->setCard(1,air_panel->card(RDAirPlayConf::MainLog1Channel));
|
||||
air_panel->setPort(1,air_panel->port(RDAirPlayConf::MainLog1Channel));
|
||||
}
|
||||
else {
|
||||
air_panel->setCard(1,card);
|
||||
air_panel->setPort(1,rdairplay_conf->port(RDAirPlayConf::SoundPanel2Channel));
|
||||
air_panel->setPort(1,rda->airplayConf()->port(RDAirPlayConf::SoundPanel2Channel));
|
||||
}
|
||||
if((card=rdairplay_conf->card(RDAirPlayConf::SoundPanel3Channel))<0) {
|
||||
if((card=rda->airplayConf()->card(RDAirPlayConf::SoundPanel3Channel))<0) {
|
||||
air_panel->setCard(2,air_panel->card(RDAirPlayConf::MainLog2Channel));
|
||||
air_panel->setPort(2,air_panel->port(RDAirPlayConf::MainLog2Channel));
|
||||
}
|
||||
else {
|
||||
air_panel->setCard(2,card);
|
||||
air_panel->setPort(2,rdairplay_conf->port(RDAirPlayConf::SoundPanel3Channel));
|
||||
air_panel->setPort(2,rda->airplayConf()->port(RDAirPlayConf::SoundPanel3Channel));
|
||||
}
|
||||
if((card=rdairplay_conf->card(RDAirPlayConf::SoundPanel4Channel))<0) {
|
||||
if((card=rda->airplayConf()->card(RDAirPlayConf::SoundPanel4Channel))<0) {
|
||||
air_panel->setCard(3,air_panel->card(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setPort(3,air_panel->port(RDAirPlayConf::SoundPanel1Channel));
|
||||
}
|
||||
else {
|
||||
air_panel->setCard(3,card);
|
||||
air_panel->setPort(3,rdairplay_conf->port(RDAirPlayConf::SoundPanel4Channel));
|
||||
air_panel->setPort(3,rda->airplayConf()->port(RDAirPlayConf::SoundPanel4Channel));
|
||||
}
|
||||
if((card=rdairplay_conf->card(RDAirPlayConf::SoundPanel5Channel))<0) {
|
||||
if((card=rda->airplayConf()->card(RDAirPlayConf::SoundPanel5Channel))<0) {
|
||||
air_panel->setCard(4,air_panel->card(RDAirPlayConf::CueChannel));
|
||||
air_panel->setPort(4,air_panel->port(RDAirPlayConf::CueChannel));
|
||||
}
|
||||
else {
|
||||
air_panel->setCard(4,card);
|
||||
air_panel->setPort(4,rdairplay_conf->
|
||||
air_panel->setPort(4,rda->airplayConf()->
|
||||
port(RDAirPlayConf::SoundPanel5Channel));
|
||||
}
|
||||
air_panel->setRmls(0,rdairplay_conf->
|
||||
air_panel->setRmls(0,rda->airplayConf()->
|
||||
startRml(RDAirPlayConf::SoundPanel1Channel),
|
||||
rdairplay_conf->stopRml(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setRmls(1,rdairplay_conf->
|
||||
rda->airplayConf()->stopRml(RDAirPlayConf::SoundPanel1Channel));
|
||||
air_panel->setRmls(1,rda->airplayConf()->
|
||||
startRml(RDAirPlayConf::SoundPanel2Channel),
|
||||
rdairplay_conf->stopRml(RDAirPlayConf::SoundPanel2Channel));
|
||||
air_panel->setRmls(2,rdairplay_conf->
|
||||
rda->airplayConf()->stopRml(RDAirPlayConf::SoundPanel2Channel));
|
||||
air_panel->setRmls(2,rda->airplayConf()->
|
||||
startRml(RDAirPlayConf::SoundPanel3Channel),
|
||||
rdairplay_conf->stopRml(RDAirPlayConf::SoundPanel3Channel));
|
||||
air_panel->setRmls(3,rdairplay_conf->
|
||||
rda->airplayConf()->stopRml(RDAirPlayConf::SoundPanel3Channel));
|
||||
air_panel->setRmls(3,rda->airplayConf()->
|
||||
startRml(RDAirPlayConf::SoundPanel4Channel),
|
||||
rdairplay_conf->stopRml(RDAirPlayConf::SoundPanel4Channel));
|
||||
air_panel->setRmls(4,rdairplay_conf->
|
||||
rda->airplayConf()->stopRml(RDAirPlayConf::SoundPanel4Channel));
|
||||
air_panel->setRmls(4,rda->airplayConf()->
|
||||
startRml(RDAirPlayConf::SoundPanel5Channel),
|
||||
rdairplay_conf->stopRml(RDAirPlayConf::SoundPanel5Channel));
|
||||
rda->airplayConf()->stopRml(RDAirPlayConf::SoundPanel5Channel));
|
||||
int next_output=0;
|
||||
int channum[2];
|
||||
bool assigned=false;
|
||||
@ -741,8 +707,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
}
|
||||
}
|
||||
|
||||
air_panel->setSvcName(rdairplay_conf->defaultSvc());
|
||||
connect(rdripc,SIGNAL(userChanged()),air_panel,SLOT(changeUser()));
|
||||
air_panel->setSvcName(rda->airplayConf()->defaultSvc());
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),air_panel,SLOT(changeUser()));
|
||||
connect(air_master_timer,SIGNAL(timeout()),air_panel,SLOT(tickClock()));
|
||||
connect(air_panel,SIGNAL(selectClicked(unsigned,int,int)),
|
||||
this,SLOT(selectClickedData(unsigned,int,int)));
|
||||
@ -755,9 +721,9 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Full Log List
|
||||
//
|
||||
air_pause_enabled=rdairplay_conf->pauseEnabled();
|
||||
air_pause_enabled=rda->airplayConf()->pauseEnabled();
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
air_log_list[i]=new ListLog(air_log[i],air_cae,i,air_pause_enabled,this);
|
||||
air_log_list[i]=new ListLog(air_log[i],rda->cae(),i,air_pause_enabled,this);
|
||||
air_log_list[i]->setGeometry(510,140,air_log_list[i]->sizeHint().width(),
|
||||
air_log_list[i]->sizeHint().height());
|
||||
air_log_list[i]->hide();
|
||||
@ -782,11 +748,11 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
}
|
||||
air_log_button[0]->setText(tr("Main Log\n[--]"));
|
||||
air_log_button[1]->setText(tr("Aux 1 Log\n[--]"));
|
||||
if(!rdairplay_conf->showAuxButton(0)) {
|
||||
if(!rda->airplayConf()->showAuxButton(0)) {
|
||||
air_log_button[1]->hide();
|
||||
}
|
||||
air_log_button[2]->setText(tr("Aux 2 Log\n[--]"));
|
||||
if(!rdairplay_conf->showAuxButton(1)) {
|
||||
if(!rda->airplayConf()->showAuxButton(1)) {
|
||||
air_log_button[2]->hide();
|
||||
}
|
||||
|
||||
@ -795,7 +761,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
air_empty_cart=new RDEmptyCart(this);
|
||||
air_empty_cart->setGeometry(520,sizeHint().height()-51,32,32);
|
||||
if(!rdstation_conf->enableDragdrop()) {
|
||||
if(!rda->station()->enableDragdrop()) {
|
||||
air_empty_cart->hide();
|
||||
}
|
||||
|
||||
@ -809,8 +775,8 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
air_panel_button->setPalette(active_color);
|
||||
air_panel_button->setFocusPolicy(QWidget::NoFocus);
|
||||
connect(air_panel_button,SIGNAL(clicked()),this,SLOT(panelButtonData()));
|
||||
if (rdairplay_conf->panels(RDAirPlayConf::StationPanel) ||
|
||||
rdairplay_conf->panels(RDAirPlayConf::UserPanel)){
|
||||
if (rda->airplayConf()->panels(RDAirPlayConf::StationPanel) ||
|
||||
rda->airplayConf()->panels(RDAirPlayConf::UserPanel)){
|
||||
}
|
||||
else {
|
||||
air_panel_button->hide();
|
||||
@ -822,7 +788,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Button Log
|
||||
//
|
||||
air_button_list=new ButtonLog(air_log[0],air_cae,0,rdairplay_conf,
|
||||
air_button_list=new ButtonLog(air_log[0],rda->cae(),0,rda->airplayConf(),
|
||||
air_pause_enabled,this);
|
||||
air_button_list->setGeometry(10,140,air_button_list->sizeHint().width(),
|
||||
air_button_list->sizeHint().height());
|
||||
@ -844,7 +810,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Set Startup Mode
|
||||
//
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
switch(rdairplay_conf->logStartMode(i)) {
|
||||
switch(rda->airplayConf()->logStartMode(i)) {
|
||||
case RDAirPlayConf::Manual:
|
||||
SetManualMode(i);
|
||||
break;
|
||||
@ -859,10 +825,10 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
|
||||
case RDAirPlayConf::Previous:
|
||||
if(air_op_mode_style==RDAirPlayConf::Unified) {
|
||||
SetMode(i,rdairplay_conf->opMode(0));
|
||||
SetMode(i,rda->airplayConf()->opMode(0));
|
||||
}
|
||||
else {
|
||||
SetMode(i,rdairplay_conf->opMode(i));
|
||||
SetMode(i,rda->airplayConf()->opMode(i));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -880,7 +846,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
sql=QString().sprintf("select PLUGIN_PATH,PLUGIN_ARG from NOWNEXT_PLUGINS \
|
||||
where (STATION_NAME=\"%s\")&&(LOG_MACHINE=0)",
|
||||
(const char *)
|
||||
RDEscapeString(air_config->stationName()));
|
||||
RDEscapeString(rda->config()->stationName()));
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
air_plugin_hosts.
|
||||
@ -900,7 +866,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Create the HotKeyList object
|
||||
//
|
||||
rdkeylist=new RDHotKeyList();
|
||||
rdhotkeys=new RDHotkeys(air_config->stationName(),"rdairplay");
|
||||
rdhotkeys=new RDHotkeys(rda->config()->stationName(),"rdairplay");
|
||||
AltKeyHit=false;
|
||||
CtrlKeyHit=false;
|
||||
|
||||
@ -912,12 +878,12 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
// Start the RIPC Connection
|
||||
//
|
||||
rdripc->connectHost("localhost",RIPCD_TCP_PORT,air_config->password());
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
// (Perhaps) Lock Memory
|
||||
//
|
||||
if(air_config->lockRdairplayMemory()) {
|
||||
if(rda->config()->lockRdairplayMemory()) {
|
||||
if(mlockall(MCL_CURRENT|MCL_FUTURE)<0) {
|
||||
QMessageBox::warning(this,"RDAirPlay - "+tr("Memory Warning"),
|
||||
tr("Unable to lock all memory")+
|
||||
@ -956,26 +922,26 @@ void MainWidget::ripcConnected(bool state)
|
||||
//
|
||||
// Get Onair Flag State
|
||||
//
|
||||
rdripc->sendOnairFlag();
|
||||
rda->ripc()->sendOnairFlag();
|
||||
|
||||
//
|
||||
// Load Initial Logs
|
||||
//
|
||||
for(unsigned i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
if(air_start_logname[i].isNull()) {
|
||||
switch(rdairplay_conf->startMode(i)) {
|
||||
switch(rda->airplayConf()->startMode(i)) {
|
||||
case RDAirPlayConf::StartEmpty:
|
||||
break;
|
||||
|
||||
case RDAirPlayConf::StartPrevious:
|
||||
air_start_logname[i]=
|
||||
RDDateTimeDecode(rdairplay_conf->currentLog(i),
|
||||
air_startup_datetime,rdstation_conf,air_config);
|
||||
RDDateTimeDecode(rda->airplayConf()->currentLog(i),
|
||||
air_startup_datetime,rda->station(),rda->config());
|
||||
if(!air_start_logname[i].isEmpty()) {
|
||||
if(rdairplay_previous_exit_code==RDAirPlayConf::ExitDirty) {
|
||||
if((air_start_line[i]=rdairplay_conf->logCurrentLine(i))>=0) {
|
||||
air_start_start[i]=rdairplay_conf->autoRestart(i)&&
|
||||
rdairplay_conf->logRunning(i);
|
||||
if((air_start_line[i]=rda->airplayConf()->logCurrentLine(i))>=0) {
|
||||
air_start_start[i]=rda->airplayConf()->autoRestart(i)&&
|
||||
rda->airplayConf()->logRunning(i);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -987,15 +953,15 @@ void MainWidget::ripcConnected(bool state)
|
||||
|
||||
case RDAirPlayConf::StartSpecified:
|
||||
air_start_logname[i]=
|
||||
RDDateTimeDecode(rdairplay_conf->logName(i),
|
||||
air_startup_datetime,rdstation_conf,air_config);
|
||||
RDDateTimeDecode(rda->airplayConf()->logName(i),
|
||||
air_startup_datetime,rda->station(),rda->config());
|
||||
if(!air_start_logname[i].isEmpty()) {
|
||||
if(rdairplay_previous_exit_code==RDAirPlayConf::ExitDirty) {
|
||||
if(air_start_logname[i]==rdairplay_conf->currentLog(i)) {
|
||||
if((air_start_line[i]=rdairplay_conf->logCurrentLine(i))>=
|
||||
if(air_start_logname[i]==rda->airplayConf()->currentLog(i)) {
|
||||
if((air_start_line[i]=rda->airplayConf()->logCurrentLine(i))>=
|
||||
0) {
|
||||
air_start_start[i]=rdairplay_conf->autoRestart(i)&&
|
||||
rdairplay_conf->logRunning(i);
|
||||
air_start_start[i]=rda->airplayConf()->autoRestart(i)&&
|
||||
rda->airplayConf()->logRunning(i);
|
||||
}
|
||||
else {
|
||||
air_start_line[i]=0;
|
||||
@ -1016,7 +982,7 @@ void MainWidget::ripcConnected(bool state)
|
||||
rml.setArgQuantity(2);
|
||||
rml.setArg(0,i+1);
|
||||
rml.setArg(1,air_start_logname[i]);
|
||||
rdripc->sendRml(&rml);
|
||||
rda->ripc()->sendRml(&rml);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"rdairplay: log \"%s\" doesn't exist\n",
|
||||
@ -1392,7 +1358,7 @@ void MainWidget::logReloadedData(int log)
|
||||
left(air_log[0]->logName().length()-4)));
|
||||
if(air_log[0]->logName().isEmpty()) {
|
||||
if(air_panel!=NULL) {
|
||||
air_panel->setSvcName(rdairplay_conf->defaultSvc());
|
||||
air_panel->setSvcName(rda->airplayConf()->defaultSvc());
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1443,13 +1409,13 @@ void MainWidget::logReloadedData(int log)
|
||||
rml.setArgQuantity(2);
|
||||
rml.setArg(0,log+1);
|
||||
rml.setArg(1,air_start_line[log]);
|
||||
rdripc->sendRml(&rml);
|
||||
rda->ripc()->sendRml(&rml);
|
||||
|
||||
if(air_start_start[log]) {
|
||||
rml.setCommand(RDMacro::PN); // Start Next
|
||||
rml.setArgQuantity(1);
|
||||
rml.setArg(0,log+1);
|
||||
rdripc->sendRml(&rml);
|
||||
rda->ripc()->sendRml(&rml);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -1462,21 +1428,24 @@ void MainWidget::logReloadedData(int log)
|
||||
|
||||
void MainWidget::userData()
|
||||
{
|
||||
/*
|
||||
if(rduser!=NULL) {
|
||||
delete rduser;
|
||||
}
|
||||
rduser=new RDUser(rdripc->user());
|
||||
rduser=new RDUser(rda->ripc()->user());
|
||||
*/
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
LogLine(RDConfig::LogInfo,QString().
|
||||
sprintf("user changed to '%s'",(const char *)rdripc->user()));
|
||||
sprintf("user changed to '%s'",(const char *)rda->ripc()->user()));
|
||||
SetCaption();
|
||||
|
||||
//
|
||||
// Set Control Perms
|
||||
//
|
||||
bool add_allowed=rduser->addtoLog();
|
||||
bool delete_allowed=rduser->removefromLog();
|
||||
bool arrange_allowed=rduser->arrangeLog();
|
||||
bool playout_allowed=rduser->playoutLog();
|
||||
bool add_allowed=rda->user()->addtoLog();
|
||||
bool delete_allowed=rda->user()->removefromLog();
|
||||
bool arrange_allowed=rda->user()->arrangeLog();
|
||||
bool playout_allowed=rda->user()->playoutLog();
|
||||
|
||||
air_add_button->setEnabled(add_allowed&&arrange_allowed&&playout_allowed);
|
||||
air_move_button->setEnabled(arrange_allowed&&playout_allowed);
|
||||
@ -1612,14 +1581,14 @@ void MainWidget::selectClickedData(int id,int line,RDLogLine::Status status)
|
||||
air_log[id]->
|
||||
insert(air_log[id]->size(),air_add_cart,RDLogLine::Play);
|
||||
air_log[id]->logLine(air_log[id]->size()-1)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(air_log[id]->size()-1);
|
||||
}
|
||||
else {
|
||||
air_log[id]->
|
||||
insert(line,air_add_cart,air_log[id]->nextTransType(line));
|
||||
air_log[id]->logLine(line)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(line);
|
||||
}
|
||||
SetActionMode(StartButton::Stop);
|
||||
@ -1700,18 +1669,18 @@ void MainWidget::selectClickedData(int id,int line,RDLogLine::Status status)
|
||||
else {
|
||||
if(line<0) {
|
||||
air_log[id]->insert(air_log[id]->size(),air_add_cart,
|
||||
rdairplay_conf->defaultTransType(),
|
||||
rdairplay_conf->defaultTransType());
|
||||
rda->airplayConf()->defaultTransType(),
|
||||
rda->airplayConf()->defaultTransType());
|
||||
air_log[id]->logLine(air_log[id]->size()-1)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(air_log[id]->size()-1);
|
||||
}
|
||||
else {
|
||||
air_log[id]->
|
||||
insert(line,air_add_cart,air_log[id]->nextTransType(line),
|
||||
rdairplay_conf->defaultTransType());
|
||||
rda->airplayConf()->defaultTransType());
|
||||
air_log[id]->logLine(line)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(line);
|
||||
}
|
||||
}
|
||||
@ -1774,14 +1743,14 @@ void MainWidget::cartDroppedData(int id,int line,RDLogLine *ll)
|
||||
air_log[id]->
|
||||
insert(air_log[id]->size(),ll->cartNumber(),RDLogLine::Play);
|
||||
air_log[id]->logLine(air_log[id]->size()-1)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(air_log[id]->size()-1);
|
||||
}
|
||||
else {
|
||||
air_log[id]->
|
||||
insert(line,ll->cartNumber(),air_log[id]->nextTransType(line));
|
||||
air_log[id]->logLine(line)->
|
||||
setTransType(rdairplay_conf->defaultTransType());
|
||||
setTransType(rda->airplayConf()->defaultTransType());
|
||||
air_log_list[id]->refresh(line);
|
||||
}
|
||||
}
|
||||
@ -1798,7 +1767,7 @@ void MainWidget::meterData()
|
||||
|
||||
for(int i=0;i<AIR_TOTAL_PORTS;i++) {
|
||||
if(FirstPort(i)) {
|
||||
air_cae->outputMeterUpdate(air_meter_card[i],air_meter_port[i],level);
|
||||
rda->cae()->outputMeterUpdate(air_meter_card[i],air_meter_port[i],level);
|
||||
for(int j=0;j<2;j++) {
|
||||
ratio[j]+=pow(10.0,((double)level[j])/1000.0);
|
||||
}
|
||||
@ -1919,13 +1888,13 @@ void MainWidget::transportChangedData()
|
||||
air_pie_counter->setTransType(air_log[0]->nextTrans(line));
|
||||
if(logline->playDeck()==NULL) {
|
||||
air_pie_counter->setLogline(NULL);
|
||||
air_pie_counter->start(rdstation_conf->timeOffset());
|
||||
air_pie_counter->start(rda->station()->timeOffset());
|
||||
}
|
||||
else {
|
||||
air_pie_counter->setLogline(logline);
|
||||
air_pie_counter->start(((RDPlayDeck *)logline->playDeck())->
|
||||
currentPosition()+
|
||||
rdstation_conf->timeOffset());
|
||||
rda->station()->timeOffset());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2088,7 +2057,7 @@ void MainWidget::keyReleaseEvent(QKeyEvent *e)
|
||||
|
||||
if (hotkeystrokes.length() > 0) {
|
||||
|
||||
hot_label=(*rdhotkeys).GetRowLabel(RDEscapeString(air_config->stationName()),
|
||||
hot_label=(*rdhotkeys).GetRowLabel(RDEscapeString(rda->config()->stationName()),
|
||||
(const char *)"airplay",(const char *)hotkeystrokes);
|
||||
|
||||
if (hot_label.length()>0) {
|
||||
@ -2132,14 +2101,14 @@ void MainWidget::keyReleaseEvent(QKeyEvent *e)
|
||||
}
|
||||
|
||||
if ((strcmp(hot_label,"Aux Log 1") == 0) &&
|
||||
(rdairplay_conf->showAuxButton(0) ) )
|
||||
(rda->airplayConf()->showAuxButton(0) ) )
|
||||
{
|
||||
fullLogButtonData(1);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( (strcmp(hot_label,"Aux Log 2") == 0) &&
|
||||
(rdairplay_conf->showAuxButton(1) ) )
|
||||
(rda->airplayConf()->showAuxButton(1) ) )
|
||||
{
|
||||
fullLogButtonData(2);
|
||||
return;
|
||||
@ -2166,14 +2135,14 @@ void MainWidget::keyReleaseEvent(QKeyEvent *e)
|
||||
|
||||
void MainWidget::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
if(!rdairplay_conf->exitPasswordValid("")) {
|
||||
if(!rda->airplayConf()->exitPasswordValid("")) {
|
||||
QString passwd;
|
||||
RDGetPasswd *gw=new RDGetPasswd(&passwd,this);
|
||||
gw->exec();
|
||||
if(!rdairplay_conf->exitPasswordValid(passwd)) {
|
||||
if(!rda->airplayConf()->exitPasswordValid(passwd)) {
|
||||
return;
|
||||
}
|
||||
rdairplay_conf->setExitCode(RDAirPlayConf::ExitClean);
|
||||
rda->airplayConf()->setExitCode(RDAirPlayConf::ExitClean);
|
||||
LogLine(RDConfig::LogInfo,"RDAirPlay exiting");
|
||||
air_lock->unlock();
|
||||
exit(0);
|
||||
@ -2189,7 +2158,7 @@ void MainWidget::closeEvent(QCloseEvent *e)
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
delete air_log[i];
|
||||
}
|
||||
rdairplay_conf->setExitCode(RDAirPlayConf::ExitClean);
|
||||
rda->airplayConf()->setExitCode(RDAirPlayConf::ExitClean);
|
||||
LogLine(RDConfig::LogInfo,"RDAirPlay exiting");
|
||||
air_lock->unlock();
|
||||
exit(0);
|
||||
@ -2229,8 +2198,8 @@ void MainWidget::SetCaption()
|
||||
log="-- ";
|
||||
}
|
||||
setCaption(QString("RDAirPlay")+" v"+VERSION+" - "+tr("Host")+": "+
|
||||
air_config->stationName()+" "+
|
||||
tr("User:")+" "+rdripc->user()+" "+
|
||||
rda->config()->stationName()+" "+
|
||||
tr("User:")+" "+rda->ripc()->user()+" "+
|
||||
tr("Log:")+" "+log.left(log.length()-4)+" "+
|
||||
tr("Service:")+" "+air_log[0]->serviceName());
|
||||
}
|
||||
@ -2279,7 +2248,7 @@ void MainWidget::SetManualMode(int mach)
|
||||
}
|
||||
air_mode_display->setOpMode(mach,RDAirPlayConf::Manual);
|
||||
air_op_mode[mach]=RDAirPlayConf::Manual;
|
||||
rdairplay_conf->setOpMode(mach,RDAirPlayConf::Manual);
|
||||
rda->airplayConf()->setOpMode(mach,RDAirPlayConf::Manual);
|
||||
air_log[mach]->setOpMode(RDAirPlayConf::Manual);
|
||||
air_log_list[mach]->setOpMode(RDAirPlayConf::Manual);
|
||||
if(mach==0) {
|
||||
@ -2304,7 +2273,7 @@ void MainWidget::SetAutoMode(int mach)
|
||||
}
|
||||
air_mode_display->setOpMode(mach,RDAirPlayConf::Auto);
|
||||
air_op_mode[mach]=RDAirPlayConf::Auto;
|
||||
rdairplay_conf->setOpMode(mach,RDAirPlayConf::Auto);
|
||||
rda->airplayConf()->setOpMode(mach,RDAirPlayConf::Auto);
|
||||
air_log[mach]->setOpMode(RDAirPlayConf::Auto);
|
||||
air_log_list[mach]->setOpMode(RDAirPlayConf::Auto);
|
||||
if(mach==0) {
|
||||
@ -2329,7 +2298,7 @@ void MainWidget::SetLiveAssistMode(int mach)
|
||||
}
|
||||
air_mode_display->setOpMode(mach,RDAirPlayConf::LiveAssist);
|
||||
air_op_mode[mach]=RDAirPlayConf::LiveAssist;
|
||||
rdairplay_conf->setOpMode(mach,RDAirPlayConf::LiveAssist);
|
||||
rda->airplayConf()->setOpMode(mach,RDAirPlayConf::LiveAssist);
|
||||
air_log[mach]->setOpMode(RDAirPlayConf::LiveAssist);
|
||||
air_log_list[mach]->setOpMode(RDAirPlayConf::LiveAssist);
|
||||
if(mach==0) {
|
||||
@ -2383,7 +2352,7 @@ void MainWidget::SetActionMode(StartButton::Mode mode)
|
||||
if(svc_quan==0) {
|
||||
sql=QString().sprintf("select SERVICE_NAME from SERVICE_PERMS \
|
||||
where STATION_NAME=\"%s\"",
|
||||
(const char *)rdstation_conf->name());
|
||||
(const char *)rda->station()->name());
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
services_list.append( q->value(0).toString() );
|
||||
@ -2409,7 +2378,7 @@ void MainWidget::SetActionMode(StartButton::Mode mode)
|
||||
air_panel->setActionMode(RDAirPlayConf::Normal);
|
||||
}
|
||||
if(rdcart_dialog->exec(&air_add_cart,RDCart::All,0,0,
|
||||
rduser->name(),rduser->password())==0) {
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
SetActionMode(StartButton::AddTo);
|
||||
}
|
||||
else {
|
||||
@ -2558,7 +2527,7 @@ void LogLine(RDConfig::LogPriority prio,const QString &line)
|
||||
{
|
||||
FILE *file;
|
||||
|
||||
air_config->log("rdairplay",prio,line);
|
||||
rda->config()->log("rdairplay",prio,line);
|
||||
|
||||
if(logfile.isEmpty()) {
|
||||
return;
|
||||
|
@ -544,7 +544,7 @@ poslechu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Chyba databáze</translation>
|
||||
<translation type="obsolete">Chyba databáze</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -636,6 +636,10 @@ OBNOVEN</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -544,7 +544,7 @@ vorhören</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Datenbankfehler</translation>
|
||||
<translation type="obsolete">Datenbankfehler</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -636,6 +636,10 @@ AKTUALISIERT</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -552,7 +552,7 @@ Final</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Error en la base de datos</translation>
|
||||
<translation type="obsolete">Error en la base de datos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -636,6 +636,10 @@ LISTA</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -544,7 +544,7 @@ la Fin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Erreur de base de données</translation>
|
||||
<translation type="obsolete">Erreur de base de données</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -636,6 +636,10 @@ DU LOG</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -554,7 +554,7 @@ Tail</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Databasefeil</translation>
|
||||
<translation type="obsolete">Databasefeil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -646,6 +646,10 @@ LASTAR PÅ NYTT</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -554,7 +554,7 @@ Tail</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Databasefeil</translation>
|
||||
<translation type="obsolete">Databasefeil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -646,6 +646,10 @@ LASTAR PÅ NYTT</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -545,7 +545,7 @@ Log</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Database Error</source>
|
||||
<translation>Erro na Base de Dados</translation>
|
||||
<translation type="obsolete">Erro na Base de Dados</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>ADD</source>
|
||||
@ -642,6 +642,10 @@ LISTA</translation>
|
||||
<source>Unable to lock all memory</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ModeDisplay</name>
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A container class for a Rivendell Loadable Module host.
|
||||
//
|
||||
// (C) Copyright 2008,2016-2017 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2008,2016-2018 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
|
||||
@ -21,6 +21,7 @@
|
||||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rddatedecode.h>
|
||||
#include <rdnownext.h>
|
||||
@ -35,8 +36,8 @@ RLMHost::RLMHost(const QString &path,const QString &arg,
|
||||
QSocketDevice *udp_socket,QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
plugin_path=RDDateDecode(path,QDate::currentDate(),rdstation_conf,air_config);
|
||||
plugin_arg=RDDateDecode(arg,QDate::currentDate(),rdstation_conf,air_config);
|
||||
plugin_path=RDDateDecode(path,QDate::currentDate(),rda->station(),rda->config());
|
||||
plugin_arg=RDDateDecode(arg,QDate::currentDate(),rda->station(),rda->config());
|
||||
plugin_udp_socket=udp_socket;
|
||||
plugin_handle=NULL;
|
||||
plugin_start_sym=NULL;
|
||||
@ -86,7 +87,7 @@ void RLMHost::sendEvent(const QString &svcname,const QString &logname,
|
||||
struct rlm_pad *now=new struct rlm_pad;
|
||||
struct rlm_pad *next=new struct rlm_pad;
|
||||
memset(svc,0,sizeof(struct rlm_svc));
|
||||
RDSvc *service=new RDSvc(svcname,rdstation_conf,air_config);
|
||||
RDSvc *service=new RDSvc(svcname,rda->station(),rda->config());
|
||||
if(!svcname.isEmpty()) {
|
||||
sprintf(svc->svc_name,"%s",(const char *)svcname.left(255));
|
||||
if(!service->programCode().isEmpty()) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The stop counter widget for Rivendell
|
||||
//
|
||||
// (C) Copyright 2002-2004,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2004,2016-2018 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
|
||||
@ -21,8 +21,10 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#include <stop_counter.h>
|
||||
#include <globals.h>
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "globals.h"
|
||||
#include "stop_counter.h"
|
||||
|
||||
StopCounter::StopCounter(QWidget *parent)
|
||||
: QPushButton(parent)
|
||||
@ -131,7 +133,7 @@ void StopCounter::UpdateTime()
|
||||
QString text;
|
||||
QColor system_button_text_color = palette().active().buttonText();
|
||||
int msecs=QTime::currentTime().
|
||||
addMSecs(rdstation_conf->timeOffset()).msecsTo(stop_time);
|
||||
addMSecs(rda->station()->timeOffset()).msecsTo(stop_time);
|
||||
|
||||
if ((old_stop_running != stop_running) || (msecs/1000 != old_msecs/1000)){
|
||||
QPixmap pix(sizeHint().width(),sizeHint().height());
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A wall-clock widget with date.
|
||||
//
|
||||
// (C) Copyright 2002-2003,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2003,2016-2018 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
|
||||
@ -28,16 +28,17 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
|
||||
#include <colors.h>
|
||||
#include <wall_clock.h>
|
||||
#include <globals.h>
|
||||
#include "colors.h"
|
||||
#include "globals.h"
|
||||
#include "wall_clock.h"
|
||||
|
||||
WallClock::WallClock(QWidget *parent)
|
||||
:QPushButton(parent)
|
||||
{
|
||||
time_offset=rdstation_conf->timeOffset();
|
||||
time_offset=rda->station()->timeOffset();
|
||||
previous_time=QTime::currentTime().addMSecs(time_offset);
|
||||
time_mode=RDAirPlayConf::TwentyFourHour;
|
||||
previous_time_mode = RDAirPlayConf::TwentyFourHour;
|
||||
|
Loading…
x
Reference in New Issue
Block a user