mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-27 22:22:36 +02:00
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
* Converted rdcatch(1) to use RDApplication.
This commit is contained in:
parent
e179bea9d7
commit
f46ee15dad
@ -16605,3 +16605,5 @@
|
||||
* Converted rdcartslots(1) to use RDApplication.
|
||||
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Converted rdcastmanager(1) to use RDApplication.
|
||||
2018-01-31 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Converted rdcatch(1) to use RDApplication.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Events List Widget for RDCatch
|
||||
//
|
||||
// (C) Copyright 2002-2006,2016 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
|
||||
@ -20,12 +20,13 @@
|
||||
|
||||
#include <qheader.h>
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdcart.h>
|
||||
#include <rdrecording.h>
|
||||
#include <rdedit_audio.h>
|
||||
#include <rdrecording.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <catch_listview.h>
|
||||
#include "catch_listview.h"
|
||||
#include "globals.h"
|
||||
|
||||
CatchListView::CatchListView(QWidget *parent)
|
||||
: RDListView(parent)
|
||||
@ -52,8 +53,8 @@ void CatchListView::editAudioMenuData()
|
||||
{
|
||||
RDCart *rdcart=new RDCart(catch_cutname.left(6).toUInt());
|
||||
RDEditAudio *edit=
|
||||
new RDEditAudio(rdcart,catch_cutname,catch_cae,catch_user,rdstation_conf,
|
||||
catch_config,catch_audition_card,catch_audition_port,
|
||||
new RDEditAudio(rdcart,catch_cutname,rda->cae(),rda->user(),rda->station(),
|
||||
rda->config(),catch_audition_card,catch_audition_port,
|
||||
1500,-400,this);
|
||||
if(edit->exec()!=-1) {
|
||||
rdcart->updateLength();
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Netcatch Cart Event
|
||||
//
|
||||
// (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
|
||||
@ -28,14 +28,15 @@
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rd.h>
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rddb.h>
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
#include <globals.h>
|
||||
#include <edit_cartevent.h>
|
||||
#include "edit_cartevent.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
: QDialog(parent,"",true)
|
||||
@ -317,7 +318,7 @@ void EditCartEvent::selectCartData()
|
||||
cartnum=edit_cart->number();
|
||||
}
|
||||
switch(catch_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
catch_user->name(),catch_user->password())) {
|
||||
rda->user()->name(),rda->user()->password())) {
|
||||
case 0:
|
||||
if(edit_cart!=NULL) {
|
||||
delete edit_cart;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Download Event
|
||||
//
|
||||
// (C) Copyright 2002-2005,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2005,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
|
||||
@ -29,16 +29,17 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <qurl.h>
|
||||
|
||||
#include <rdurl.h>
|
||||
#include <rddb.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rddb.h>
|
||||
#include <rddeck.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdurl.h>
|
||||
|
||||
#include <edit_download.h>
|
||||
#include <globals.h>
|
||||
#include "edit_download.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditDownload::EditDownload(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
@ -405,7 +406,7 @@ EditDownload::EditDownload(int id,std::vector<int> *adds,QString *filter,
|
||||
}
|
||||
else {
|
||||
edit_autotrim_box->setChecked(false);
|
||||
edit_autotrim_spin->setValue(rdlibrary_conf->trimThreshold()/100);
|
||||
edit_autotrim_spin->setValue(rda->libraryConf()->trimThreshold()/100);
|
||||
}
|
||||
autotrimToggledData(edit_autotrim_box->isChecked());
|
||||
if(edit_recording->normalizationLevel()<0) {
|
||||
@ -414,7 +415,7 @@ EditDownload::EditDownload(int id,std::vector<int> *adds,QString *filter,
|
||||
}
|
||||
else {
|
||||
edit_normalize_box->setChecked(false);
|
||||
edit_normalize_spin->setValue(rdlibrary_conf->ripperLevel()/100);
|
||||
edit_normalize_spin->setValue(rda->libraryConf()->ripperLevel()/100);
|
||||
}
|
||||
normalizeToggledData(edit_normalize_box->isChecked());
|
||||
edit_metadata_box->setChecked(edit_recording->enableMetadata());
|
||||
@ -475,8 +476,8 @@ void EditDownload::selectCartData()
|
||||
{
|
||||
QString str;
|
||||
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rdstation_conf,catch_system,
|
||||
edit_filter,NULL,NULL,catch_user->name(),
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rda->station(),rda->system(),
|
||||
edit_filter,NULL,NULL,rda->user()->name(),
|
||||
false,true);
|
||||
switch(cut->exec()) {
|
||||
case 0:
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell RDCatch Playout
|
||||
//
|
||||
// (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
|
||||
@ -28,11 +28,12 @@
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rddb.h>
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
#include <edit_playout.h>
|
||||
@ -318,7 +319,7 @@ void EditPlayout::activateStationData(int id,bool use_temp)
|
||||
|
||||
void EditPlayout::selectCutData()
|
||||
{
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rdstation_conf,catch_system,
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rda->station(),rda->system(),
|
||||
edit_filter,NULL,NULL,"",false,false,false,
|
||||
this);
|
||||
switch(cut->exec()) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell RDCatch Recording
|
||||
//
|
||||
// (C) Copyright 2002-2005,2014,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2005,2014-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
|
||||
@ -29,17 +29,17 @@
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdmatrix.h>
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
#include <edit_recording.h>
|
||||
#include <globals.h>
|
||||
|
||||
#include "edit_recording.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
@ -552,7 +552,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
}
|
||||
else {
|
||||
edit_autotrim_box->setChecked(false);
|
||||
edit_autotrim_spin->setValue(rdlibrary_conf->trimThreshold()/100);
|
||||
edit_autotrim_spin->setValue(rda->libraryConf()->trimThreshold()/100);
|
||||
}
|
||||
autotrimToggledData(edit_autotrim_box->isChecked());
|
||||
if(edit_recording->normalizationLevel()<0) {
|
||||
@ -561,7 +561,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
}
|
||||
else {
|
||||
edit_normalize_box->setChecked(false);
|
||||
edit_normalize_spin->setValue(rdlibrary_conf->ripperLevel()/100);
|
||||
edit_normalize_spin->setValue(rda->libraryConf()->ripperLevel()/100);
|
||||
}
|
||||
normalizeToggledData(edit_normalize_box->isChecked());
|
||||
// Populate number of channels; if creating a new recording entry and a valid
|
||||
@ -707,17 +707,17 @@ void EditRecording::selectCutData()
|
||||
{
|
||||
QString str;
|
||||
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rdstation_conf,catch_system,
|
||||
edit_filter,NULL,NULL,catch_user->name(),
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rda->station(),rda->system(),
|
||||
edit_filter,NULL,NULL,rda->user()->name(),
|
||||
false,true);
|
||||
switch(cut->exec()) {
|
||||
case 0:
|
||||
edit_description_edit->setText(RDCutPath(edit_cutname));
|
||||
str=QString(tr("Cut"));
|
||||
edit_destination_edit->
|
||||
setText(QString().sprintf("%s %s",(const char *)str,
|
||||
(const char *)edit_cutname));
|
||||
break;
|
||||
case 0:
|
||||
edit_description_edit->setText(RDCutPath(edit_cutname));
|
||||
str=QString(tr("Cut"));
|
||||
edit_destination_edit->
|
||||
setText(QString().sprintf("%s %s",(const char *)str,
|
||||
(const char *)edit_cutname));
|
||||
break;
|
||||
}
|
||||
delete cut;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Upload Event
|
||||
//
|
||||
// (C) Copyright 2002-2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-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,14 +28,15 @@
|
||||
#include <qmessagebox.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rdurl.h>
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdexport_settings_dialog.h>
|
||||
#include <rddb.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdexport_settings_dialog.h>
|
||||
#include <rdtextvalidator.h>
|
||||
#include <rdurl.h>
|
||||
|
||||
#include <edit_upload.h>
|
||||
#include <globals.h>
|
||||
@ -490,7 +491,7 @@ void EditUpload::selectCartData()
|
||||
{
|
||||
QString str;
|
||||
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rdstation_conf,catch_system,
|
||||
RDCutDialog *cut=new RDCutDialog(&edit_cutname,rda->station(),rda->system(),
|
||||
edit_filter);
|
||||
switch(cut->exec()) {
|
||||
case 0:
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Global Variable Declarations for RDCatch
|
||||
//
|
||||
// (C) Copyright 2002-2005,2016 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2005,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,30 +21,16 @@
|
||||
#ifndef GLOBALS_H
|
||||
#define GLOBALS_H
|
||||
|
||||
#include <rdconfig.h>
|
||||
#include <rdstation.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rduser.h>
|
||||
#include <rdlibrary_conf.h>
|
||||
#include <rdcae.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rdsystem.h>
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
extern RDConfig *catch_config;
|
||||
extern RDStation *rdstation_conf;
|
||||
extern RDAudioPort *rdaudioport_conf;
|
||||
extern RDUser *catch_user;
|
||||
extern RDLibraryConf *rdlibrary_conf;
|
||||
extern RDRipc *catch_ripc;
|
||||
extern RDCae *catch_cae;
|
||||
extern RDCartDialog *catch_cart_dialog;
|
||||
extern int catch_audition_card;
|
||||
extern int catch_audition_port;
|
||||
extern RDSystem *catch_system;
|
||||
|
||||
|
||||
#endif // GLOBALS_H
|
||||
|
@ -18,6 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
@ -36,51 +37,44 @@
|
||||
#include <qlayout.h>
|
||||
|
||||
#include <rdprofile.h>
|
||||
#include <rddb.h>
|
||||
#include <rdconf.h>
|
||||
#include <rd.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdcatch.h>
|
||||
#include <rdstation.h>
|
||||
#include <rddeck.h>
|
||||
#include <rdapplication.h>
|
||||
#include <rdaudio_port.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdcatch.h>
|
||||
#include <rdcheck_daemons.h>
|
||||
#include <rdsettings.h>
|
||||
#include <rdcmd_switch.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdcut.h>
|
||||
#include <rdcut_path.h>
|
||||
#include <rddb.h>
|
||||
#include <rddeck.h>
|
||||
#include <rdedit_audio.h>
|
||||
#include <rdmixer.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdsettings.h>
|
||||
#include <rdstation.h>
|
||||
#include <rduser.h>
|
||||
#include <dbversion.h>
|
||||
|
||||
#include <add_recording.h>
|
||||
#include <edit_recording.h>
|
||||
#include <edit_playout.h>
|
||||
#include <edit_cartevent.h>
|
||||
#include <edit_switchevent.h>
|
||||
#include <edit_download.h>
|
||||
#include <edit_upload.h>
|
||||
#include <list_reports.h>
|
||||
#include <deckmon.h>
|
||||
#include <colors.h>
|
||||
#include <globals.h>
|
||||
#include <assert.h>
|
||||
#include "add_recording.h"
|
||||
#include "colors.h"
|
||||
#include "deckmon.h"
|
||||
#include "edit_cartevent.h"
|
||||
#include "edit_download.h"
|
||||
#include "edit_playout.h"
|
||||
#include "edit_recording.h"
|
||||
#include "globals.h"
|
||||
#include "list_reports.h"
|
||||
#include "edit_switchevent.h"
|
||||
#include "edit_upload.h"
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
RDConfig *catch_config;
|
||||
RDStation *rdstation_conf;
|
||||
RDAudioPort *rdaudioport_conf;
|
||||
RDUser *catch_user;
|
||||
RDLibraryConf *rdlibrary_conf;
|
||||
RDRipc *catch_ripc;
|
||||
RDCae *catch_cae;
|
||||
RDCartDialog *catch_cart_dialog;
|
||||
int catch_audition_card=-1;
|
||||
int catch_audition_port=-1;
|
||||
RDSystem *catch_system=NULL;
|
||||
|
||||
//
|
||||
// Icons
|
||||
@ -118,10 +112,9 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
QString str;
|
||||
QString err_msg;
|
||||
catch_host_warnings=false;
|
||||
catch_audition_stream=-1;
|
||||
bool skip_db_check=false;
|
||||
unsigned schema=0;
|
||||
|
||||
catch_scroll=false;
|
||||
|
||||
@ -135,7 +128,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
catch_host_warnings=RDBool(cmd->value(i));
|
||||
}
|
||||
if(cmd->key(i)=="--skip-db-check") {
|
||||
skip_db_check=true;
|
||||
}
|
||||
}
|
||||
delete cmd;
|
||||
@ -196,81 +188,54 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
//
|
||||
RDInitializeDaemons();
|
||||
|
||||
//
|
||||
// Load Local Configs
|
||||
//
|
||||
catch_config=new RDConfig();
|
||||
catch_config->load();
|
||||
catch_config->setModuleName("RDCatch");
|
||||
rda=new RDApplication("RDCatch",this);
|
||||
if(!rda->open(&err_msg)) {
|
||||
QMessageBox::critical(this,"RDCatch - "+tr("Error"),err_msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
str=QString("RDCatch")+" v"+VERSION+" - "+tr("Host")+":";
|
||||
setCaption(QString().sprintf("%s %s",(const char *)str,
|
||||
(const char *)catch_config->stationName()));
|
||||
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
QString err (tr("rdcatch : "));
|
||||
catch_db=RDInitDb(&schema,&err);
|
||||
if(!catch_db) {
|
||||
log(RDConfig::LogErr,err);
|
||||
exit(0);
|
||||
}
|
||||
if((schema!=RD_VERSION_DATABASE)&&(!skip_db_check)) {
|
||||
fprintf(stderr,"rdcatch: database version mismatch, should be %u, is %u\n",
|
||||
RD_VERSION_DATABASE,schema);
|
||||
exit(256);
|
||||
}
|
||||
setCaption(str+" "+rda->config()->stationName());
|
||||
|
||||
connect(RDDbStatus(),SIGNAL(logText(RDConfig::LogPriority,const QString &)),
|
||||
this,SLOT(log(RDConfig::LogPriority,const QString &)));
|
||||
//
|
||||
// Allocate Global Resources
|
||||
//
|
||||
rdstation_conf=new RDStation(catch_config->stationName());
|
||||
catch_audition_card=rdstation_conf->cueCard();
|
||||
catch_audition_port=rdstation_conf->cuePort();
|
||||
catch_time_offset=rdstation_conf->timeOffset();
|
||||
catch_system=new RDSystem();
|
||||
catch_audition_card=rda->station()->cueCard();
|
||||
catch_audition_port=rda->station()->cuePort();
|
||||
catch_time_offset=rda->station()->timeOffset();
|
||||
|
||||
//
|
||||
// Load Audio Settings
|
||||
//
|
||||
RDDeck *deck=new RDDeck(catch_config->stationName(),0);
|
||||
RDDeck *deck=new RDDeck(rda->config()->stationName(),0);
|
||||
delete deck;
|
||||
head_playing=false;
|
||||
tail_playing=false;
|
||||
rdaudioport_conf=new RDAudioPort(rdstation_conf->name(),catch_audition_card);
|
||||
|
||||
//
|
||||
// Library Config
|
||||
//
|
||||
rdlibrary_conf=new RDLibraryConf(catch_config->stationName());
|
||||
rdaudioport_conf=new RDAudioPort(rda->station()->name(),catch_audition_card);
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
//
|
||||
catch_ripc=new RDRipc(rdstation_conf,catch_config,this);
|
||||
connect(catch_ripc,SIGNAL(connected(bool)),
|
||||
connect(rda->ripc(),SIGNAL(connected(bool)),
|
||||
this,SLOT(ripcConnectedData(bool)));
|
||||
catch_user=NULL;
|
||||
connect(catch_ripc,SIGNAL(userChanged()),this,SLOT(ripcUserData()));
|
||||
catch_ripc->connectHost("localhost",RIPCD_TCP_PORT,catch_config->password());
|
||||
connect(rda->ripc(),SIGNAL(userChanged()),this,SLOT(ripcUserData()));
|
||||
rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password());
|
||||
|
||||
//
|
||||
// CAE Connection
|
||||
//
|
||||
catch_cae=new RDCae(rdstation_conf,catch_config,this);
|
||||
connect(catch_cae,SIGNAL(isConnected(bool)),this,SLOT(initData(bool)));
|
||||
connect(catch_cae,SIGNAL(playing(int)),this,SLOT(playedData(int)));
|
||||
connect(catch_cae,SIGNAL(playStopped(int)),
|
||||
connect(rda->cae(),SIGNAL(isConnected(bool)),this,SLOT(initData(bool)));
|
||||
connect(rda->cae(),SIGNAL(playing(int)),this,SLOT(playedData(int)));
|
||||
connect(rda->cae(),SIGNAL(playStopped(int)),
|
||||
this,SLOT(playStoppedData(int)));
|
||||
catch_cae->connectHost();
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
// Set Audio Assignments
|
||||
//
|
||||
RDSetMixerPorts(rdstation_conf->name(),catch_cae);
|
||||
RDSetMixerPorts(rda->station()->name(),rda->cae());
|
||||
|
||||
//
|
||||
// Deck Monitors
|
||||
@ -318,7 +283,7 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
this,SLOT(heartbeatFailedData(int)));
|
||||
catch_connect.back()->connector()->
|
||||
connectHost(q->value(1).toString(),RDCATCHD_TCP_PORT,
|
||||
catch_config->password());
|
||||
rda->config()->password());
|
||||
sql=QString().sprintf("select CHANNEL,MON_PORT_NUMBER from DECKS \
|
||||
where (CARD_NUMBER!=-1)&&(PORT_NUMBER!=-1)&&(CHANNEL>0)&&(STATION_NAME=\"%s\") \
|
||||
order by CHANNEL",(const char *)q->value(0).toString().lower());
|
||||
@ -338,7 +303,7 @@ order by CHANNEL",(const char *)q->value(0).toString().lower());
|
||||
|
||||
catch_monitor.back()->deckMon()->
|
||||
enableMonitorButton((q1->value(1).toInt()>=0)&&
|
||||
(catch_config->stationName().lower()==
|
||||
(rda->config()->stationName().lower()==
|
||||
q->value(0).toString().lower()));
|
||||
catch_monitor.back()->deckMon()->show();
|
||||
mapper->setMapping(catch_monitor.back()->deckMon(),
|
||||
@ -360,7 +325,7 @@ order by CHANNEL",(const char *)q->value(0).toString().lower());
|
||||
//
|
||||
// User
|
||||
//
|
||||
catch_user=NULL;
|
||||
// catch_user=NULL;
|
||||
|
||||
//
|
||||
// Filter Selectors
|
||||
@ -412,8 +377,8 @@ order by CHANNEL",(const char *)q->value(0).toString().lower());
|
||||
// Cart Picker
|
||||
//
|
||||
catch_cart_dialog=new RDCartDialog(&catch_filter,&catch_group,
|
||||
&catch_schedcode,catch_cae,catch_ripc,
|
||||
rdstation_conf,catch_system,catch_config,
|
||||
&catch_schedcode,rda->cae(),rda->ripc(),
|
||||
rda->station(),rda->system(),rda->config(),
|
||||
this);
|
||||
|
||||
//
|
||||
@ -616,7 +581,7 @@ order by CHANNEL",(const char *)q->value(0).toString().lower());
|
||||
|
||||
void MainWidget::log(RDConfig::LogPriority prio,const QString &msg)
|
||||
{
|
||||
catch_config->log("RDCatch",prio,msg);
|
||||
rda->config()->log("RDCatch",prio,msg);
|
||||
}
|
||||
|
||||
QSize MainWidget::sizeHint() const
|
||||
@ -706,7 +671,7 @@ void MainWidget::addData()
|
||||
RDListViewItem *item;
|
||||
int conn;
|
||||
|
||||
if(!catch_user->editCatches()) {
|
||||
if(!rda->user()->editCatches()) {
|
||||
return;
|
||||
}
|
||||
EnableScroll(false);
|
||||
@ -758,7 +723,7 @@ void MainWidget::editData()
|
||||
EditDownload *download;
|
||||
EditUpload *upload;
|
||||
|
||||
if(!catch_user->editCatches()) {
|
||||
if(!rda->user()->editCatches()) {
|
||||
return;
|
||||
}
|
||||
if(item==NULL) {
|
||||
@ -898,7 +863,7 @@ void MainWidget::deleteData()
|
||||
RDListViewItem *item=(RDListViewItem *)catch_recordings_list->selectedItem();
|
||||
int conn;
|
||||
|
||||
if(!catch_user->editCatches()||(item==NULL)) {
|
||||
if(!rda->user()->editCatches()||(item==NULL)) {
|
||||
return;
|
||||
}
|
||||
EnableScroll(false);
|
||||
@ -951,17 +916,20 @@ void MainWidget::ripcUserData()
|
||||
QString str;
|
||||
|
||||
str=QString("RDCatch")+" v"+VERSION+" - "+tr("Host")+":";
|
||||
setCaption(str+" "+catch_config->stationName()+", "+tr("User")+": "+
|
||||
catch_ripc->user());
|
||||
setCaption(str+" "+rda->config()->stationName()+", "+tr("User")+": "+
|
||||
rda->ripc()->user());
|
||||
/*
|
||||
if(catch_user!=NULL) {
|
||||
delete catch_user;
|
||||
}
|
||||
catch_user=new RDUser(catch_ripc->user());
|
||||
catch_user=new RDUser(rda->ripc()->user());
|
||||
*/
|
||||
rda->user()->setName(rda->ripc()->user());
|
||||
|
||||
//
|
||||
// Set Control Perms
|
||||
//
|
||||
bool modification_allowed=catch_user->editCatches();
|
||||
bool modification_allowed=rda->user()->editCatches();
|
||||
catch_add_button->setEnabled(modification_allowed);
|
||||
catch_edit_button->setEnabled(modification_allowed);
|
||||
catch_delete_button->setEnabled(modification_allowed);
|
||||
@ -1097,18 +1065,18 @@ void MainWidget::headButtonData()
|
||||
EnableScroll(false);
|
||||
if((!head_playing)&&(!tail_playing)) { // Start Head Play
|
||||
RDCut *cut=new RDCut(item->text(26));
|
||||
catch_cae->loadPlay(catch_audition_card,item->text(26),
|
||||
rda->cae()->loadPlay(catch_audition_card,item->text(26),
|
||||
&catch_audition_stream,&catch_play_handle);
|
||||
if(catch_audition_stream<0) {
|
||||
return;
|
||||
}
|
||||
RDSetMixerOutputPort(catch_cae,catch_audition_card,catch_audition_stream,
|
||||
RDSetMixerOutputPort(rda->cae(),catch_audition_card,catch_audition_stream,
|
||||
catch_audition_port);
|
||||
catch_cae->positionPlay(catch_play_handle,cut->startPoint());
|
||||
catch_cae->setPlayPortActive(catch_audition_card,catch_audition_port,catch_audition_stream);
|
||||
catch_cae->setOutputVolume(catch_audition_card,catch_audition_stream,catch_audition_port,
|
||||
rda->cae()->positionPlay(catch_play_handle,cut->startPoint());
|
||||
rda->cae()->setPlayPortActive(catch_audition_card,catch_audition_port,catch_audition_stream);
|
||||
rda->cae()->setOutputVolume(catch_audition_card,catch_audition_stream,catch_audition_port,
|
||||
0+cut->playGain());
|
||||
catch_cae->play(catch_play_handle,RDCATCH_AUDITION_LENGTH,
|
||||
rda->cae()->play(catch_play_handle,RDCATCH_AUDITION_LENGTH,
|
||||
RD_TIMESCALE_DIVISOR,false);
|
||||
head_playing=true;
|
||||
delete cut;
|
||||
@ -1125,24 +1093,24 @@ void MainWidget::tailButtonData()
|
||||
EnableScroll(false);
|
||||
if((!head_playing)&&(!tail_playing)) { // Start Tail Play
|
||||
RDCut *cut=new RDCut(item->text(26));
|
||||
catch_cae->loadPlay(catch_audition_card,item->text(26),
|
||||
rda->cae()->loadPlay(catch_audition_card,item->text(26),
|
||||
&catch_audition_stream,&catch_play_handle);
|
||||
if(catch_audition_stream<0) {
|
||||
return;
|
||||
}
|
||||
RDSetMixerOutputPort(catch_cae,catch_audition_card,catch_audition_stream,
|
||||
RDSetMixerOutputPort(rda->cae(),catch_audition_card,catch_audition_stream,
|
||||
catch_audition_port);
|
||||
if((cut->endPoint()-cut->startPoint()-RDCATCH_AUDITION_LENGTH)>0) {
|
||||
catch_cae->positionPlay(catch_play_handle,
|
||||
rda->cae()->positionPlay(catch_play_handle,
|
||||
cut->endPoint()-RDCATCH_AUDITION_LENGTH);
|
||||
}
|
||||
else {
|
||||
catch_cae->positionPlay(catch_play_handle,cut->startPoint());
|
||||
rda->cae()->positionPlay(catch_play_handle,cut->startPoint());
|
||||
}
|
||||
catch_cae->setPlayPortActive(catch_audition_card,catch_audition_port,catch_audition_stream);
|
||||
catch_cae->setOutputVolume(catch_audition_card,catch_audition_stream,catch_audition_port,
|
||||
rda->cae()->setPlayPortActive(catch_audition_card,catch_audition_port,catch_audition_stream);
|
||||
rda->cae()->setOutputVolume(catch_audition_card,catch_audition_stream,catch_audition_port,
|
||||
0+cut->playGain());
|
||||
catch_cae->play(catch_play_handle,RDCATCH_AUDITION_LENGTH,
|
||||
rda->cae()->play(catch_play_handle,RDCATCH_AUDITION_LENGTH,
|
||||
RD_TIMESCALE_DIVISOR,false);
|
||||
tail_playing=true;
|
||||
delete cut;
|
||||
@ -1153,8 +1121,8 @@ void MainWidget::tailButtonData()
|
||||
void MainWidget::stopButtonData()
|
||||
{
|
||||
if(head_playing||tail_playing) { // Stop Play
|
||||
catch_cae->stopPlay(catch_play_handle);
|
||||
catch_cae->unloadPlay(catch_play_handle);
|
||||
rda->cae()->stopPlay(catch_play_handle);
|
||||
rda->cae()->unloadPlay(catch_play_handle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1188,7 +1156,7 @@ void MainWidget::playStoppedData(int handle)
|
||||
catch_head_button->off();
|
||||
catch_tail_button->off();
|
||||
catch_stop_button->on();
|
||||
catch_cae->unloadPlay(catch_play_handle);
|
||||
rda->cae()->unloadPlay(catch_play_handle);
|
||||
}
|
||||
|
||||
|
||||
@ -1297,7 +1265,7 @@ void MainWidget::heartbeatFailedData(int id)
|
||||
|
||||
void MainWidget::quitMainWidget()
|
||||
{
|
||||
catch_db->removeDatabase(catch_config->mysqlDbname());
|
||||
catch_db->removeDatabase(rda->config()->mysqlDbname());
|
||||
SaveGeometry();
|
||||
exit(0);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Event Schedule Manager 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
|
||||
@ -34,20 +34,17 @@
|
||||
#include <qpixmap.h>
|
||||
#include <qscrollview.h>
|
||||
|
||||
#include <rdtransportbutton.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rd.h>
|
||||
#include <rduser.h>
|
||||
#include <rdripc.h>
|
||||
#include <rdcae.h>
|
||||
#include <rddeck.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rdcatch_connect.h>
|
||||
#include <rdconfig.h>
|
||||
#include <rddeck.h>
|
||||
#include <rdlistviewitem.h>
|
||||
#include <rdtransportbutton.h>
|
||||
|
||||
#include <catch_listview.h>
|
||||
#include <deckmon.h>
|
||||
#include <catch_monitor.h>
|
||||
#include <vbox.h>
|
||||
#include "catch_listview.h"
|
||||
#include "catch_monitor.h"
|
||||
#include "deckmon.h"
|
||||
#include "vbox.h"
|
||||
|
||||
/*
|
||||
* Widget Settings
|
||||
|
@ -973,7 +973,7 @@ nové</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcatch: </translation>
|
||||
<translation type="obsolete">rdcatch: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
@ -1331,5 +1331,9 @@ nové</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -973,7 +973,7 @@ Neu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcatch : </translation>
|
||||
<translation type="obsolete">rdcatch : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
@ -1331,5 +1331,9 @@ Neu</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -1249,7 +1249,7 @@ como Nuevo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcatch : </translation>
|
||||
<translation type="obsolete">rdcatch : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unknown</source>
|
||||
@ -1275,5 +1275,9 @@ como Nuevo</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -961,10 +961,6 @@ New</source>
|
||||
</context>
|
||||
<context>
|
||||
<name>MainWidget</name>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
<translation type="unfinished"></translation>
|
||||
@ -1265,5 +1261,9 @@ New</source>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -970,7 +970,7 @@ ny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcatch:</translation>
|
||||
<translation type="obsolete">rdcatch:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
@ -1328,5 +1328,9 @@ ny</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -970,7 +970,7 @@ ny</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcatch:</translation>
|
||||
<translation type="obsolete">rdcatch:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
@ -1328,5 +1328,9 @@ ny</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
@ -973,7 +973,7 @@ Novo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>rdcatch : </source>
|
||||
<translation>rdcaptura : </translation>
|
||||
<translation type="obsolete">rdcaptura : </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show Only Active Events</source>
|
||||
@ -1331,5 +1331,9 @@ Novo</translation>
|
||||
<source>All Types</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
Loading…
x
Reference in New Issue
Block a user