mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-03 01:19:25 +02:00
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
* Refactored the RDCartDialog class to use RDApplication.
This commit is contained in:
parent
2d2d52e408
commit
e9926053c8
@ -16677,3 +16677,5 @@
|
|||||||
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
|
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Refactored the RDListLogs class to use RDApplication.
|
* Refactored the RDListLogs class to use RDApplication.
|
||||||
* Converted rdadmin(1) to use RDApplication.
|
* Converted rdadmin(1) to use RDApplication.
|
||||||
|
2018-02-06 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Refactored the RDCartDialog class to use RDApplication.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A widget to select a Rivendell Cart.
|
// A widget to select a Rivendell Cart.
|
||||||
//
|
//
|
||||||
// (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
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -30,17 +30,18 @@
|
|||||||
#include <qfiledialog.h>
|
#include <qfiledialog.h>
|
||||||
#include <qmessagebox.h>
|
#include <qmessagebox.h>
|
||||||
|
|
||||||
#include <rdconf.h>
|
#include <rdapplication.h>
|
||||||
#include <rdcart_dialog.h>
|
|
||||||
#include <rdcart_search_text.h>
|
|
||||||
#include <rdtextvalidator.h>
|
|
||||||
#include <rdprofile.h>
|
|
||||||
#include <rddb.h>
|
|
||||||
#include <rdgroup.h>
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <rdaudioimport.h>
|
#include <rdaudioimport.h>
|
||||||
#endif // WIN32
|
#include <rdcart_dialog.h>
|
||||||
|
#include <rdcart_search_text.h>
|
||||||
|
#include <rdconf.h>
|
||||||
|
#include <rddb.h>
|
||||||
|
#include <rdgroup.h>
|
||||||
|
#include <rdprofile.h>
|
||||||
#include <rdsettings.h>
|
#include <rdsettings.h>
|
||||||
|
#include <rdtextvalidator.h>
|
||||||
|
#endif // WIN32
|
||||||
#include <rdwavefile.h>
|
#include <rdwavefile.h>
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -50,8 +51,7 @@
|
|||||||
#include "../icons/rml5.xpm"
|
#include "../icons/rml5.xpm"
|
||||||
|
|
||||||
RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||||
RDCae *cae,RDRipc *ripc,RDStation *station,
|
QWidget *parent)
|
||||||
RDSystem *system,RDConfig *config,QWidget *parent)
|
|
||||||
: QDialog(parent,"",true)
|
: QDialog(parent,"",true)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -60,9 +60,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
|||||||
setMinimumWidth(sizeHint().width());
|
setMinimumWidth(sizeHint().width());
|
||||||
setMinimumHeight(sizeHint().height());
|
setMinimumHeight(sizeHint().height());
|
||||||
|
|
||||||
cart_station=station;
|
|
||||||
cart_system=system;
|
|
||||||
cart_config=config;
|
|
||||||
cart_cartnum=NULL;
|
cart_cartnum=NULL;
|
||||||
cart_type=RDCart::All;
|
cart_type=RDCart::All;
|
||||||
cart_group=group;
|
cart_group=group;
|
||||||
@ -74,7 +71,7 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
cart_filter_mode=RDStation::FilterSynchronous;
|
cart_filter_mode=RDStation::FilterSynchronous;
|
||||||
#else
|
#else
|
||||||
cart_filter_mode=station->filterMode();
|
cart_filter_mode=rda->station()->filterMode();
|
||||||
#endif // WIN32
|
#endif // WIN32
|
||||||
|
|
||||||
if(filter==NULL) {
|
if(filter==NULL) {
|
||||||
@ -248,13 +245,13 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
|||||||
// Audition Player
|
// Audition Player
|
||||||
//
|
//
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if((cae==NULL)||(station->cueCard()<0)||(station->cuePort()<0)) {
|
if((rda->station()->cueCard()<0)||(rda->station()->cuePort()<0)) {
|
||||||
cart_player=NULL;
|
cart_player=NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cart_player=
|
cart_player=
|
||||||
new RDSimplePlayer(cae,ripc,station->cueCard(),station->cuePort(),
|
new RDSimplePlayer(rda->cae(),rda->ripc(),rda->station()->cueCard(),rda->station()->cuePort(),
|
||||||
station->cueStartCart(),station->cueStopCart(),this);
|
rda->station()->cueStartCart(),rda->station()->cueStopCart(),this);
|
||||||
cart_player->playButton()->setDisabled(true);
|
cart_player->playButton()->setDisabled(true);
|
||||||
cart_player->stopButton()->setDisabled(true);
|
cart_player->stopButton()->setDisabled(true);
|
||||||
cart_player->stopButton()->setOnColor(red);
|
cart_player->stopButton()->setOnColor(red);
|
||||||
@ -267,7 +264,7 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
|||||||
cart_editor_button=new QPushButton(tr("Send to\n&Editor"),this);
|
cart_editor_button=new QPushButton(tr("Send to\n&Editor"),this);
|
||||||
cart_editor_button->setFont(button_font);
|
cart_editor_button->setFont(button_font);
|
||||||
connect(cart_editor_button,SIGNAL(clicked()),this,SLOT(editorData()));
|
connect(cart_editor_button,SIGNAL(clicked()),this,SLOT(editorData()));
|
||||||
if(station->editorPath().isEmpty()) {
|
if(rda->station()->editorPath().isEmpty()) {
|
||||||
cart_editor_button->hide();
|
cart_editor_button->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,7 +274,7 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
|||||||
cart_file_button=new QPushButton(tr("Load From\n&File"),this);
|
cart_file_button=new QPushButton(tr("Load From\n&File"),this);
|
||||||
cart_file_button->setFont(button_font);
|
cart_file_button->setFont(button_font);
|
||||||
connect(cart_file_button,SIGNAL(clicked()),this,SLOT(loadFileData()));
|
connect(cart_file_button,SIGNAL(clicked()),this,SLOT(loadFileData()));
|
||||||
if(station->editorPath().isEmpty()) {
|
if(rda->station()->editorPath().isEmpty()) {
|
||||||
cart_file_button->hide();
|
cart_file_button->hide();
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@ -335,7 +332,7 @@ int RDCartDialog::exec(int *cartnum,RDCart::Type type,QString *svcname,
|
|||||||
switch(cart_type) {
|
switch(cart_type) {
|
||||||
case RDCart::All:
|
case RDCart::All:
|
||||||
case RDCart::Audio:
|
case RDCart::Audio:
|
||||||
if(cart_station->editorPath().isEmpty()) {
|
if(rda->station()->editorPath().isEmpty()) {
|
||||||
cart_editor_button->hide();
|
cart_editor_button->hide();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -512,7 +509,7 @@ void RDCartDialog::editorData()
|
|||||||
delete q;
|
delete q;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString cmd=cart_station->editorPath();
|
QString cmd=rda->station()->editorPath();
|
||||||
cmd.replace("%f",RDCut::pathName(q->value(0).toString()));
|
cmd.replace("%f",RDCut::pathName(q->value(0).toString()));
|
||||||
cmd.replace("%n",QString().sprintf("%06u",item->text(1).toUInt()));
|
cmd.replace("%n",QString().sprintf("%06u",item->text(1).toUInt()));
|
||||||
cmd.replace("%h",QString().sprintf("%d",q->value(1).toInt()));
|
cmd.replace("%h",QString().sprintf("%d",q->value(1).toInt()));
|
||||||
@ -561,7 +558,7 @@ void RDCartDialog::loadFileData()
|
|||||||
//
|
//
|
||||||
// Create Cart
|
// Create Cart
|
||||||
//
|
//
|
||||||
if((cartnum=RDCart::create(cart_system->tempCartGroup(),RDCart::Audio,
|
if((cartnum=RDCart::create(rda->system()->tempCartGroup(),RDCart::Audio,
|
||||||
&err_msg))==0) {
|
&err_msg))==0) {
|
||||||
delete cart;
|
delete cart;
|
||||||
QMessageBox::warning(this,tr("Cart Error"),
|
QMessageBox::warning(this,tr("Cart Error"),
|
||||||
@ -570,7 +567,7 @@ void RDCartDialog::loadFileData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cart=new RDCart(cartnum);
|
cart=new RDCart(cartnum);
|
||||||
cart->setOwner(cart_station->name());
|
cart->setOwner(rda->station()->name());
|
||||||
cut=new RDCut(cartnum,1,true);
|
cut=new RDCut(cartnum,1,true);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// A widget to select a Rivendell Cart.
|
// A widget to select a Rivendell Cart.
|
||||||
//
|
//
|
||||||
// (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
|
// 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
|
// it under the terms of the GNU General Public License version 2 as
|
||||||
@ -28,16 +28,10 @@
|
|||||||
#include <qprogressdialog.h>
|
#include <qprogressdialog.h>
|
||||||
#include <qcheckbox.h>
|
#include <qcheckbox.h>
|
||||||
|
|
||||||
#include <rdcae.h>
|
|
||||||
#include <rdconfig.h>
|
|
||||||
#include <rdripc.h>
|
|
||||||
#include <rdsystem.h>
|
|
||||||
#include <rdsimpleplayer.h>
|
#include <rdsimpleplayer.h>
|
||||||
#include <rdlistviewitem.h>
|
#include <rdlistviewitem.h>
|
||||||
#include <rdcart.h>
|
#include <rdcart.h>
|
||||||
#include <rdstation.h>
|
|
||||||
#include <rdcombobox.h>
|
#include <rdcombobox.h>
|
||||||
#include <rduser.h>
|
|
||||||
#include <rdbusydialog.h>
|
#include <rdbusydialog.h>
|
||||||
|
|
||||||
#define RDCART_DIALOG_STEP_SIZE 1000
|
#define RDCART_DIALOG_STEP_SIZE 1000
|
||||||
@ -47,9 +41,7 @@ class RDCartDialog : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||||
RDCae *cae,RDRipc *ripc,RDStation *station,RDSystem *system,
|
QWidget *parent=0);
|
||||||
RDConfig *config,QWidget *parent=0);
|
|
||||||
|
|
||||||
~RDCartDialog();
|
~RDCartDialog();
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const;
|
||||||
QSizePolicy sizePolicy() const;
|
QSizePolicy sizePolicy() const;
|
||||||
@ -116,9 +108,6 @@ class RDCartDialog : public QDialog
|
|||||||
QString cart_import_path;
|
QString cart_import_path;
|
||||||
QString cart_import_file_filter;
|
QString cart_import_file_filter;
|
||||||
bool *cart_temp_allowed;
|
bool *cart_temp_allowed;
|
||||||
RDStation *cart_station;
|
|
||||||
RDSystem *cart_system;
|
|
||||||
RDConfig *cart_config;
|
|
||||||
QString cart_user_name;
|
QString cart_user_name;
|
||||||
QString cart_user_password;
|
QString cart_user_password;
|
||||||
RDBusyDialog *cart_busy_dialog;
|
RDBusyDialog *cart_busy_dialog;
|
||||||
|
@ -196,8 +196,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
// Cart Dialog
|
// Cart Dialog
|
||||||
//
|
//
|
||||||
admin_cart_dialog=
|
admin_cart_dialog=
|
||||||
new RDCartDialog(&admin_filter,&admin_group,&admin_schedcode,NULL,
|
new RDCartDialog(&admin_filter,&admin_group,&admin_schedcode,this);
|
||||||
rda->ripc(),rda->station(),rda->system(),rda->config(),this);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// User Labels
|
// User Labels
|
||||||
|
@ -405,8 +405,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
// Cart Picker
|
// Cart Picker
|
||||||
//
|
//
|
||||||
rdcart_dialog=
|
rdcart_dialog=
|
||||||
new RDCartDialog(&air_add_filter,&air_add_group,&air_add_schedcode,
|
new RDCartDialog(&air_add_filter,&air_add_group,&air_add_schedcode,this);
|
||||||
rda->cae(),rda->ripc(),rda->station(),rda->system(),rda->config(),this);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Wall Clock
|
// Wall Clock
|
||||||
|
@ -114,10 +114,8 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Dialogs
|
// Dialogs
|
||||||
//
|
//
|
||||||
panel_cart_dialog=new RDCartDialog(&panel_filter,&panel_group,
|
panel_cart_dialog=
|
||||||
&panel_schedcode,rda->cae(),rda->ripc(),
|
new RDCartDialog(&panel_filter,&panel_group,&panel_schedcode,this);
|
||||||
rda->station(),rda->system(),rda->config(),
|
|
||||||
this);
|
|
||||||
panel_slot_dialog=new RDSlotDialog(tr("RDCartSlots"),this);
|
panel_slot_dialog=new RDSlotDialog(tr("RDCartSlots"),this);
|
||||||
panel_cue_dialog=new RDCueEditDialog(rda->cae(),rda->station()->cueCard(),
|
panel_cue_dialog=new RDCueEditDialog(rda->cae(),rda->station()->cueCard(),
|
||||||
rda->station()->cuePort(),
|
rda->station()->cuePort(),
|
||||||
|
@ -378,10 +378,8 @@ order by CHANNEL",(const char *)q->value(0).toString().lower());
|
|||||||
//
|
//
|
||||||
// Cart Picker
|
// Cart Picker
|
||||||
//
|
//
|
||||||
catch_cart_dialog=new RDCartDialog(&catch_filter,&catch_group,
|
catch_cart_dialog=
|
||||||
&catch_schedcode,rda->cae(),rda->ripc(),
|
new RDCartDialog(&catch_filter,&catch_group,&catch_schedcode,this);
|
||||||
rda->station(),rda->system(),rda->config(),
|
|
||||||
this);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cart List
|
// Cart List
|
||||||
|
@ -70,20 +70,7 @@ EditLogLine::EditLogLine(RDLogLine *line,QString *filter,QString *group,
|
|||||||
//
|
//
|
||||||
// Cart Picker
|
// Cart Picker
|
||||||
//
|
//
|
||||||
#ifdef WIN32
|
edit_cart_dialog=new RDCartDialog(edit_filter,edit_group,edit_schedcode,this);
|
||||||
/*
|
|
||||||
edit_cart_dialog=new RDCartDialog(&edit_filter,&edit_group,&edit_schedcode,
|
|
||||||
NULL,NULL,rdstation_conf,rdsystem,
|
|
||||||
log_config,this);
|
|
||||||
*/
|
|
||||||
edit_cart_dialog=new RDCartDialog(edit_filter,edit_group,edit_schedcode,
|
|
||||||
NULL,NULL,rda->station(),rda->system(),
|
|
||||||
rda->config(),this);
|
|
||||||
#else
|
|
||||||
edit_cart_dialog=new RDCartDialog(edit_filter,edit_group,edit_schedcode,
|
|
||||||
rda->cae(),rda->ripc(),rda->station(),rda->system(),
|
|
||||||
rda->config(),this);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Time Type
|
// Time Type
|
||||||
|
@ -170,8 +170,7 @@ MainWidget::MainWidget(QWidget *parent)
|
|||||||
// Cart Picker
|
// Cart Picker
|
||||||
//
|
//
|
||||||
panel_cart_dialog=
|
panel_cart_dialog=
|
||||||
new RDCartDialog(&panel_filter,&panel_group,&panel_schedcode,rda->cae(),
|
new RDCartDialog(&panel_filter,&panel_group,&panel_schedcode,this);
|
||||||
rda->ripc(),rda->station(),rda->system(),rda->config(),this);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Sound Panel Array
|
// Sound Panel Array
|
||||||
|
Loading…
x
Reference in New Issue
Block a user