mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-10 16:43:35 +02:00
2022-02-28 Fred Gleason <fredg@paravelsystems.com>
* Updated rdcatch(1) to eliminate superfluous SQL filter updates. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -22902,3 +22902,5 @@
|
||||
* Updated rdlogedit(1) to eliminate superfluous SQL filter updates.
|
||||
2022-02-28 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed debugging printf()s from rdlogedit(1).
|
||||
2022-02-28 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Updated rdcatch(1) to eliminate superfluous SQL filter updates.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Add a Rivendell RDCatch Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "edit_switchevent.h"
|
||||
#include "edit_download.h"
|
||||
#include "edit_upload.h"
|
||||
#include "globals.h"
|
||||
|
||||
extern RDStation *rdstation_conf;
|
||||
|
||||
@@ -154,13 +155,10 @@ int AddRecording::exec(RDRecording::Type *type,int rec_id)
|
||||
|
||||
void AddRecording::recordingData()
|
||||
{
|
||||
EditRecording *recording=new EditRecording(add_id,NULL,add_filter,this);
|
||||
if(!recording->exec()) {
|
||||
delete recording;
|
||||
if(!catch_editrecording_dialog->exec(add_id,NULL)) {
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete recording;
|
||||
*add_type=RDRecording::Recording;
|
||||
done(true);
|
||||
}
|
||||
@@ -168,13 +166,10 @@ void AddRecording::recordingData()
|
||||
|
||||
void AddRecording::playoutData()
|
||||
{
|
||||
EditPlayout *playout=new EditPlayout(add_id,NULL,add_filter,this);
|
||||
if(!playout->exec()) {
|
||||
delete playout;
|
||||
if(!catch_editplayout_dialog->exec(add_id,NULL)) {
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete playout;
|
||||
*add_type=RDRecording::Playout;
|
||||
done(true);
|
||||
}
|
||||
@@ -182,14 +177,10 @@ void AddRecording::playoutData()
|
||||
|
||||
void AddRecording::downloadData()
|
||||
{
|
||||
EditDownload *recording=
|
||||
new EditDownload(add_id,NULL,add_filter,this);
|
||||
if(!recording->exec()) {
|
||||
delete recording;
|
||||
if(!catch_editdownload_dialog->exec(add_id,NULL)) {
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete recording;
|
||||
*add_type=RDRecording::Download;
|
||||
done(true);
|
||||
}
|
||||
@@ -197,13 +188,10 @@ void AddRecording::downloadData()
|
||||
|
||||
void AddRecording::uploadData()
|
||||
{
|
||||
EditUpload *recording=new EditUpload(add_id,NULL,add_filter,this);
|
||||
if(!recording->exec()) {
|
||||
delete recording;
|
||||
if(!catch_editupload_dialog->exec(add_id,NULL)) {
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete recording;
|
||||
*add_type=RDRecording::Upload;
|
||||
done(true);
|
||||
}
|
||||
@@ -211,13 +199,10 @@ void AddRecording::uploadData()
|
||||
|
||||
void AddRecording::macroData()
|
||||
{
|
||||
EditCartEvent *recording=new EditCartEvent(add_id,NULL,this);
|
||||
if(!recording->exec()) {
|
||||
delete recording;
|
||||
if(!catch_editcartevent_dialog->exec(add_id,NULL)) {
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete recording;
|
||||
*add_type=RDRecording::MacroEvent;
|
||||
done(true);
|
||||
}
|
||||
@@ -225,13 +210,13 @@ void AddRecording::macroData()
|
||||
|
||||
void AddRecording::switchData()
|
||||
{
|
||||
EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this);
|
||||
if(!recording->exec()) {
|
||||
delete recording;
|
||||
// EditSwitchEvent *recording=new EditSwitchEvent(add_id,NULL,this);
|
||||
if(!catch_editswitchevent_dialog->exec(add_id,NULL)) {
|
||||
// delete recording;
|
||||
done(false);
|
||||
return;
|
||||
}
|
||||
delete recording;
|
||||
// delete recording;
|
||||
*add_type=RDRecording::SwitchEvent;
|
||||
done(true);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Macro Cart Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,14 @@
|
||||
#include "edit_cartevent.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
EditCartEvent::EditCartEvent(QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
QString temp;
|
||||
int cartnum;
|
||||
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_cart=NULL;
|
||||
edit_recording=NULL;
|
||||
|
||||
setWindowTitle("RDCatch - "+tr("Edit Cart Event"));
|
||||
|
||||
@@ -44,17 +44,6 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//
|
||||
RDTextValidator *validator=new RDTextValidator(this);
|
||||
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(id);
|
||||
if((cartnum=edit_recording->macroCart())>=0) {
|
||||
edit_cart=new RDCart(cartnum);
|
||||
}
|
||||
else {
|
||||
edit_cart=NULL;
|
||||
}
|
||||
|
||||
//
|
||||
// Event Widget
|
||||
//
|
||||
@@ -80,7 +69,8 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
edit_destination_button=new QPushButton(this);
|
||||
edit_destination_button->setFont(subLabelFont());
|
||||
edit_destination_button->setText(tr("Select"));
|
||||
connect(edit_destination_button,SIGNAL(clicked()),this,SLOT(selectCartData()));
|
||||
connect(edit_destination_button,SIGNAL(clicked()),
|
||||
this,SLOT(selectCartData()));
|
||||
|
||||
//
|
||||
// DOW Selector
|
||||
@@ -102,9 +92,6 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
edit_saveas_button->setFont(buttonFont());
|
||||
edit_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(edit_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
if(adds==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -128,18 +115,6 @@ EditCartEvent::EditCartEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//
|
||||
setMinimumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
if(edit_cart!=NULL) {
|
||||
edit_destination_edit->
|
||||
setText(QString::asprintf("%06d",edit_cart->number()));
|
||||
}
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +134,46 @@ QSize EditCartEvent::sizeHint() const
|
||||
}
|
||||
|
||||
|
||||
int EditCartEvent::exec(int id,std::vector<int> *adds)
|
||||
{
|
||||
int cartnum;
|
||||
|
||||
edit_added_events=adds;
|
||||
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_recording=new RDRecording(id);
|
||||
if(edit_cart!=NULL) {
|
||||
delete edit_cart;
|
||||
}
|
||||
if((cartnum=edit_recording->macroCart())>=0) {
|
||||
edit_cart=new RDCart(cartnum);
|
||||
}
|
||||
else {
|
||||
edit_cart=NULL;
|
||||
}
|
||||
|
||||
if(edit_added_events==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
edit_saveas_button->show();
|
||||
}
|
||||
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
if(edit_cart!=NULL) {
|
||||
edit_destination_edit->
|
||||
setText(QString::asprintf("%06d",edit_cart->number()));
|
||||
}
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy EditCartEvent::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Netcatch Cart Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -37,11 +37,14 @@ class EditCartEvent : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditCartEvent(int id,std::vector<int> *adds,QWidget *parent=0);
|
||||
EditCartEvent(QWidget *parent=0);
|
||||
~EditCartEvent();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
||||
public slots:
|
||||
int exec(int id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void selectCartData();
|
||||
void saveasData();
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Download Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,14 +29,14 @@
|
||||
#include "edit_download.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditDownload::EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
EditDownload::EditDownload(QString *filter,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
QString temp;
|
||||
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_recording=NULL;
|
||||
edit_added_events=NULL;
|
||||
edit_filter=filter;
|
||||
|
||||
setWindowTitle("RDCatch - "+tr("Edit Download"));
|
||||
@@ -46,16 +46,11 @@ EditDownload::EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
RDTextValidator *validator=new RDTextValidator(this,"validator");
|
||||
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(record_id);
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
edit_cut_dialog=new RDCutDialog(edit_filter,&edit_group,&edit_schedcode,
|
||||
false,true,true,"RDCatch",false,this);
|
||||
// edit_cut_dialog=new RDCutDialog(edit_filter,&edit_group,&edit_schedcode,
|
||||
// false,true,true,"RDCatch",false,this);
|
||||
|
||||
//
|
||||
// Event Widget
|
||||
@@ -203,9 +198,6 @@ EditDownload::EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
edit_saveas_button->setFont(buttonFont());
|
||||
edit_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(edit_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
if(adds==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -229,10 +221,44 @@ EditDownload::EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
setMinimumSize(sizeHint());
|
||||
setMaximumSize(sizeHint());
|
||||
}
|
||||
|
||||
|
||||
EditDownload::~EditDownload()
|
||||
{
|
||||
delete edit_event_widget;
|
||||
if(edit_deck!=NULL) {
|
||||
delete edit_deck;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSize EditDownload::sizeHint() const
|
||||
{
|
||||
return QSize(edit_event_widget->sizeHint().width(),432);
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy EditDownload::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
}
|
||||
|
||||
|
||||
int EditDownload::exec(int record_id,std::vector<int> *adds)
|
||||
{
|
||||
edit_added_events=adds;
|
||||
if(edit_added_events==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
edit_saveas_button->show();
|
||||
}
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_recording=new RDRecording(record_id);
|
||||
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_url_edit->setText(edit_recording->url());
|
||||
@@ -263,27 +289,8 @@ EditDownload::EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_eventoffset_spin->setValue(edit_recording->eventdateOffset());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
}
|
||||
|
||||
|
||||
EditDownload::~EditDownload()
|
||||
{
|
||||
delete edit_event_widget;
|
||||
if(edit_deck!=NULL) {
|
||||
delete edit_deck;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSize EditDownload::sizeHint() const
|
||||
{
|
||||
return QSize(edit_event_widget->sizeHint().width(),432);
|
||||
}
|
||||
|
||||
|
||||
QSizePolicy EditDownload::sizePolicy() const
|
||||
{
|
||||
return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +316,7 @@ void EditDownload::urlChangedData(const QString &str)
|
||||
|
||||
void EditDownload::selectCartData()
|
||||
{
|
||||
if(edit_cut_dialog->exec(&edit_cutname)) {
|
||||
if(catch_cut_dialog->exec(&edit_cutname)) {
|
||||
edit_description_edit->setText(RDCutPath(edit_cutname));
|
||||
edit_destination_edit->setText(tr("Cut")+" "+edit_cutname);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Download Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -41,12 +41,14 @@ class EditDownload : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditDownload(int record_id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent=0);
|
||||
EditDownload(QString *filter,QWidget *parent=0);
|
||||
~EditDownload();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
public slots:
|
||||
int exec(int record_id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void urlChangedData(const QString &str);
|
||||
void selectCartData();
|
||||
@@ -65,7 +67,6 @@ class EditDownload : public RDDialog
|
||||
void Save();
|
||||
bool CheckEvent(bool include_myself);
|
||||
RDDeck *edit_deck;
|
||||
RDCutDialog *edit_cut_dialog;
|
||||
RDRecording *edit_recording;
|
||||
QLabel *edit_description_label;
|
||||
QLineEdit *edit_description_edit;
|
||||
|
@@ -26,14 +26,15 @@
|
||||
#include "edit_playout.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
//EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
EditPlayout::EditPlayout(QString *filter,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
QString temp;
|
||||
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_added_events=NULL;
|
||||
edit_recording=NULL;
|
||||
edit_filter=filter;
|
||||
|
||||
setWindowTitle("RDCatch - "+tr("Edit Playout"));
|
||||
@@ -52,7 +53,7 @@ EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(id);
|
||||
// edit_recording=NULL;
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
@@ -109,9 +110,11 @@ EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
edit_saveas_button->setFont(buttonFont());
|
||||
edit_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(edit_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
/*
|
||||
if(adds==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
*/
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -133,6 +136,7 @@ EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
/*
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_cutname=edit_recording->cutName();
|
||||
@@ -141,6 +145,7 @@ EditPlayout::EditPlayout(int id,std::vector<int> *adds,QString *filter,
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
locationChangedData(edit_event_widget->stationName(),
|
||||
edit_event_widget->deckNumber());
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +172,33 @@ QSizePolicy EditPlayout::sizePolicy() const
|
||||
}
|
||||
|
||||
|
||||
int EditPlayout::exec(int id,std::vector<int> *adds)
|
||||
{
|
||||
edit_added_events=adds;
|
||||
if(edit_added_events==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
edit_saveas_button->show();
|
||||
}
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_recording=new RDRecording(id);
|
||||
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_cutname=edit_recording->cutName();
|
||||
edit_destination_edit->setText(RDCutPath(edit_cutname));
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
locationChangedData(edit_event_widget->stationName(),
|
||||
edit_event_widget->deckNumber());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void EditPlayout::locationChangedData(const QString &station,int decknum)
|
||||
{
|
||||
if(edit_deck!=NULL) {
|
||||
|
@@ -38,11 +38,14 @@ class EditPlayout : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditPlayout(int id,std::vector<int> *adds,QString *filter,QWidget *parent=0);
|
||||
EditPlayout(QString *filter,QWidget *parent=0);
|
||||
~EditPlayout();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
public slots:
|
||||
int exec(int id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void locationChangedData(const QString &station,int decknum);
|
||||
void selectCutData();
|
||||
|
@@ -29,14 +29,15 @@
|
||||
#include "edit_recording.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
//EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
EditRecording::EditRecording(QString *filter,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
QString temp;
|
||||
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_recording=NULL;
|
||||
edit_added_events=NULL;
|
||||
edit_filter=filter;
|
||||
|
||||
setWindowTitle("RDCatch - "+tr("Edit Recording"));
|
||||
@@ -55,13 +56,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(id);
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
edit_cut_dialog=new RDCutDialog(edit_filter,&edit_group,&edit_schedcode,
|
||||
false,true,true,"RDCatch",false,this);
|
||||
// edit_recording=new RDRecording(id);
|
||||
|
||||
//
|
||||
// Event Widget
|
||||
@@ -301,9 +296,6 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
edit_saveas_button->setFont(buttonFont());
|
||||
edit_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(edit_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
if(adds==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -325,6 +317,7 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
/*
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_starttime_edit->setTime(edit_recording->startTime());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
@@ -414,12 +407,12 @@ EditRecording::EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
edit_channels_box->setCurrentIndex(edit_recording->channels()-1);
|
||||
}
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
EditRecording::~EditRecording()
|
||||
{
|
||||
delete edit_cut_dialog;
|
||||
delete edit_event_widget;
|
||||
delete edit_dow_selector;
|
||||
if(edit_deck!=NULL) {
|
||||
@@ -441,6 +434,114 @@ QSizePolicy EditRecording::sizePolicy() const
|
||||
}
|
||||
|
||||
|
||||
int EditRecording::exec(int id,std::vector<int> *adds)
|
||||
{
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_recording=new RDRecording(id);
|
||||
edit_added_events=adds;
|
||||
if(edit_added_events==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
edit_saveas_button->show();
|
||||
}
|
||||
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_starttime_edit->setTime(edit_recording->startTime());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_starttype_group->button((int)edit_recording->startType())->
|
||||
setChecked(true);
|
||||
switch((RDRecording::StartType)edit_starttype_group->checkedId()) {
|
||||
case RDRecording::HardStart:
|
||||
edit_starttime_edit->setTime(edit_recording->startTime());
|
||||
break;
|
||||
|
||||
case RDRecording::GpiStart:
|
||||
edit_start_startwindow_edit->setTime(edit_recording->startTime());
|
||||
edit_start_endwindow_edit->
|
||||
setTime(edit_start_startwindow_edit->time().
|
||||
addMSecs(edit_recording->startLength()));
|
||||
edit_startmatrix_spin->setValue(edit_recording->startMatrix());
|
||||
edit_startline_spin->setValue(edit_recording->startLine());
|
||||
edit_startoffset_edit->
|
||||
setTime(QTime(0,0,0).addMSecs(edit_recording->startOffset()));
|
||||
edit_multirec_box->
|
||||
setChecked(edit_recording->allowMultipleRecordings());
|
||||
break;
|
||||
}
|
||||
startTypeClickedData(edit_starttype_group->checkedId());
|
||||
edit_endtype_group->button((int)edit_recording->endType())->setChecked(true);
|
||||
switch((RDRecording::EndType)edit_endtype_group->checkedId()) {
|
||||
case RDRecording::LengthEnd:
|
||||
edit_endlength_edit->
|
||||
setTime(QTime(0,0,0).addMSecs(edit_recording->length()));
|
||||
break;
|
||||
|
||||
case RDRecording::HardEnd:
|
||||
edit_endtime_edit->setTime(edit_recording->endTime());
|
||||
break;
|
||||
|
||||
case RDRecording::GpiEnd:
|
||||
edit_end_startwindow_edit->setTime(edit_recording->endTime());
|
||||
edit_end_endwindow_edit->
|
||||
setTime(edit_end_startwindow_edit->time().
|
||||
addMSecs(edit_recording->endLength()));
|
||||
edit_endmatrix_spin->setValue(edit_recording->endMatrix());
|
||||
edit_endline_spin->setValue(edit_recording->endLine());
|
||||
break;
|
||||
}
|
||||
edit_maxlength_edit->
|
||||
setTime(QTime(0,0,0).addMSecs(edit_recording->maxGpiRecordingLength()));
|
||||
endTypeClickedData(edit_endtype_group->checkedId());
|
||||
|
||||
edit_cutname=edit_recording->cutName();
|
||||
edit_destination_edit->setText(RDCutPath(edit_cutname));
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_startoffset_box->setValue(edit_recording->startdateOffset());
|
||||
edit_endoffset_box->setValue(edit_recording->enddateOffset());
|
||||
locationChangedData(edit_event_widget->stationName(),
|
||||
edit_event_widget->deckNumber());
|
||||
|
||||
QString source=GetSourceName(edit_recording->switchSource());
|
||||
for(int i=0;i<edit_source_box->count();i++) {
|
||||
if(edit_source_box->itemData(i).toString()==source) {
|
||||
edit_source_box->setCurrentIndex(i);
|
||||
}
|
||||
}
|
||||
if(edit_recording->trimThreshold()>0) {
|
||||
edit_autotrim_box->setChecked(true);
|
||||
edit_autotrim_spin->setValue(-(edit_recording->trimThreshold()/100));
|
||||
}
|
||||
else {
|
||||
edit_autotrim_box->setChecked(false);
|
||||
edit_autotrim_spin->setValue(rda->libraryConf()->trimThreshold()/100);
|
||||
}
|
||||
autotrimToggledData(edit_autotrim_box->isChecked());
|
||||
if(edit_recording->normalizationLevel()<0) {
|
||||
edit_normalize_box->setChecked(true);
|
||||
edit_normalize_spin->setValue(edit_recording->normalizationLevel()/100);
|
||||
}
|
||||
else {
|
||||
edit_normalize_box->setChecked(false);
|
||||
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
|
||||
// deck exists, use the deck default for num. channels. Otherwise use the
|
||||
// previously entered (or DB default) recording num. channels.
|
||||
if( (edit_recording->station().length() == 0) && (edit_deck!=NULL) ) {
|
||||
edit_channels_box->setCurrentIndex(edit_deck->defaultChannels()-1);
|
||||
} else {
|
||||
edit_channels_box->setCurrentIndex(edit_recording->channels()-1);
|
||||
}
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void EditRecording::locationChangedData(const QString &station,int decknum)
|
||||
{
|
||||
if(edit_deck!=NULL) {
|
||||
@@ -539,7 +640,7 @@ void EditRecording::selectCutData()
|
||||
{
|
||||
QString str;
|
||||
|
||||
if(edit_cut_dialog->exec(&edit_cutname)) {
|
||||
if(catch_cut_dialog->exec(&edit_cutname)) {
|
||||
edit_description_edit->setText(RDCutPath(edit_cutname));
|
||||
str=QString(tr("Cut"));
|
||||
edit_destination_edit->setText(tr("Cut")+" "+edit_cutname);
|
||||
|
@@ -41,12 +41,14 @@ class EditRecording : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditRecording(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent=0);
|
||||
EditRecording(QString *filter,QWidget *parent=0);
|
||||
~EditRecording();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
||||
public slots:
|
||||
int exec(int id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void locationChangedData(const QString &station,int decknum);
|
||||
void startTypeClickedData(int id);
|
||||
@@ -69,7 +71,7 @@ class EditRecording : public RDDialog
|
||||
QString GetSourceName(int input);
|
||||
int GetSource();
|
||||
RDDeck *edit_deck;
|
||||
RDCutDialog *edit_cut_dialog;
|
||||
// RDCutDialog *edit_cut_dialog;
|
||||
RDRecording *edit_recording;
|
||||
EventWidget *edit_event_widget;
|
||||
QGroupBox *edit_start_groupbox;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Netcatch Cart Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -27,11 +27,13 @@
|
||||
|
||||
#include "edit_switchevent.h"
|
||||
|
||||
EditSwitchEvent::EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//EditSwitchEvent::EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
EditSwitchEvent::EditSwitchEvent(QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
edit_matrix=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_added_events=NULL;
|
||||
edit_recording=NULL;
|
||||
|
||||
edit_deck=NULL;
|
||||
|
||||
@@ -51,7 +53,7 @@ EditSwitchEvent::EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(id);
|
||||
// edit_recording=new RDRecording(id);
|
||||
|
||||
//
|
||||
// Event Widget
|
||||
@@ -121,9 +123,6 @@ EditSwitchEvent::EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
edit_saveas_button->setFont(buttonFont());
|
||||
edit_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(edit_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
if(adds==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -145,12 +144,13 @@ EditSwitchEvent::EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent)
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
/*
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
activateStationData(edit_event_widget->stationName());
|
||||
|
||||
*/
|
||||
//
|
||||
// Input/Output Spin Box Connections
|
||||
// (Placed here to avoid a QComboBox::changeItem error)
|
||||
@@ -184,6 +184,31 @@ QSizePolicy EditSwitchEvent::sizePolicy() const
|
||||
}
|
||||
|
||||
|
||||
int EditSwitchEvent::exec(int id,std::vector<int> *adds)
|
||||
{
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_added_events=adds;
|
||||
if(edit_added_events==NULL) {
|
||||
edit_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
edit_saveas_button->show();
|
||||
}
|
||||
|
||||
edit_recording=new RDRecording(id);
|
||||
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
activateStationData(edit_event_widget->stationName());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void EditSwitchEvent::activateStationData(const QString &str)
|
||||
{
|
||||
QString sql=QString("select ")+
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Netcatch Cart Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -39,11 +39,14 @@ class EditSwitchEvent : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditSwitchEvent(int id,std::vector<int> *adds,QWidget *parent=0);
|
||||
EditSwitchEvent(QWidget *parent=0);
|
||||
~EditSwitchEvent();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
||||
public slots:
|
||||
int exec(int id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void activateStationData(const QString &str);
|
||||
void activateMatrixData(const QString &str);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Upload Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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,26 +29,16 @@
|
||||
#include "edit_upload.h"
|
||||
#include "globals.h"
|
||||
|
||||
EditUpload::EditUpload(int id,std::vector<int> *adds,QString *filter,
|
||||
QWidget *parent)
|
||||
EditUpload::EditUpload(QString *filter,QWidget *parent)
|
||||
: RDDialog(parent)
|
||||
{
|
||||
edit_deck=NULL;
|
||||
edit_added_events=adds;
|
||||
edit_recording=NULL;
|
||||
edit_added_events=NULL;
|
||||
edit_filter=filter;
|
||||
|
||||
setWindowTitle("RDCatch - "+tr("Edit Upload"));
|
||||
|
||||
//
|
||||
// The Recording Record
|
||||
//
|
||||
edit_recording=new RDRecording(id);
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
edit_cut_dialog=new RDCutDialog(edit_filter,&edit_group,&edit_schedcode,
|
||||
false,false,false,"RDCatch",false,this);
|
||||
//
|
||||
// Event Widget
|
||||
//
|
||||
@@ -203,9 +193,6 @@ EditUpload::EditUpload(int id,std::vector<int> *adds,QString *filter,
|
||||
event_saveas_button->setFont(buttonFont());
|
||||
event_saveas_button->setText(tr("Save As\nNew"));
|
||||
connect(event_saveas_button,SIGNAL(clicked()),this,SLOT(saveasData()));
|
||||
if(adds==NULL) {
|
||||
event_saveas_button->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Ok Button
|
||||
@@ -233,6 +220,7 @@ EditUpload::EditUpload(int id,std::vector<int> *adds,QString *filter,
|
||||
//
|
||||
// Populate Data
|
||||
//
|
||||
/*
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_url_edit->setText(edit_recording->url());
|
||||
@@ -263,6 +251,7 @@ EditUpload::EditUpload(int id,std::vector<int> *adds,QString *filter,
|
||||
normalizeCheckData(edit_normalize_box->isChecked());
|
||||
edit_feed_box->setCurrentText(edit_recording->feedKeyName());
|
||||
feedChangedData(edit_feed_box->currentIndex());
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -288,6 +277,55 @@ QSizePolicy EditUpload::sizePolicy() const
|
||||
}
|
||||
|
||||
|
||||
int EditUpload::exec(int id,std::vector<int> *adds)
|
||||
{
|
||||
edit_added_events=adds;
|
||||
if(edit_added_events==NULL) {
|
||||
event_saveas_button->hide();
|
||||
}
|
||||
else {
|
||||
event_saveas_button->show();
|
||||
}
|
||||
if(edit_recording!=NULL) {
|
||||
delete edit_recording;
|
||||
}
|
||||
edit_recording=new RDRecording(id);
|
||||
|
||||
edit_event_widget->fromRecording(edit_recording->id());
|
||||
edit_description_edit->setText(edit_recording->description());
|
||||
edit_url_edit->setText(edit_recording->url());
|
||||
edit_username_edit->setText(edit_recording->urlUsername());
|
||||
edit_password_edit->setText(edit_recording->urlPassword());
|
||||
edit_use_id_file_check->setChecked(edit_recording->urlUseIdFile());
|
||||
edit_cutname=edit_recording->cutName();
|
||||
if(!edit_recording->cutName().isEmpty()) {
|
||||
edit_source_edit->setText("Cut "+edit_recording->cutName());
|
||||
}
|
||||
edit_metadata_box->setChecked(edit_recording->enableMetadata());
|
||||
edit_dow_selector->fromRecording(edit_recording->id());
|
||||
edit_eventoffset_spin->setValue(edit_recording->eventdateOffset());
|
||||
edit_oneshot_box->setChecked(edit_recording->oneShot());
|
||||
edit_settings.setFormat(edit_recording->format());
|
||||
edit_settings.setChannels(edit_recording->channels());
|
||||
edit_settings.setSampleRate(edit_recording->sampleRate());
|
||||
edit_settings.setBitRate(edit_recording->bitrate());
|
||||
edit_settings.setQuality(edit_recording->quality());
|
||||
edit_format_edit->setText(edit_settings.description());
|
||||
if(edit_recording->normalizationLevel()>0) {
|
||||
edit_normalize_box->setChecked(false);
|
||||
}
|
||||
else {
|
||||
edit_normalize_box->setChecked(true);
|
||||
edit_normalize_spin->setValue(edit_recording->normalizationLevel()/100);
|
||||
}
|
||||
normalizeCheckData(edit_normalize_box->isChecked());
|
||||
edit_feed_box->setCurrentText(edit_recording->feedKeyName());
|
||||
feedChangedData(edit_feed_box->currentIndex());
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
|
||||
void EditUpload::stationChangedData(const QString &str)
|
||||
{
|
||||
if(!CheckFormat()) {
|
||||
@@ -360,7 +398,7 @@ void EditUpload::selectCartData()
|
||||
{
|
||||
QString str;
|
||||
|
||||
if(edit_cut_dialog->exec(&edit_cutname)) {
|
||||
if(catch_cut_dialog->exec(&edit_cutname)) {
|
||||
edit_description_edit->setText(RDCutPath(edit_cutname));
|
||||
str=QString(tr("Cut"));
|
||||
edit_source_edit->setText(tr("Cut")+" "+edit_cutname);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Edit a Rivendell Upload Event
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -40,11 +40,14 @@ class EditUpload : public RDDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
EditUpload(int id,std::vector<int> *adds,QString *filter,QWidget *parent=0);
|
||||
EditUpload(QString *filter,QWidget *parent=0);
|
||||
~EditUpload();
|
||||
QSize sizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
|
||||
public slots:
|
||||
int exec(int id,std::vector<int> *adds);
|
||||
|
||||
private slots:
|
||||
void stationChangedData(const QString &str);
|
||||
void feedChangedData(int index);
|
||||
@@ -66,7 +69,6 @@ class EditUpload : public RDDialog
|
||||
bool CheckEvent(bool include_myself);
|
||||
bool CheckFormat();
|
||||
RDDeck *edit_deck;
|
||||
RDCutDialog *edit_cut_dialog;
|
||||
RDRecording *edit_recording;
|
||||
RDSettings edit_settings;
|
||||
EventWidget *edit_event_widget;
|
||||
|
@@ -24,11 +24,25 @@
|
||||
#include <rdaudio_port.h>
|
||||
#include <rdcart_dialog.h>
|
||||
|
||||
#include "edit_cartevent.h"
|
||||
#include "edit_download.h"
|
||||
#include "edit_playout.h"
|
||||
#include "edit_recording.h"
|
||||
#include "edit_switchevent.h"
|
||||
#include "edit_upload.h"
|
||||
|
||||
//
|
||||
// Global Resources
|
||||
//
|
||||
extern RDAudioPort *rdaudioport_conf;
|
||||
extern RDCartDialog *catch_cart_dialog;
|
||||
extern RDCutDialog *catch_cut_dialog;
|
||||
extern EditCartEvent *catch_editcartevent_dialog;
|
||||
extern EditDownload *catch_editdownload_dialog;
|
||||
extern EditPlayout *catch_editplayout_dialog;
|
||||
extern EditRecording *catch_editrecording_dialog;
|
||||
extern EditSwitchEvent *catch_editswitchevent_dialog;
|
||||
extern EditUpload *catch_editupload_dialog;
|
||||
extern int catch_audition_card;
|
||||
extern int catch_audition_port;
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// The Event Schedule Manager for Rivendell.
|
||||
//
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2022 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
|
||||
@@ -33,14 +33,8 @@
|
||||
#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"
|
||||
#include "rdcatch.h"
|
||||
|
||||
//
|
||||
@@ -48,6 +42,13 @@
|
||||
//
|
||||
RDAudioPort *rdaudioport_conf;
|
||||
RDCartDialog *catch_cart_dialog;
|
||||
RDCutDialog *catch_cut_dialog;
|
||||
EditCartEvent *catch_editcartevent_dialog;
|
||||
EditDownload *catch_editdownload_dialog;
|
||||
EditPlayout *catch_editplayout_dialog;
|
||||
EditRecording *catch_editrecording_dialog;
|
||||
EditSwitchEvent *catch_editswitchevent_dialog;
|
||||
EditUpload *catch_editupload_dialog;
|
||||
int catch_audition_card=-1;
|
||||
int catch_audition_port=-1;
|
||||
|
||||
@@ -260,6 +261,22 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
catch_monitor_area->hide();
|
||||
}
|
||||
|
||||
//
|
||||
// Dialogs
|
||||
//
|
||||
catch_cart_dialog=
|
||||
new RDCartDialog(&catch_filter,&catch_group,&catch_schedcode,"RDCatch",
|
||||
true,this);
|
||||
catch_cut_dialog=
|
||||
new RDCutDialog(&catch_filter,&catch_group,&catch_schedcode,
|
||||
false,true,false,"RDCatch",true,this);
|
||||
catch_editcartevent_dialog=new EditCartEvent(this);
|
||||
catch_editdownload_dialog=new EditDownload(&catch_filter,this);
|
||||
catch_editplayout_dialog=new EditPlayout(&catch_filter,this);
|
||||
catch_editrecording_dialog=new EditRecording(&catch_filter,this);
|
||||
catch_editswitchevent_dialog=new EditSwitchEvent(this);
|
||||
catch_editupload_dialog=new EditUpload(&catch_filter,this);
|
||||
|
||||
//
|
||||
// Filter Selectors
|
||||
//
|
||||
@@ -304,12 +321,6 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
catch_type_box->insertItem(catch_type_box->count(),tr("All Types"));
|
||||
catch_type_box->setCurrentIndex(catch_type_box->count()-1);
|
||||
|
||||
//
|
||||
// Cart Picker
|
||||
//
|
||||
catch_cart_dialog=new RDCartDialog(&catch_filter,&catch_group,
|
||||
&catch_schedcode,"RDCatch",false,this);
|
||||
|
||||
//
|
||||
// Cart List
|
||||
//
|
||||
@@ -566,12 +577,6 @@ void MainWidget::addData()
|
||||
void MainWidget::editData()
|
||||
{
|
||||
std::vector<int> new_events;
|
||||
EditRecording *recording;
|
||||
EditPlayout *playout;
|
||||
EditCartEvent *event;
|
||||
EditSwitchEvent *switch_event;
|
||||
EditDownload *download;
|
||||
EditUpload *upload;
|
||||
bool updated=false;
|
||||
QModelIndexList rows=catch_recordings_view->selectionModel()->selectedRows();
|
||||
|
||||
@@ -599,39 +604,27 @@ void MainWidget::editData()
|
||||
int id=catch_recordings_model->recordId(rows.first());
|
||||
switch(catch_recordings_model->recordType(rows.first())) {
|
||||
case RDRecording::Recording:
|
||||
recording=new EditRecording(id,&new_events,&catch_filter,this);
|
||||
updated=recording->exec();
|
||||
delete recording;
|
||||
updated=catch_editrecording_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::Playout:
|
||||
playout=new EditPlayout(id,&new_events,&catch_filter,this);
|
||||
updated=playout->exec();
|
||||
delete playout;
|
||||
updated=catch_editplayout_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::MacroEvent:
|
||||
event=new EditCartEvent(id,&new_events,this);
|
||||
updated=event->exec();
|
||||
delete event;
|
||||
updated=catch_editcartevent_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::SwitchEvent:
|
||||
switch_event=new EditSwitchEvent(id,&new_events,this);
|
||||
updated=switch_event->exec();
|
||||
delete switch_event;
|
||||
updated=catch_editswitchevent_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::Download:
|
||||
download=new EditDownload(id,&new_events,&catch_filter,this);
|
||||
updated=download->exec();
|
||||
delete download;
|
||||
updated=catch_editdownload_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::Upload:
|
||||
upload=new EditUpload(id,&new_events,&catch_filter,this);
|
||||
updated=upload->exec();
|
||||
delete upload;
|
||||
updated=catch_editupload_dialog->exec(id,&new_events);
|
||||
break;
|
||||
|
||||
case RDRecording::LastType:
|
||||
|
@@ -25,7 +25,9 @@
|
||||
#include <QComboBox>
|
||||
#include <QScrollArea>
|
||||
|
||||
#include <rdcart_dialog.h>
|
||||
#include <rdcatch_connect.h>
|
||||
#include <rdcut_dialog.h>
|
||||
#include <rdmainwindow.h>
|
||||
#include <rdtableview.h>
|
||||
#include <rdtransportbutton.h>
|
||||
|
Reference in New Issue
Block a user