mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-16 08:34:12 +02:00
2021-01-17 Fred Gleason <fredg@paravelsystems.com>
* Restored enforcement of service authorized groups in rdairplay(1) and rdlogedit(1). Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
834ea996fd
commit
cd581d3c51
@ -20818,3 +20818,6 @@
|
||||
* Added support for cart notes in the 'RDCartDialog' dialog.
|
||||
2021-01-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Removed all global variables from rdairplay(1).
|
||||
2021-01-17 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Restored enforcement of service authorized groups in rdairplay(1)
|
||||
and rdlogedit(1).
|
||||
|
@ -1408,10 +1408,6 @@ ze &souboru</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished">Kódy rozvrhovače:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1395,10 +1395,6 @@ senden</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1399,10 +1399,6 @@ Color</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished">Cód. Programac.:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1217,10 +1217,6 @@ La Couleur</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1386,10 +1386,6 @@ farge</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1386,10 +1386,6 @@ farge</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1387,10 +1387,6 @@ Cor</translation>
|
||||
<source>Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>And Scheduler Code:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Matching Carts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -155,8 +155,7 @@ int RDButtonDialog::exec(RDPanelButton *button,bool hookmode,
|
||||
|
||||
void RDButtonDialog::setCartData()
|
||||
{
|
||||
if(edit_cart_dialog->exec(&edit_cart,RDCart::All,&edit_svcname,1,
|
||||
edit_user_name,edit_user_password)==0) {
|
||||
if(edit_cart_dialog->exec(&edit_cart,RDCart::All,edit_svcname,NULL)==0) {
|
||||
DisplayCart(edit_cart);
|
||||
}
|
||||
}
|
||||
|
@ -97,12 +97,7 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode,
|
||||
cart_cart_model->setPalette(palette());
|
||||
cart_cart_view->setModel(cart_cart_model);
|
||||
cart_cart_filter->setModel(cart_cart_model);
|
||||
// connect(cart_cart_filter,SIGNAL(filterChanged(const QString &)),
|
||||
// cart_cart_model,SLOT(setFilterSql(const QString &)));
|
||||
connect(cart_cart_model,SIGNAL(modelReset()),this,SLOT(modelResetData()));
|
||||
|
||||
// connect(cart_cart_model,SIGNAL(rowCountChanged(int)),
|
||||
// cart_cart_filter,SLOT(setMatchCount(int)));
|
||||
connect(cart_cart_view,SIGNAL(doubleClicked(const QModelIndex &)),
|
||||
this,SLOT(cartDoubleClickedData(const QModelIndex &)));
|
||||
connect(cart_cart_view->selectionModel(),
|
||||
@ -189,18 +184,15 @@ QSize RDCartDialog::sizeHint() const
|
||||
}
|
||||
|
||||
|
||||
int RDCartDialog::exec(int *cartnum,RDCart::Type type,QString *svcname,
|
||||
int svc_quan,const QString &username,
|
||||
const QString &passwd,bool *temp_allowed)
|
||||
int RDCartDialog::exec(int *cartnum,RDCart::Type type,const QString &svc,
|
||||
bool *temp_allowed)
|
||||
{
|
||||
printf("RDCartDialog service: %s\n",svc.toUtf8().constData());
|
||||
LoadState();
|
||||
cart_cart_filter->setShowCartType(type);
|
||||
cart_cart_filter->setService(svc);
|
||||
cart_cartnum=cartnum;
|
||||
cart_type=type;
|
||||
cart_service=svcname;
|
||||
cart_service_quan=svc_quan;
|
||||
cart_user_name=username;
|
||||
cart_user_password=passwd;
|
||||
cart_temp_allowed=temp_allowed;
|
||||
switch(cart_type) {
|
||||
case RDCart::All:
|
||||
@ -398,7 +390,7 @@ void RDCartDialog::loadFileData()
|
||||
settings.setNormalizationLevel(-11);
|
||||
conv->setDestinationSettings(&settings);
|
||||
conv->setUseMetadata(true);
|
||||
err=conv->runImport(cart_user_name,cart_user_password,&conv_err);
|
||||
err=conv->runImport(rda->user()->name(),rda->user()->password(),&conv_err);
|
||||
cart_busy_dialog->hide();
|
||||
switch(conv_err) {
|
||||
case RDAudioImport::ErrorOk:
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <QLineEdit>
|
||||
#include <QProgressDialog>
|
||||
#include <QPushButton>
|
||||
#include <QStringList>
|
||||
#include <QTableView>
|
||||
|
||||
#include <rdbusydialog.h>
|
||||
@ -48,9 +49,13 @@ class RDCartDialog : public RDDialog
|
||||
QSizePolicy sizePolicy() const;
|
||||
|
||||
public slots:
|
||||
int exec(int *cartnum,RDCart::Type type,QString *svcname,int svc_quan,
|
||||
const QString &username,const QString &passwd,
|
||||
bool *temp_allowed=NULL);
|
||||
int exec(int *cartnum,RDCart::Type type,const QString &svc,
|
||||
bool *temp_allowed);
|
||||
// int exec(int *cartnum,RDCart::Type type,QString *svcname,int svc_quan,
|
||||
// bool *temp_allowed);
|
||||
// int exec(int *cartnum,RDCart::Type type,QString *svcname,int svc_quan,
|
||||
// const QString &username,const QString &passwd,
|
||||
// bool *temp_allowed=NULL);
|
||||
|
||||
private slots:
|
||||
void modelResetData();
|
||||
@ -82,15 +87,12 @@ class RDCartDialog : public RDDialog
|
||||
QString *cart_filter;
|
||||
bool local_filter;
|
||||
RDCart::Type cart_type;
|
||||
QString *cart_service;
|
||||
int cart_service_quan;
|
||||
QStringList cart_services;
|
||||
RDStation::FilterMode cart_filter_mode;
|
||||
QProgressDialog *cart_progress_dialog;
|
||||
QString cart_import_path;
|
||||
QString cart_import_file_filter;
|
||||
bool *cart_temp_allowed;
|
||||
QString cart_user_name;
|
||||
QString cart_user_password;
|
||||
RDBusyDialog *cart_busy_dialog;
|
||||
RDSimplePlayer *cart_player;
|
||||
QString cart_caption;
|
||||
|
@ -18,6 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <QList>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "rdapplication.h"
|
||||
@ -33,6 +34,9 @@ RDCartFilter::RDCartFilter(bool show_drag_box,QWidget *parent)
|
||||
d_model=NULL;
|
||||
d_show_drag_box=show_drag_box;
|
||||
|
||||
//
|
||||
// Filter Phrase
|
||||
//
|
||||
d_filter_edit=new QLineEdit(this);
|
||||
d_filter_label=new QLabel(d_filter_edit,tr("Filter:"),this);
|
||||
d_filter_label->setFont(labelFont());
|
||||
@ -85,16 +89,6 @@ RDCartFilter::RDCartFilter(bool show_drag_box,QWidget *parent)
|
||||
connect(d_codes_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(groupChangedData(const QString &)));
|
||||
|
||||
//
|
||||
// Scheduler Codes2 Filter
|
||||
//
|
||||
d_codes2_box=new QComboBox(this);
|
||||
d_codes2_label=new QLabel(d_codes2_box,tr("And Scheduler Code:"),this);
|
||||
d_codes2_label->setFont(labelFont());
|
||||
d_codes2_label->setAlignment(Qt::AlignVCenter|Qt::AlignRight);
|
||||
connect(d_codes2_box,SIGNAL(activated(const QString &)),
|
||||
this,SLOT(groupChangedData(const QString &)));
|
||||
|
||||
//
|
||||
// Results Counter
|
||||
//
|
||||
@ -232,7 +226,7 @@ QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||
sql+=RDCartFilter::typeFilter(d_showaudio_check->isChecked(),
|
||||
d_showmacro_check->isChecked(),
|
||||
d_show_cart_type);
|
||||
// sql+=RDCartFilter::phraseFilter(d_filter_edit->text().trimmed(),true);
|
||||
sql+=RDCartFilter::phraseFilter(d_filter_edit->text().trimmed(),true);
|
||||
QStringList groups;
|
||||
for(int i=0;i<d_group_box->count();i++) {
|
||||
groups.push_back(d_group_box->text(i));
|
||||
@ -369,6 +363,24 @@ void RDCartFilter::setUserIsAdmin(bool state)
|
||||
}
|
||||
|
||||
|
||||
QString RDCartFilter::service() const
|
||||
{
|
||||
return d_service;
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::setService(const QString &svc)
|
||||
{
|
||||
if(svc!=d_service) {
|
||||
d_service=svc;
|
||||
if(!d_service.isEmpty()) {
|
||||
LoadServiceGroups();
|
||||
}
|
||||
emit filterChanged(filterSql());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RDLibraryModel *RDCartFilter::model() const
|
||||
{
|
||||
return d_model;
|
||||
@ -409,35 +421,19 @@ void RDCartFilter::changeUser()
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
d_group_box->clear();
|
||||
d_group_box->insertItem(tr("ALL"));
|
||||
if(d_user_is_admin) {
|
||||
sql=QString("select NAME from GROUPS order by NAME ");
|
||||
if(d_service.isEmpty()) {
|
||||
LoadUserGroups();
|
||||
}
|
||||
else {
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
}
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_group_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
|
||||
d_codes_box->clear();
|
||||
d_codes_box->insertItem(tr("ALL"));
|
||||
d_codes2_box->clear();
|
||||
d_codes2_box->insertItem(tr("ALL"));
|
||||
sql=QString().sprintf("select CODE from SCHED_CODES");
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_codes_box->insertItem(q->value(0).toString());
|
||||
d_codes2_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
d_search_button->setDisabled(true);
|
||||
groupChangedData(d_group_box->currentText());
|
||||
}
|
||||
|
||||
|
||||
@ -523,8 +519,6 @@ void RDCartFilter::resizeEvent(QResizeEvent *e)
|
||||
d_group_box->setGeometry(70,40,100,20);
|
||||
d_codes_label->setGeometry(175,40,115,20);
|
||||
d_codes_box->setGeometry(295,40,100,20);
|
||||
d_codes2_label->setGeometry(410,40,130,20);
|
||||
d_codes2_box->setGeometry(545,40,100,20);
|
||||
d_matches_label->setGeometry(660,40,100,20);
|
||||
d_matches_edit->setGeometry(765,40,55,20);
|
||||
d_showmatches_label->setGeometry(760,66,200,20);
|
||||
@ -545,29 +539,29 @@ QString RDCartFilter::phraseFilter(const QString &phrase, bool incl_cuts)
|
||||
QString sql="";
|
||||
|
||||
if(phrase.isEmpty()) {
|
||||
sql=" &&";
|
||||
sql=" ";
|
||||
}
|
||||
else {
|
||||
sql+=QString(" (")+
|
||||
"(CART.TITLE like \"%%\")||"+
|
||||
"(CART.ARTIST like \"%%\")||"+
|
||||
"(CART.CLIENT like \"%%\")||"+
|
||||
"(CART.AGENCY like \"%%\")||"+
|
||||
"(CART.ALBUM like \"%%\")||"+
|
||||
"(CART.LABEL like \"%%\")||"+
|
||||
"(CART.NUMBER like \"%%\")||"+
|
||||
"(CART.PUBLISHER like \"%%\")||"+
|
||||
"(CART.COMPOSER like \"%%\")||"+
|
||||
"(CART.CONDUCTOR like \"%%\")||"+
|
||||
"(CART.SONG_ID like \"%%\")||"+
|
||||
"(CART.USER_DEFINED like \"%%\")";
|
||||
QString search=RDEscapeString(phrase);
|
||||
sql=sql+QString(" ((CART.TITLE like \"%")+search+"%\")||"+
|
||||
"(CART.ARTIST like \"%"+search+"%\")||"+
|
||||
"(CART.CLIENT like \"%"+search+"%\")||"+
|
||||
"(CART.AGENCY like \"%"+search+"%\")||"+
|
||||
"(CART.ALBUM like \"%"+search+"%\")||"+
|
||||
"(CART.LABEL like \"%"+search+"%\")||"+
|
||||
"(CART.NUMBER like \"%"+search+"%\")||"+
|
||||
"(CART.PUBLISHER like \"%"+search+"%\")||"+
|
||||
"(CART.COMPOSER like \"%"+search+"%\")||"+
|
||||
"(CART.CONDUCTOR like \"%"+search+"%\")||"+
|
||||
"(CART.SONG_ID like \"%"+search+"%\")||"+
|
||||
"(CART.USER_DEFINED like \"%"+search+"%\")";
|
||||
if(incl_cuts) {
|
||||
sql+=QString("||(CUTS.ISCI like \"%%\")")+
|
||||
"||(CUTS.ISRC like \"%%\")"+
|
||||
"||(CUTS.DESCRIPTION like \"%%\")"+
|
||||
"||(CUTS.OUTCUE like \"%%\")";
|
||||
sql+=QString("||(CUTS.ISCI like \"%")+search+"%\")"+
|
||||
"||(CUTS.ISRC like \"%"+search+"%\")"+
|
||||
"||(CUTS.DESCRIPTION like \"%"+search+"%\")"+
|
||||
"||(CUTS.OUTCUE like \"%"+search+"%\")";
|
||||
}
|
||||
sql+=") &&";
|
||||
sql+=") && ";
|
||||
}
|
||||
|
||||
return sql;
|
||||
@ -630,3 +624,48 @@ QString RDCartFilter::typeFilter(bool incl_audio,bool incl_macro,
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::LoadUserGroups()
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
d_group_box->clear();
|
||||
d_group_box->insertItem(tr("ALL"));
|
||||
if(d_user_is_admin) {
|
||||
sql=QString("select NAME from GROUPS order by NAME ");
|
||||
}
|
||||
else {
|
||||
sql=QString("select GROUP_NAME from USER_PERMS where ")+
|
||||
"USER_NAME=\""+RDEscapeString(rda->user()->name())+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
}
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_group_box->insertItem(q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
|
||||
groupChangedData(d_group_box->currentText());
|
||||
}
|
||||
|
||||
|
||||
void RDCartFilter::LoadServiceGroups()
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q=NULL;
|
||||
|
||||
d_group_box->clear();
|
||||
d_group_box->insertItem(0,tr("ALL"));
|
||||
sql=QString("select ")+
|
||||
"GROUP_NAME "+
|
||||
"from AUDIO_PERMS where "+
|
||||
"SERVICE_NAME=\""+RDEscapeString(d_service)+"\" "+
|
||||
"order by GROUP_NAME";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
d_group_box->insertItem(d_group_box->count(),q->value(0).toString());
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ class RDCartFilter : public RDWidget
|
||||
void setLimitSearch(bool state);
|
||||
bool userIsAdmin() const;
|
||||
void setUserIsAdmin(bool state);
|
||||
QString service() const;
|
||||
void setService(const QString &svc);
|
||||
RDLibraryModel *model() const;
|
||||
static QString phraseFilter(const QString &phrase,bool incl_cuts);
|
||||
static QString groupFilter(const QString &group,const QStringList &groups);
|
||||
@ -83,6 +85,8 @@ class RDCartFilter : public RDWidget
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
private:
|
||||
void LoadUserGroups();
|
||||
void LoadServiceGroups();
|
||||
RDLibraryModel *d_model;
|
||||
QLineEdit *d_filter_edit;
|
||||
QLabel *d_filter_label;
|
||||
@ -90,8 +94,6 @@ class RDCartFilter : public RDWidget
|
||||
QLabel *d_group_label;
|
||||
QComboBox *d_codes_box;
|
||||
QLabel *d_codes_label;
|
||||
QComboBox *d_codes2_box;
|
||||
QLabel *d_codes2_label;
|
||||
QLineEdit *d_matches_edit;
|
||||
QLabel *d_matches_label;
|
||||
QPushButton *d_search_button;
|
||||
@ -110,6 +112,7 @@ class RDCartFilter : public RDWidget
|
||||
RDCart::Type d_show_cart_type;
|
||||
QString d_default_group;
|
||||
bool d_user_is_admin;
|
||||
QString d_service;
|
||||
};
|
||||
|
||||
|
||||
|
@ -428,8 +428,7 @@ void RDCartSlot::loadData()
|
||||
case RDSlotOptions::CartDeckMode:
|
||||
cartnum=slot_logline->cartNumber();
|
||||
if(cartnum==0) {
|
||||
if(slot_cart_dialog->exec(&cartnum,RDCart::All,&svcname,0,
|
||||
slot_user->name(),slot_user->password(),
|
||||
if(slot_cart_dialog->exec(&cartnum,RDCart::All,QString(),
|
||||
&slot_temp_cart)==0) {
|
||||
load(cartnum);
|
||||
}
|
||||
|
@ -445,6 +445,7 @@ void RDLibraryModel::setShowNotes(int state)
|
||||
|
||||
void RDLibraryModel::setFilterSql(const QString &sql)
|
||||
{
|
||||
// printf("FILTER SQL: %s\n",sql.toUtf8().constData());
|
||||
updateModel(sql);
|
||||
}
|
||||
|
||||
|
@ -138,8 +138,7 @@ QSizePolicy AutofillCarts::sizePolicy() const
|
||||
void AutofillCarts::addData()
|
||||
{
|
||||
int cart=0;
|
||||
if(admin_cart_dialog->exec(&cart,RDCart::Audio,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())<0) {
|
||||
if(admin_cart_dialog->exec(&cart,RDCart::Audio,QString(),NULL)<0) {
|
||||
return;
|
||||
}
|
||||
RDCart *rdcart=new RDCart(cart);
|
||||
|
@ -355,8 +355,7 @@ void EditCartSlots::cartSelectData()
|
||||
{
|
||||
int cartnum=edit_cart_edit->text().toInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::All,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::All,QString(),NULL)==0) {
|
||||
edit_cart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ void EditDecks::playSettingsChangedData(int id,int card,int port)
|
||||
void EditDecks::eventCartSelectedData(int n)
|
||||
{
|
||||
int cartnum=edit_event_edits[n]->text().toInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,"","")==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(cartnum==0) {
|
||||
edit_event_edits[n]->setText("");
|
||||
}
|
||||
|
@ -538,8 +538,7 @@ void EditDropbox::pathChangedData(QString text)
|
||||
void EditDropbox::selectCartData()
|
||||
{
|
||||
int cartnum=box_to_cart_edit->text().toInt();
|
||||
admin_cart_dialog->exec(&cartnum,RDCart::Audio,NULL,0,
|
||||
rda->user()->name(),rda->user()->password());
|
||||
admin_cart_dialog->exec(&cartnum,RDCart::Audio,QString(),NULL);
|
||||
if(cartnum>0) {
|
||||
box_to_cart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
|
@ -201,8 +201,7 @@ QSizePolicy EditGpi::sizePolicy() const
|
||||
void EditGpi::selectOnData()
|
||||
{
|
||||
int oncart=edit_onmacro_edit->text().toInt();
|
||||
if(admin_cart_dialog->exec(&oncart,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&oncart,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(oncart>0) {
|
||||
RDCart *rdcart=new RDCart(oncart);
|
||||
edit_onmacro_edit->setText(QString().sprintf("%06d",oncart));
|
||||
@ -227,8 +226,7 @@ void EditGpi::clearOnData()
|
||||
void EditGpi::selectOffData()
|
||||
{
|
||||
int offcart=edit_offmacro_edit->text().toInt();
|
||||
if(admin_cart_dialog->exec(&offcart,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&offcart,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(offcart>0) {
|
||||
RDCart *rdcart=new RDCart(offcart);
|
||||
edit_offmacro_edit->setText(QString().sprintf("%06d",offcart));
|
||||
|
@ -1109,8 +1109,7 @@ void EditMatrix::sasResourcesButtonData()
|
||||
void EditMatrix::startCartData()
|
||||
{
|
||||
int cartnum=edit_start_cart_edit->text().toUInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(cartnum>0) {
|
||||
edit_start_cart_edit->setText(QString().sprintf("%06u",cartnum));
|
||||
}
|
||||
@ -1124,8 +1123,7 @@ void EditMatrix::startCartData()
|
||||
void EditMatrix::stopCartData()
|
||||
{
|
||||
int cartnum=edit_stop_cart_edit->text().toUInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(cartnum>0) {
|
||||
edit_stop_cart_edit->setText(QString().sprintf("%06u",cartnum));
|
||||
}
|
||||
@ -1139,8 +1137,7 @@ void EditMatrix::stopCartData()
|
||||
void EditMatrix::startCart2Data()
|
||||
{
|
||||
int cartnum=edit_start_cart2_edit->text().toUInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(cartnum>0) {
|
||||
edit_start_cart2_edit->setText(QString().sprintf("%06u",cartnum));
|
||||
}
|
||||
@ -1154,8 +1151,7 @@ void EditMatrix::startCart2Data()
|
||||
void EditMatrix::stopCart2Data()
|
||||
{
|
||||
int cartnum=edit_stop_cart2_edit->text().toUInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
if(cartnum>0) {
|
||||
edit_stop_cart2_edit->setText(QString().sprintf("%06u",cartnum));
|
||||
}
|
||||
|
@ -403,8 +403,7 @@ void EditRDLogedit::selectStartData()
|
||||
{
|
||||
int cartnum=lib_startcart_edit->text().toInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
lib_startcart_edit->setText(QString().sprintf("%d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -413,8 +412,7 @@ void EditRDLogedit::selectStartData()
|
||||
void EditRDLogedit::selectEndData()
|
||||
{
|
||||
int cartnum=lib_endcart_edit->text().toInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
lib_endcart_edit->setText(QString().sprintf("%d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -423,8 +421,7 @@ void EditRDLogedit::selectEndData()
|
||||
void EditRDLogedit::selectRecordStartData()
|
||||
{
|
||||
int cartnum=lib_recstartcart_edit->text().toInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
lib_recstartcart_edit->setText(QString().sprintf("%d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -433,8 +430,7 @@ void EditRDLogedit::selectRecordStartData()
|
||||
void EditRDLogedit::selectRecordEndData()
|
||||
{
|
||||
int cartnum=lib_recendcart_edit->text().toInt();
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
lib_recendcart_edit->setText(QString().sprintf("%d",cartnum));
|
||||
}
|
||||
}
|
||||
|
@ -606,8 +606,7 @@ void EditStation::selectClicked()
|
||||
{
|
||||
int cartnum=station_startup_cart_edit->text().toInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
station_startup_cart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -628,8 +627,7 @@ void EditStation::heartbeatClickedData()
|
||||
{
|
||||
int cartnum=station_hbcart_edit->text().toInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
station_hbcart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -889,8 +887,7 @@ void EditStation::startCartClickedData()
|
||||
{
|
||||
int cartnum=station_start_cart_edit->text().toUInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
station_start_cart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
}
|
||||
@ -900,8 +897,7 @@ void EditStation::stopCartClickedData()
|
||||
{
|
||||
int cartnum=station_stop_cart_edit->text().toUInt();
|
||||
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(admin_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)==0) {
|
||||
station_stop_cart_edit->setText(QString().sprintf("%06d",cartnum));
|
||||
}
|
||||
}
|
||||
|
@ -2226,8 +2226,8 @@ void MainWidget::SetActionMode(StartButton::Mode mode)
|
||||
if(air_panel!=NULL) {
|
||||
air_panel->setActionMode(RDAirPlayConf::Normal);
|
||||
}
|
||||
if(air_cart_dialog->exec(&air_add_cart,RDCart::All,0,0,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(air_cart_dialog->
|
||||
exec(&air_add_cart,RDCart::All,air_log[0]->serviceName(),NULL)==0) {
|
||||
SetActionMode(StartButton::AddTo);
|
||||
}
|
||||
else {
|
||||
|
@ -294,8 +294,7 @@ void EditCartEvent::selectCartData()
|
||||
if(edit_cart!=NULL) {
|
||||
cartnum=edit_cart->number();
|
||||
}
|
||||
switch(catch_cart_dialog->exec(&cartnum,RDCart::Macro,NULL,0,
|
||||
rda->user()->name(),rda->user()->password())) {
|
||||
switch(catch_cart_dialog->exec(&cartnum,RDCart::Macro,QString(),NULL)) {
|
||||
case 0:
|
||||
if(edit_cart!=NULL) {
|
||||
delete edit_cart;
|
||||
|
@ -147,8 +147,7 @@ void EditLogLine::selectCartData()
|
||||
if(!ok) {
|
||||
cartnum=-1;
|
||||
}
|
||||
if(edit_cart_dialog->exec(&cartnum,RDCart::All,&edit_service,1,
|
||||
rda->user()->name(),rda->user()->password())==0) {
|
||||
if(edit_cart_dialog->exec(&cartnum,RDCart::All,edit_service,NULL)==0) {
|
||||
FillCart(cartnum);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user