mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-21 15:08:02 +02:00
Merged 'master'
This commit is contained in:
commit
678dd62791
29
ChangeLog
29
ChangeLog
@ -20051,6 +20051,31 @@
|
|||||||
devices to fail to be properly restored by the connection watchdog.
|
devices to fail to be properly restored by the connection watchdog.
|
||||||
2020-06-11 Fred Gleason <fredg@paravelsystems.com>
|
2020-06-11 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Incremented the package version to 3.4.0rss0.
|
* Incremented the package version to 3.4.0rss0.
|
||||||
|
2020-06-18 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified the 'Edit Event' dialog in rdlogmanager(1) to use
|
||||||
|
symbolic menu item ids.
|
||||||
|
2020-06-18 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed the checkbox from the 'Delete' right-click menu item
|
||||||
|
in the 'Edit Event' dialog in rdlogmanager(1).
|
||||||
|
2020-06-18 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a regression in the 'Edit Event' dialog in rdlogmanager(1)
|
||||||
|
that caused the first cart transition type to be incorrect when
|
||||||
|
the 'Pre-Import Carts' list was populated.
|
||||||
|
2020-06-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified the 'Edit Event' dialog in rdlogmanager(1) to show '[auto]'
|
||||||
|
as the transition type for the leading event in Pre-/Post-Import
|
||||||
|
lists.
|
||||||
|
2020-06-19 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Removed the 'Q3PopupMenu' dependency from rdlogmanager(1).
|
||||||
|
2020-06-23 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in the 'Add Next' ['PX'] RML that failed to return an
|
||||||
|
error when an invalid offset value was supplied.
|
||||||
|
* Fixed a bug in the 'Add Next' ['PX'] RML that failed to honor
|
||||||
|
the 'Default Trans. Type' setting in the 'Configure RDAirPlay'
|
||||||
|
dialog in rdadmin(1).
|
||||||
|
2020-06-23 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Applied the RD_MAX_CART_NUMBER define in
|
||||||
|
'rdairplay/local_macros.cpp'.
|
||||||
2020-06-30 Fred Gleason <fredg@paravelsystems.com>
|
2020-06-30 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added a 'RDFeed::publicUrl()' static method.
|
* Added a 'RDFeed::publicUrl()' static method.
|
||||||
* Added a 'Public URL' column in the 'List Feeds' dialog in
|
* Added a 'Public URL' column in the 'List Feeds' dialog in
|
||||||
@ -20099,3 +20124,7 @@
|
|||||||
2020-07-07 Fred Gleason <fredg@paravelsystems.com>
|
2020-07-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Added 'Copy to Clipboard' buttons for the XML template editors
|
* Added 'Copy to Clipboard' buttons for the XML template editors
|
||||||
in the 'Edit Feed' dialog in rdadmin(1).
|
in the 'Edit Feed' dialog in rdadmin(1).
|
||||||
|
2020-07-07 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Modified 'RDWaveFile' to work around known fencepost errors in
|
||||||
|
WAV files generated by "Sonic Studio soundBlade" by
|
||||||
|
"PME Mastering, Inc."
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Abstract an rdlogmanager(1) Import List
|
// Abstract an rdlogmanager(1) Import List
|
||||||
//
|
//
|
||||||
// (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2018-2020 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
|
||||||
@ -191,7 +191,7 @@ void RDEventImportList::load()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RDEventImportList::save() const
|
void RDEventImportList::save(RDLogLine::TransType first_trans) const
|
||||||
{
|
{
|
||||||
QString sql=QString("delete from EVENT_LINES where ")+
|
QString sql=QString("delete from EVENT_LINES where ")+
|
||||||
"EVENT_NAME=\""+RDEscapeString(list_event_name)+"\" && "+
|
"EVENT_NAME=\""+RDEscapeString(list_event_name)+"\" && "+
|
||||||
@ -205,8 +205,14 @@ void RDEventImportList::save() const
|
|||||||
QString().sprintf("COUNT=%u,",i)+
|
QString().sprintf("COUNT=%u,",i)+
|
||||||
QString().sprintf("EVENT_TYPE=%d,",item->eventType())+
|
QString().sprintf("EVENT_TYPE=%d,",item->eventType())+
|
||||||
QString().sprintf("CART_NUMBER=%u,",item->cartNumber())+
|
QString().sprintf("CART_NUMBER=%u,",item->cartNumber())+
|
||||||
QString().sprintf("TRANS_TYPE=%d,",item->transType())+
|
"MARKER_COMMENT=\""+RDEscapeString(item->markerComment())+"\",";
|
||||||
"MARKER_COMMENT=\""+RDEscapeString(item->markerComment())+"\"";
|
if(first_trans==RDLogLine::NoTrans) {
|
||||||
|
sql+=QString().sprintf("TRANS_TYPE=%d",item->transType());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sql+=QString().sprintf("TRANS_TYPE=%d",first_trans);
|
||||||
|
first_trans=RDLogLine::NoTrans;
|
||||||
|
}
|
||||||
RDSqlQuery::apply(sql);
|
RDSqlQuery::apply(sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Abstract an rdlogmanager(1) Import List
|
// Abstract an rdlogmanager(1) Import List
|
||||||
//
|
//
|
||||||
// (C) Copyright 2018-2019 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2018-2020 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
|
||||||
@ -64,7 +64,7 @@ class RDEventImportList
|
|||||||
void removeItem(int n);
|
void removeItem(int n);
|
||||||
void moveItem(int from_line,int to_line);
|
void moveItem(int from_line,int to_line);
|
||||||
void load();
|
void load();
|
||||||
void save() const;
|
void save(RDLogLine::TransType first_trans=RDLogLine::NoTrans) const;
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -2494,16 +2494,23 @@ bool RDWaveFile::IsM4A(int fd)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
off_t RDWaveFile::FindChunk(int fd,const char *chunk_name,unsigned *chunk_size,
|
off_t RDWaveFile::FindChunk(int fd,const char *chunk_name,unsigned *chunk_size,
|
||||||
bool big_end)
|
bool big_end)
|
||||||
{
|
{
|
||||||
int i;
|
int offset;
|
||||||
char name[5]={0,0,0,0,0};
|
char name[5]={0,0,0,0,0};
|
||||||
unsigned char buffer[4];
|
unsigned char buffer[4];
|
||||||
|
|
||||||
lseek(fd,12,SEEK_SET);
|
lseek(fd,12,SEEK_SET);
|
||||||
i=read(fd,name,4);
|
offset=read(fd,name,4);
|
||||||
i=read(fd,buffer,4);
|
if(!isalnum(0xff&name[0])) {
|
||||||
|
name[0]=name[1];
|
||||||
|
name[1]=name[2];
|
||||||
|
name[2]=name[3];
|
||||||
|
offset=read(fd,name+3,1);
|
||||||
|
}
|
||||||
|
offset=read(fd,buffer,4);
|
||||||
if(big_end) {
|
if(big_end) {
|
||||||
*chunk_size=
|
*chunk_size=
|
||||||
buffer[3]+(256*buffer[2])+(65536*buffer[1])+(16777216*buffer[0]);
|
buffer[3]+(256*buffer[2])+(65536*buffer[1])+(16777216*buffer[0]);
|
||||||
@ -2512,13 +2519,23 @@ off_t RDWaveFile::FindChunk(int fd,const char *chunk_name,unsigned *chunk_size,
|
|||||||
*chunk_size=
|
*chunk_size=
|
||||||
buffer[0]+(256*buffer[1])+(65536*buffer[2])+(16777216*buffer[3]);
|
buffer[0]+(256*buffer[1])+(65536*buffer[2])+(16777216*buffer[3]);
|
||||||
}
|
}
|
||||||
while(i==4) {
|
while(offset==4) {
|
||||||
if(strcasecmp(chunk_name,name)==0) {
|
if(strcasecmp(chunk_name,name)==0) {
|
||||||
return lseek(fd,0,SEEK_CUR);
|
return lseek(fd,0,SEEK_CUR);
|
||||||
}
|
}
|
||||||
lseek(fd,*chunk_size,SEEK_CUR);
|
lseek(fd,*chunk_size,SEEK_CUR);
|
||||||
i=read(fd,name,4);
|
offset=read(fd,name,4);
|
||||||
i=read(fd,buffer,4);
|
//
|
||||||
|
// Attempt to work around known fencepost errors in WAV files generated by
|
||||||
|
// "Sonic Studio soundBlade" by "PME Mastering, Inc." (and perhaps others?)
|
||||||
|
//
|
||||||
|
if(!isalnum(0xff&name[0])) {
|
||||||
|
name[0]=name[1];
|
||||||
|
name[1]=name[2];
|
||||||
|
name[2]=name[3];
|
||||||
|
offset=read(fd,name+3,1);
|
||||||
|
}
|
||||||
|
offset=read(fd,buffer,4);
|
||||||
if(big_end) {
|
if(big_end) {
|
||||||
*chunk_size=buffer[3]+(256*buffer[2])+(65536*buffer[1])+
|
*chunk_size=buffer[3]+(256*buffer[2])+(65536*buffer[1])+
|
||||||
(16777216*buffer[0]);
|
(16777216*buffer[0]);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Local RML Macros for the Rivendell's RDAirPlay
|
// Local RML Macros for the Rivendell's RDAirPlay
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2020 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
|
||||||
@ -44,6 +44,8 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
|||||||
int mach=0;
|
int mach=0;
|
||||||
RDLogLine::TransType trans=RDLogLine::Play;
|
RDLogLine::TransType trans=RDLogLine::Play;
|
||||||
int offset=0;
|
int offset=0;
|
||||||
|
bool ok=false;
|
||||||
|
unsigned cart=0;
|
||||||
|
|
||||||
if(rml->role()!=RDMacro::Cmd) {
|
if(rml->role()!=RDMacro::Cmd) {
|
||||||
return;
|
return;
|
||||||
@ -306,7 +308,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
|||||||
(rml->arg(1).toInt()>AIR_PANEL_BUTTON_COLUMNS)||
|
(rml->arg(1).toInt()>AIR_PANEL_BUTTON_COLUMNS)||
|
||||||
(rml->arg(2).toInt()<=0)||
|
(rml->arg(2).toInt()<=0)||
|
||||||
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)||
|
(rml->arg(2).toInt()>AIR_PANEL_BUTTON_ROWS)||
|
||||||
(rml->arg(3).toUInt()>999999)) {
|
(rml->arg(3).toUInt()>RD_MAX_CART_NUMBER)) {
|
||||||
if(rml->echoRequested()) {
|
if(rml->echoRequested()) {
|
||||||
rml->acknowledge(false);
|
rml->acknowledge(false);
|
||||||
rda->ripc()->sendRml(rml);
|
rda->ripc()->sendRml(rml);
|
||||||
@ -792,38 +794,58 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if((rml->arg(0).toInt()<1)||(rml->arg(0).toInt()>3)||
|
mach=rml->arg(0).toInt();
|
||||||
(rml->arg(1).toUInt()>999999)) {
|
cart=cart;
|
||||||
|
offset=0;
|
||||||
|
trans=air_default_trans_type;
|
||||||
|
if((mach<1)||(mach>3)||
|
||||||
|
(rml->arg(1).toUInt()>RD_MAX_CART_NUMBER)) {
|
||||||
if(rml->echoRequested()) {
|
if(rml->echoRequested()) {
|
||||||
rml->acknowledge(false);
|
rml->acknowledge(false);
|
||||||
rda->ripc()->sendRml(rml);
|
rda->ripc()->sendRml(rml);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
offset=0;
|
|
||||||
if(rml->argQuantity()>=3) {
|
if(rml->argQuantity()>=3) {
|
||||||
offset=rml->arg(2).toInt();
|
offset=rml->arg(2).toInt(&ok);
|
||||||
|
if(!ok) {
|
||||||
|
if(rml->echoRequested()) {
|
||||||
|
rml->acknowledge(false);
|
||||||
|
rda->ripc()->sendRml(rml);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
trans=RDLogLine::Play;
|
|
||||||
if(rml->argQuantity()==4) {
|
if(rml->argQuantity()==4) {
|
||||||
|
trans=RDLogLine::NoTrans;
|
||||||
|
if(rml->arg(3).toLower()=="play") {
|
||||||
|
trans=RDLogLine::Play;
|
||||||
|
}
|
||||||
if(rml->arg(3).toLower()=="segue") {
|
if(rml->arg(3).toLower()=="segue") {
|
||||||
trans=RDLogLine::Segue;
|
trans=RDLogLine::Segue;
|
||||||
}
|
}
|
||||||
if(rml->arg(3).toLower()=="stop") {
|
if(rml->arg(3).toLower()=="stop") {
|
||||||
trans=RDLogLine::Stop;
|
trans=RDLogLine::Stop;
|
||||||
}
|
}
|
||||||
|
if(trans==RDLogLine::NoTrans) {
|
||||||
|
if(rml->echoRequested()) {
|
||||||
|
rml->acknowledge(false);
|
||||||
|
rda->ripc()->sendRml(rml);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(air_log[rml->arg(0).toInt()-1]->nextLine()>=0) {
|
if(air_log[mach-1]->nextLine()>=0) {
|
||||||
air_log[rml->arg(0).toInt()-1]->
|
air_log[mach-1]->
|
||||||
insert(air_log[rml->arg(0).toInt()-1]->nextLine()+offset,
|
insert(air_log[mach-1]->nextLine()+offset,
|
||||||
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
|
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
air_log[rml->arg(0).toInt()-1]->
|
air_log[mach-1]->
|
||||||
insert(air_log[rml->arg(0).toInt()-1]->size(),
|
insert(air_log[mach-1]->size(),
|
||||||
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
|
rml->arg(1).toUInt(),RDLogLine::NoTrans,trans);
|
||||||
air_log[rml->arg(0).toInt()-1]->
|
air_log[mach-1]->
|
||||||
makeNext(air_log[rml->arg(0).toInt()-1]->size()-1);
|
makeNext(air_log[mach-1]->size()-1);
|
||||||
}
|
}
|
||||||
if(rml->echoRequested()) {
|
if(rml->echoRequested()) {
|
||||||
rml->acknowledge(true);
|
rml->acknowledge(true);
|
||||||
@ -882,7 +904,7 @@ void MainWidget::RunLocalMacros(RDMacro *rml)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(rml->arg(2).toUInt()>999999) {
|
if(rml->arg(2).toUInt()>RD_MAX_CART_NUMBER) {
|
||||||
if(rml->echoRequested()) {
|
if(rml->echoRequested()) {
|
||||||
rml->acknowledge(false);
|
rml->acknowledge(false);
|
||||||
rda->ripc()->sendRml(rml);
|
rda->ripc()->sendRml(rml);
|
||||||
|
@ -191,6 +191,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
|
|||||||
//
|
//
|
||||||
rdairplay_previous_exit_code=rda->airplayConf()->exitCode();
|
rdairplay_previous_exit_code=rda->airplayConf()->exitCode();
|
||||||
rda->airplayConf()->setExitCode(RDAirPlayConf::ExitDirty);
|
rda->airplayConf()->setExitCode(RDAirPlayConf::ExitDirty);
|
||||||
|
air_default_trans_type=rda->airplayConf()->defaultTransType();
|
||||||
air_clear_filter=rda->airplayConf()->clearFilter();
|
air_clear_filter=rda->airplayConf()->clearFilter();
|
||||||
air_bar_action=rda->airplayConf()->barAction();
|
air_bar_action=rda->airplayConf()->barAction();
|
||||||
air_op_mode_style=rda->airplayConf()->opModeStyle();
|
air_op_mode_style=rda->airplayConf()->opModeStyle();
|
||||||
|
@ -161,6 +161,7 @@ class MainWidget : public RDWidget
|
|||||||
int air_meter_port[3];
|
int air_meter_port[3];
|
||||||
int air_cue_card;
|
int air_cue_card;
|
||||||
int air_cue_port;
|
int air_cue_port;
|
||||||
|
RDLogLine::TransType air_default_trans_type;
|
||||||
RDInstanceLock *air_lock;
|
RDInstanceLock *air_lock;
|
||||||
bool air_clear_filter;
|
bool air_clear_filter;
|
||||||
RDAirPlayConf::BarAction air_bar_action;
|
RDAirPlayConf::BarAction air_bar_action;
|
||||||
|
@ -309,7 +309,9 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
20);
|
20);
|
||||||
event_firsttrans_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
event_firsttrans_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||||
event_firsttrans_box=new QComboBox(this);
|
event_firsttrans_box=new QComboBox(this);
|
||||||
event_firsttrans_box->setGeometry(event_firsttrans_label->geometry().x()+event_firsttrans_label->geometry().width(),134,90,20);
|
event_firsttrans_box->setGeometry(event_firsttrans_label->geometry().x()+
|
||||||
|
event_firsttrans_label->geometry().width(),
|
||||||
|
134,90,20);
|
||||||
event_firsttrans_box->insertItem(tr("Play"));
|
event_firsttrans_box->insertItem(tr("Play"));
|
||||||
event_firsttrans_box->insertItem(tr("Segue"));
|
event_firsttrans_box->insertItem(tr("Segue"));
|
||||||
event_firsttrans_box->insertItem(tr("Stop"));
|
event_firsttrans_box->insertItem(tr("Stop"));
|
||||||
@ -436,8 +438,8 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
event_preimport_list->setItemMargin(5);
|
event_preimport_list->setItemMargin(5);
|
||||||
event_preimport_list->load(event_name,RDEventImportList::PreImport);
|
event_preimport_list->load(event_name,RDEventImportList::PreImport);
|
||||||
event_preimport_list->setSortColumn(-1);
|
event_preimport_list->setSortColumn(-1);
|
||||||
connect(event_preimport_list,SIGNAL(sizeChanged(int)),
|
connect(event_preimport_list,SIGNAL(validationNeeded()),
|
||||||
this,SLOT(preimportChangedData(int)));
|
this,SLOT(validate()));
|
||||||
event_preimport_list->addColumn("");
|
event_preimport_list->addColumn("");
|
||||||
event_preimport_list->addColumn(tr("Cart"));
|
event_preimport_list->addColumn(tr("Cart"));
|
||||||
event_preimport_list->addColumn(tr("Group"));
|
event_preimport_list->addColumn(tr("Group"));
|
||||||
@ -461,7 +463,7 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
this,SLOT(preimportDownData()));
|
this,SLOT(preimportDownData()));
|
||||||
|
|
||||||
//
|
//
|
||||||
// Import Section
|
// Imports
|
||||||
//
|
//
|
||||||
label=new QLabel(tr("IMPORT"),this);
|
label=new QLabel(tr("IMPORT"),this);
|
||||||
label->setFont(labelFont());
|
label->setFont(labelFont());
|
||||||
@ -657,7 +659,6 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
event_postimport_list->setAllColumnsShowFocus(true);
|
event_postimport_list->setAllColumnsShowFocus(true);
|
||||||
event_postimport_list->setItemMargin(5);
|
event_postimport_list->setItemMargin(5);
|
||||||
event_postimport_list->setSortColumn(-1);
|
event_postimport_list->setSortColumn(-1);
|
||||||
event_postimport_list->setAllowStop(false);
|
|
||||||
event_postimport_list->load(event_name,RDEventImportList::PostImport);
|
event_postimport_list->load(event_name,RDEventImportList::PostImport);
|
||||||
event_postimport_list->addColumn("");
|
event_postimport_list->addColumn("");
|
||||||
event_postimport_list->addColumn(tr("Cart"));
|
event_postimport_list->addColumn(tr("Cart"));
|
||||||
@ -671,6 +672,8 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
this,SLOT(cartClickedData(Q3ListViewItem *)));
|
this,SLOT(cartClickedData(Q3ListViewItem *)));
|
||||||
connect(event_postimport_list,SIGNAL(lengthChanged(int)),
|
connect(event_postimport_list,SIGNAL(lengthChanged(int)),
|
||||||
this,SLOT(postimportLengthChangedData(int)));
|
this,SLOT(postimportLengthChangedData(int)));
|
||||||
|
connect(event_postimport_list,SIGNAL(validationNeeded()),
|
||||||
|
this,SLOT(validate()));
|
||||||
event_postimport_up_button=
|
event_postimport_up_button=
|
||||||
new RDTransportButton(RDTransportButton::Up,this);
|
new RDTransportButton(RDTransportButton::Up,this);
|
||||||
event_postimport_up_button->setGeometry(sizeHint().width()-50,532-3,40,40);
|
event_postimport_up_button->setGeometry(sizeHint().width()-50,532-3,40,40);
|
||||||
@ -767,8 +770,6 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
|
|
||||||
case RDLogLine::Hard:
|
case RDLogLine::Hard:
|
||||||
event_timetype_check->setChecked(true);
|
event_timetype_check->setChecked(true);
|
||||||
// event_post_box->setChecked(event_event->postPoint());
|
|
||||||
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
|
||||||
switch((grace=event_event->graceTime())) {
|
switch((grace=event_event->graceTime())) {
|
||||||
case 0:
|
case 0:
|
||||||
event_grace_group->button(0)->setChecked(true);
|
event_grace_group->button(0)->setChecked(true);
|
||||||
@ -801,7 +802,31 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
event_source_group->button(event_event->importSource())->setChecked(true);
|
event_source_group->button(event_event->importSource())->setChecked(true);
|
||||||
event_startslop_edit->setTime(QTime().addMSecs(event_event->startSlop()));
|
event_startslop_edit->setTime(QTime().addMSecs(event_event->startSlop()));
|
||||||
event_endslop_edit->setTime(QTime().addMSecs(event_event->endSlop()));
|
event_endslop_edit->setTime(QTime().addMSecs(event_event->endSlop()));
|
||||||
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
if(event_position_box->isChecked()||event_timetype_check->isChecked()) {
|
||||||
|
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(event_preimport_list->eventImportList()->size()>=2) {
|
||||||
|
event_firsttrans_box->
|
||||||
|
setCurrentItem(event_preimport_list->eventImportList()->
|
||||||
|
item(0)->transType());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(event_event->importSource()!=RDEventLine::None) {
|
||||||
|
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(event_postimport_list->eventImportList()->size()>=1) {
|
||||||
|
event_firsttrans_box->
|
||||||
|
setCurrentItem(event_postimport_list->eventImportList()->
|
||||||
|
item(0)->transType());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
event_defaulttrans_box->setCurrentItem(event_event->defaultTransType());
|
event_defaulttrans_box->setCurrentItem(event_event->defaultTransType());
|
||||||
if(!event_event->schedGroup().isEmpty()) {
|
if(!event_event->schedGroup().isEmpty()) {
|
||||||
event_sched_group_box->setCurrentText(event_event->schedGroup());
|
event_sched_group_box->setCurrentText(event_event->schedGroup());
|
||||||
@ -833,8 +858,8 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
|||||||
prepositionToggledData(event_position_box->isChecked());
|
prepositionToggledData(event_position_box->isChecked());
|
||||||
timeToggledData(event_timetype_check->isChecked());
|
timeToggledData(event_timetype_check->isChecked());
|
||||||
importClickedData(event_source_group->checkedId());
|
importClickedData(event_source_group->checkedId());
|
||||||
preimportChangedData(event_preimport_list->childCount());
|
event_postimport_list->refreshList();
|
||||||
SetPostTransition();
|
validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -939,21 +964,7 @@ void EditEvent::prepositionToggledData(bool state)
|
|||||||
//
|
//
|
||||||
// CART STACK Section
|
// CART STACK Section
|
||||||
//
|
//
|
||||||
if(state) {
|
|
||||||
event_preimport_list->setForceTrans(RDLogLine::Stop);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(event_timetype_check->isChecked()) {
|
|
||||||
event_preimport_list->
|
|
||||||
setForceTrans((RDLogLine::TransType)event_firsttrans_box->
|
|
||||||
currentItem());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event_preimport_list->setForceTrans(RDLogLine::NoTrans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
event_preimport_list->refreshList();
|
event_preimport_list->refreshList();
|
||||||
SetPostTransition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -964,18 +975,6 @@ void EditEvent::timeToggledData(bool state)
|
|||||||
event_next_button->setEnabled(state);
|
event_next_button->setEnabled(state);
|
||||||
event_wait_button->setEnabled(state);
|
event_wait_button->setEnabled(state);
|
||||||
event_grace_edit->setEnabled(state);
|
event_grace_edit->setEnabled(state);
|
||||||
if(state) {
|
|
||||||
event_preimport_list->
|
|
||||||
setForceTrans((RDLogLine::TransType)event_firsttrans_box->currentItem());
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(event_position_box->isChecked()) {
|
|
||||||
event_preimport_list->setForceTrans(RDLogLine::Stop);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event_preimport_list->setForceTrans(RDLogLine::NoTrans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
event_preimport_list->refreshList();
|
event_preimport_list->refreshList();
|
||||||
if(state) {
|
if(state) {
|
||||||
graceClickedData(event_grace_group->checkedId());
|
graceClickedData(event_grace_group->checkedId());
|
||||||
@ -1000,7 +999,6 @@ void EditEvent::timeToggledData(bool state)
|
|||||||
(event_preimport_list->childCount()==0)) {
|
(event_preimport_list->childCount()==0)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SetPostTransition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1022,16 +1020,12 @@ void EditEvent::graceClickedData(int id)
|
|||||||
event_grace_edit->setEnabled(true);
|
event_grace_edit->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetPostTransition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::timeTransitionData(int id)
|
void EditEvent::timeTransitionData(int id)
|
||||||
{
|
{
|
||||||
event_preimport_list->
|
|
||||||
setForceTrans((RDLogLine::TransType)event_firsttrans_box->currentItem());
|
|
||||||
event_preimport_list->refreshList();
|
event_preimport_list->refreshList();
|
||||||
SetPostTransition();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1081,7 +1075,6 @@ void EditEvent::importClickedData(int id)
|
|||||||
state=(id==2)&&state;
|
state=(id==2)&&state;
|
||||||
event_nestevent_label->setEnabled(state);
|
event_nestevent_label->setEnabled(state);
|
||||||
event_nestevent_box->setEnabled(state);
|
event_nestevent_box->setEnabled(state);
|
||||||
SetPostTransition();
|
|
||||||
event_sched_group_box->setEnabled(stateschedinv);
|
event_sched_group_box->setEnabled(stateschedinv);
|
||||||
event_artist_sep_label->setEnabled(stateschedinv);
|
event_artist_sep_label->setEnabled(stateschedinv);
|
||||||
event_artist_sep_spinbox->setEnabled(stateschedinv);
|
event_artist_sep_spinbox->setEnabled(stateschedinv);
|
||||||
@ -1096,12 +1089,6 @@ void EditEvent::importClickedData(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::preimportChangedData(int size)
|
|
||||||
{
|
|
||||||
SetPostTransition();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::preimportLengthChangedData(int msecs)
|
void EditEvent::preimportLengthChangedData(int msecs)
|
||||||
{
|
{
|
||||||
event_preimport_length_edit->setText(RDGetTimeLength(msecs,true,false));
|
event_preimport_length_edit->setText(RDGetTimeLength(msecs,true,false));
|
||||||
@ -1121,7 +1108,6 @@ void EditEvent::preimportUpData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event_preimport_list->move(line,line-1);
|
event_preimport_list->move(line,line-1);
|
||||||
event_preimport_list->validateTransitions();
|
|
||||||
event_preimport_list->refreshList(line-1);
|
event_preimport_list->refreshList(line-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1139,7 +1125,6 @@ void EditEvent::preimportDownData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event_preimport_list->move(line,line+1);
|
event_preimport_list->move(line,line+1);
|
||||||
event_preimport_list->validateTransitions();
|
|
||||||
event_preimport_list->refreshList(line+1);
|
event_preimport_list->refreshList(line+1);
|
||||||
event_preimport_list->ensureItemVisible(item);
|
event_preimport_list->ensureItemVisible(item);
|
||||||
}
|
}
|
||||||
@ -1158,7 +1143,6 @@ void EditEvent::postimportUpData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event_postimport_list->move(line,line-1);
|
event_postimport_list->move(line,line-1);
|
||||||
event_postimport_list->validateTransitions();
|
|
||||||
event_postimport_list->refreshList(line-1);
|
event_postimport_list->refreshList(line-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1176,7 +1160,6 @@ void EditEvent::postimportDownData()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
event_postimport_list->move(line,line+1);
|
event_postimport_list->move(line,line+1);
|
||||||
event_postimport_list->validateTransitions();
|
|
||||||
event_postimport_list->refreshList(line+1);
|
event_postimport_list->refreshList(line+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1230,7 +1213,8 @@ void EditEvent::saveAsData()
|
|||||||
if(event_new_event) {
|
if(event_new_event) {
|
||||||
AbandonEvent(old_name);
|
AbandonEvent(old_name);
|
||||||
}
|
}
|
||||||
setCaption("RDLogManager - "+tr("Editing Event")+" - "+event_event->name());
|
setWindowTitle("RDLogManager - "+tr("Editing Event")+" - "+
|
||||||
|
event_event->name());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(QMessageBox::question(this,tr("RDLogManager"),
|
if(QMessageBox::question(this,tr("RDLogManager"),
|
||||||
@ -1275,6 +1259,62 @@ void EditEvent::colorData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EditEvent::validate()
|
||||||
|
{
|
||||||
|
RDEventImportList *pre_list=event_preimport_list->eventImportList();
|
||||||
|
RDEventImportList *post_list=event_postimport_list->eventImportList();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Pre-Position Log
|
||||||
|
//
|
||||||
|
if(event_position_box->isChecked()) {
|
||||||
|
event_firsttrans_box->setCurrentIndex((int)RDLogLine::Stop);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Pre-Position Log / Timed Start
|
||||||
|
//
|
||||||
|
if(event_position_box->isChecked()||event_timetype_check->isChecked()) {
|
||||||
|
if(pre_list->size()>=2) {
|
||||||
|
pre_list->item(0)->
|
||||||
|
setTransType((RDLogLine::TransType)event_firsttrans_box->
|
||||||
|
currentIndex());
|
||||||
|
event_postimport_list->setAllowFirstTrans(true);
|
||||||
|
if(post_list->size()>=2) {
|
||||||
|
if(post_list->item(0)->transType()==RDLogLine::Stop) {
|
||||||
|
post_list->item(0)->setTransType(RDLogLine::Play);
|
||||||
|
event_postimport_list->refreshList(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
event_postimport_list->setAllowFirstTrans(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
event_postimport_list->setAllowFirstTrans(pre_list->size()>=2);
|
||||||
|
if(pre_list->size()>=2) {
|
||||||
|
if(post_list->size()>=2) {
|
||||||
|
if(post_list->item(0)->transType()==RDLogLine::Stop) {
|
||||||
|
post_list->item(0)->setTransType(RDLogLine::Play);
|
||||||
|
event_postimport_list->refreshList(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Fixup added list members
|
||||||
|
//
|
||||||
|
event_preimport_list->
|
||||||
|
fixupTransitions((RDLogLine::TransType)event_firsttrans_box->
|
||||||
|
currentIndex());
|
||||||
|
event_postimport_list->
|
||||||
|
fixupTransitions((RDLogLine::TransType)event_firsttrans_box->
|
||||||
|
currentIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::okData()
|
void EditEvent::okData()
|
||||||
{
|
{
|
||||||
Save();
|
Save();
|
||||||
@ -1387,43 +1427,6 @@ void EditEvent::RefreshLibrary()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::SetPostTransition()
|
|
||||||
{
|
|
||||||
if((event_position_box->isChecked())||
|
|
||||||
(event_timetype_check->isChecked())||
|
|
||||||
(event_preimport_list->childCount()!=0)||
|
|
||||||
(event_source_group->checkedId()!=0)) {
|
|
||||||
event_postimport_list->setAllowStop(false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event_postimport_list->setAllowStop(true);
|
|
||||||
}
|
|
||||||
if(event_preimport_list->childCount()==0) {
|
|
||||||
if(event_position_box->isChecked()) {
|
|
||||||
event_postimport_list->setAllowFirstTrans(false);
|
|
||||||
event_postimport_list->setForceTrans(RDLogLine::Stop);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(event_timetype_check->isChecked()) {
|
|
||||||
event_postimport_list->
|
|
||||||
setForceTrans((RDLogLine::TransType)event_firsttrans_box->
|
|
||||||
currentItem());
|
|
||||||
event_postimport_list->setAllowFirstTrans(false);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event_postimport_list->setAllowFirstTrans(true);
|
|
||||||
event_postimport_list->setForceTrans(RDLogLine::NoTrans);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
event_postimport_list->setAllowFirstTrans(true);
|
|
||||||
event_postimport_list->setForceTrans(RDLogLine::NoTrans);
|
|
||||||
}
|
|
||||||
event_postimport_list->refreshList();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void EditEvent::Save()
|
void EditEvent::Save()
|
||||||
{
|
{
|
||||||
QString properties;
|
QString properties;
|
||||||
@ -1437,7 +1440,6 @@ void EditEvent::Save()
|
|||||||
}
|
}
|
||||||
if(event_timetype_check->isChecked()) {
|
if(event_timetype_check->isChecked()) {
|
||||||
event_event->setTimeType(RDLogLine::Hard);
|
event_event->setTimeType(RDLogLine::Hard);
|
||||||
// event_event->setPostPoint(event_post_box->isChecked());
|
|
||||||
event_event->setFirstTransType((RDLogLine::TransType)
|
event_event->setFirstTransType((RDLogLine::TransType)
|
||||||
event_firsttrans_box->currentItem());
|
event_firsttrans_box->currentItem());
|
||||||
switch(event_grace_group->checkedId()) {
|
switch(event_grace_group->checkedId()) {
|
||||||
@ -1457,7 +1459,6 @@ void EditEvent::Save()
|
|||||||
else {
|
else {
|
||||||
event_event->setTimeType(RDLogLine::Relative);
|
event_event->setTimeType(RDLogLine::Relative);
|
||||||
event_event->setGraceTime(0);
|
event_event->setGraceTime(0);
|
||||||
// event_event->setPostPoint(false);
|
|
||||||
event_event->setFirstTransType(RDLogLine::Play);
|
event_event->setFirstTransType(RDLogLine::Play);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1517,9 +1518,11 @@ void EditEvent::Save()
|
|||||||
}
|
}
|
||||||
|
|
||||||
event_preimport_list->setEventName(event_name);
|
event_preimport_list->setEventName(event_name);
|
||||||
event_preimport_list->save();
|
event_preimport_list->
|
||||||
|
save((RDLogLine::TransType)event_firsttrans_box->currentIndex());
|
||||||
event_postimport_list->setEventName(event_name);
|
event_postimport_list->setEventName(event_name);
|
||||||
event_postimport_list->save();
|
event_postimport_list->
|
||||||
|
save((RDLogLine::TransType)event_firsttrans_box->currentIndex());
|
||||||
|
|
||||||
event_saved=true;
|
event_saved=true;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,6 @@ class EditEvent : public RDDialog
|
|||||||
void autofillToggledData(bool);
|
void autofillToggledData(bool);
|
||||||
void autofillWarnToggledData(bool);
|
void autofillWarnToggledData(bool);
|
||||||
void importClickedData(int);
|
void importClickedData(int);
|
||||||
void preimportChangedData(int size);
|
|
||||||
void preimportLengthChangedData(int msecs);
|
void preimportLengthChangedData(int msecs);
|
||||||
void preimportUpData();
|
void preimportUpData();
|
||||||
void preimportDownData();
|
void preimportDownData();
|
||||||
@ -81,6 +80,7 @@ class EditEvent : public RDDialog
|
|||||||
void saveAsData();
|
void saveAsData();
|
||||||
void svcData();
|
void svcData();
|
||||||
void colorData();
|
void colorData();
|
||||||
|
void validate();
|
||||||
void okData();
|
void okData();
|
||||||
void cancelData();
|
void cancelData();
|
||||||
|
|
||||||
@ -90,7 +90,6 @@ class EditEvent : public RDDialog
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void RefreshLibrary();
|
void RefreshLibrary();
|
||||||
void SetPostTransition();
|
|
||||||
void Save();
|
void Save();
|
||||||
void CopyEventPerms(QString old_name,QString new_name);
|
void CopyEventPerms(QString old_name,QString new_name);
|
||||||
void AbandonEvent(QString name);
|
void AbandonEvent(QString name);
|
||||||
|
@ -39,6 +39,17 @@
|
|||||||
#include "../icons/mic16.xpm"
|
#include "../icons/mic16.xpm"
|
||||||
#include "../icons/notemarker.xpm"
|
#include "../icons/notemarker.xpm"
|
||||||
|
|
||||||
|
//
|
||||||
|
// Menu Items
|
||||||
|
//
|
||||||
|
#define MENU_INSERT_NOTE 0
|
||||||
|
#define MENU_EDIT_NOTE 1
|
||||||
|
#define MENU_INSERT_TRACK 2
|
||||||
|
#define MENU_EDIT_TRACK 3
|
||||||
|
#define MENU_PLAY_TRANS 4
|
||||||
|
#define MENU_SEGUE_TRANS 5
|
||||||
|
#define MENU_DELETE 6
|
||||||
|
|
||||||
ImportListView::ImportListView(QWidget *parent)
|
ImportListView::ImportListView(QWidget *parent)
|
||||||
: Q3ListView(parent)
|
: Q3ListView(parent)
|
||||||
{
|
{
|
||||||
@ -60,50 +71,57 @@ ImportListView::ImportListView(QWidget *parent)
|
|||||||
//
|
//
|
||||||
// Right Button Menu
|
// Right Button Menu
|
||||||
//
|
//
|
||||||
import_menu=new Q3PopupMenu(this);
|
import_menu=new QMenu(this);
|
||||||
connect(import_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
|
connect(import_menu,SIGNAL(aboutToShow()),this,SLOT(aboutToShowData()));
|
||||||
import_menu->
|
import_menu->insertItem(tr("Insert Log Note"),this,SLOT(insertNoteMenuData()),
|
||||||
insertItem(tr("Insert Log Note"),this,SLOT(insertNoteMenuData()),0,0);
|
0,MENU_INSERT_NOTE);
|
||||||
import_menu->
|
import_menu->insertItem(tr("Edit Log Note"),this,SLOT(editNoteMenuData()),
|
||||||
insertItem(tr("Edit Log Note"),this,SLOT(editNoteMenuData()),0,1);
|
0,MENU_EDIT_NOTE);
|
||||||
import_menu->insertSeparator();
|
import_menu->insertSeparator();
|
||||||
import_menu->
|
import_menu->insertItem(tr("Insert Voice Track"),
|
||||||
insertItem(tr("Insert Voice Track"),this,SLOT(insertTrackMenuData()),0,2);
|
this,SLOT(insertTrackMenuData()),
|
||||||
import_menu->
|
0,MENU_INSERT_TRACK);
|
||||||
insertItem(tr("Edit Voice Track"),this,SLOT(editTrackMenuData()),0,3);
|
import_menu->insertItem(tr("Edit Voice Track"),this,SLOT(editTrackMenuData()),
|
||||||
|
0,MENU_EDIT_TRACK);
|
||||||
import_menu->insertSeparator();
|
import_menu->insertSeparator();
|
||||||
import_menu->insertItem(tr("PLAY Transition"),this,SLOT(playMenuData()),0,4);
|
import_menu->insertItem(tr("PLAY Transition"),this,SLOT(playMenuData()),
|
||||||
import_menu->
|
0,MENU_PLAY_TRANS);
|
||||||
insertItem(tr("SEGUE Transition"),this,SLOT(segueMenuData()),0,5);
|
import_menu->insertItem(tr("SEGUE Transition"),this,SLOT(segueMenuData()),
|
||||||
import_menu->insertItem(tr("STOP Transition"),this,SLOT(stopMenuData()),0,6);
|
0,MENU_SEGUE_TRANS);
|
||||||
import_menu->insertSeparator();
|
import_menu->insertSeparator();
|
||||||
import_menu->
|
import_menu->insertItem(tr("Delete"),this,SLOT(deleteMenuData()),
|
||||||
insertItem(tr("Delete"),this,SLOT(deleteMenuData()),0,8);
|
0,MENU_DELETE);
|
||||||
|
|
||||||
import_force_trans=RDLogLine::NoTrans;
|
|
||||||
import_allow_stop=true;
|
|
||||||
import_allow_first_trans=true;
|
import_allow_first_trans=true;
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImportListView::setForceTrans(RDLogLine::TransType trans)
|
RDEventImportList *ImportListView::eventImportList() const
|
||||||
{
|
{
|
||||||
import_force_trans=trans;
|
return import_list;
|
||||||
validateTransitions();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ImportListView::setAllowStop(bool state)
|
|
||||||
{
|
|
||||||
import_allow_stop=state;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImportListView::setAllowFirstTrans(bool state)
|
void ImportListView::setAllowFirstTrans(bool state)
|
||||||
{
|
{
|
||||||
import_allow_first_trans=state;
|
Q3ListViewItem *item=NULL;
|
||||||
|
RDEventImportItem *i_item=NULL;
|
||||||
|
|
||||||
|
if(state!=import_allow_first_trans) {
|
||||||
|
if(childCount()>=2) {
|
||||||
|
if((item=firstChild())!=NULL) {
|
||||||
|
if(!state) {
|
||||||
|
item->setText(5,tr("[auto]"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if((i_item=import_list->item(0))!=NULL) {
|
||||||
|
item->setText(5,RDLogLine::transText(i_item->transType()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
import_allow_first_trans=state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -129,9 +147,14 @@ bool ImportListView::load(const QString &event_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImportListView::save()
|
void ImportListView::save(RDLogLine::TransType first_trans)
|
||||||
{
|
{
|
||||||
import_list->save();
|
if(import_allow_first_trans) {
|
||||||
|
import_list->save(RDLogLine::NoTrans);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
import_list->save(first_trans);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -190,21 +213,11 @@ void ImportListView::refreshList(int line)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
switch(i_item->transType()) {
|
if((i==0)&&(!import_allow_first_trans)) {
|
||||||
case RDLogLine::Play:
|
item->setText(5,tr("[auto]"));
|
||||||
item->setText(5,tr("PLAY"));
|
}
|
||||||
break;
|
else {
|
||||||
|
item->setText(5,RDLogLine::transText(i_item->transType()));
|
||||||
case RDLogLine::Segue:
|
|
||||||
item->setText(5,tr("SEGUE"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RDLogLine::Stop:
|
|
||||||
item->setText(5,tr("STOP"));
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
item->setText(6,QString().sprintf("%d",i));
|
item->setText(6,QString().sprintf("%d",i));
|
||||||
if(cart!=NULL) {
|
if(cart!=NULL) {
|
||||||
@ -225,22 +238,18 @@ void ImportListView::refreshList(int line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImportListView::validateTransitions()
|
void ImportListView::fixupTransitions(RDLogLine::TransType repl_trans)
|
||||||
{
|
{
|
||||||
if(import_list->size()>=1) {
|
Q3ListViewItem *item=firstChild();
|
||||||
if(import_force_trans!=RDLogLine::NoTrans) {
|
|
||||||
import_list->item(0)->setTransType(import_force_trans);
|
if(repl_trans==RDLogLine::Stop) {
|
||||||
}
|
repl_trans=RDLogLine::RDLogLine::Segue;
|
||||||
else {
|
|
||||||
if((import_list->item(0)->transType()==RDLogLine::Stop)&&
|
|
||||||
(!import_allow_stop)) {
|
|
||||||
import_list->item(0)->setTransType(RDLogLine::Segue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for(int i=1;i<(import_list->size()-1);i++) {
|
for(int i=0;i<import_list->size();i++) {
|
||||||
if(import_list->item(i)->transType()==RDLogLine::Stop) {
|
if(import_list->item(i)->transType()==RDLogLine::NoTrans) {
|
||||||
import_list->item(1)->setTransType(RDLogLine::Segue);
|
import_list->item(i)->setTransType(repl_trans);
|
||||||
|
item->setText(5,RDLogLine::transText(repl_trans));
|
||||||
|
item=item->nextSibling();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,77 +258,60 @@ void ImportListView::validateTransitions()
|
|||||||
void ImportListView::aboutToShowData()
|
void ImportListView::aboutToShowData()
|
||||||
{
|
{
|
||||||
if((import_menu_item==NULL)||(import_menu_i_item->isEndMarker())) {
|
if((import_menu_item==NULL)||(import_menu_i_item->isEndMarker())) {
|
||||||
import_menu->setItemEnabled(0,true);
|
import_menu->setItemEnabled(MENU_INSERT_NOTE,true);
|
||||||
import_menu->setItemEnabled(1,false);
|
import_menu->setItemEnabled(MENU_EDIT_NOTE,false);
|
||||||
import_menu->setItemEnabled(2,true);
|
import_menu->setItemEnabled(MENU_INSERT_TRACK,true);
|
||||||
import_menu->setItemEnabled(3,false);
|
import_menu->setItemEnabled(MENU_EDIT_TRACK,false);
|
||||||
import_menu->setItemChecked(4,false);
|
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||||
import_menu->setItemEnabled(4,false);
|
import_menu->setItemEnabled(MENU_PLAY_TRANS,false);
|
||||||
import_menu->setItemChecked(5,false);
|
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||||
import_menu->setItemEnabled(5,false);
|
import_menu->setItemEnabled(MENU_SEGUE_TRANS,false);
|
||||||
import_menu->setItemChecked(6,false);
|
import_menu->setItemEnabled(MENU_DELETE,false);
|
||||||
import_menu->setItemEnabled(6,false);
|
|
||||||
import_menu->setItemChecked(7,false);
|
|
||||||
import_menu->setItemEnabled(7,false);
|
|
||||||
import_menu->setItemEnabled(8,false);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(import_menu_i_item->eventType()==RDLogLine::Marker) {
|
if(import_menu_i_item->eventType()==RDLogLine::Marker) {
|
||||||
import_menu->setItemEnabled(1,true);
|
import_menu->setItemEnabled(MENU_EDIT_NOTE,true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
import_menu->setItemEnabled(1,false);
|
import_menu->setItemEnabled(MENU_EDIT_NOTE,false);
|
||||||
}
|
}
|
||||||
if(import_menu_i_item->eventType()==RDLogLine::Track) {
|
if(import_menu_i_item->eventType()==RDLogLine::Track) {
|
||||||
import_menu->setItemEnabled(3,true);
|
import_menu->setItemEnabled(MENU_EDIT_TRACK,true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
import_menu->setItemEnabled(3,false);
|
import_menu->setItemEnabled(MENU_EDIT_TRACK,false);
|
||||||
}
|
}
|
||||||
import_menu->setItemChecked(4,false);
|
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||||
import_menu->setItemChecked(5,false);
|
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||||
import_menu->setItemChecked(6,false);
|
|
||||||
import_menu->setItemChecked(7,false);
|
|
||||||
if(import_menu_line==0) {
|
if(import_menu_line==0) {
|
||||||
import_menu->setItemEnabled(4,import_allow_first_trans);
|
import_menu->setItemEnabled(MENU_PLAY_TRANS,import_allow_first_trans);
|
||||||
import_menu->setItemEnabled(5,import_allow_first_trans);
|
import_menu->setItemEnabled(MENU_SEGUE_TRANS,import_allow_first_trans);
|
||||||
import_menu->setItemEnabled(7,import_allow_first_trans);
|
|
||||||
if((import_menu_line==0)&&import_allow_stop&&import_allow_first_trans) {
|
|
||||||
import_menu->setItemEnabled(6,true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
import_menu->setItemEnabled(6,false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
import_menu->setItemEnabled(4,true);
|
import_menu->setItemEnabled(MENU_PLAY_TRANS,true);
|
||||||
import_menu->setItemEnabled(5,true);
|
import_menu->setItemEnabled(MENU_SEGUE_TRANS,true);
|
||||||
import_menu->setItemEnabled(7,true);
|
import_menu->setItemEnabled(MENU_DELETE,true);
|
||||||
if((import_menu_line==0)&&import_allow_stop) {
|
|
||||||
import_menu->setItemEnabled(6,true);
|
|
||||||
import_menu->setItemEnabled(6,true);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
import_menu->setItemEnabled(6,false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
switch(import_menu_i_item->transType()) {
|
switch(import_menu_i_item->transType()) {
|
||||||
case RDLogLine::Play:
|
case RDLogLine::Play:
|
||||||
import_menu->setItemChecked(4,true);
|
import_menu->setItemChecked(MENU_PLAY_TRANS,true);
|
||||||
|
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDLogLine::Segue:
|
case RDLogLine::Segue:
|
||||||
import_menu->setItemChecked(5,true);
|
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||||
|
import_menu->setItemChecked(MENU_SEGUE_TRANS,true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RDLogLine::Stop:
|
case RDLogLine::Stop:
|
||||||
import_menu->setItemChecked(6,true);
|
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||||
|
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
import_menu->setItemEnabled(8,true);
|
import_menu->setItemEnabled(MENU_DELETE,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -343,9 +335,9 @@ void ImportListView::insertNoteMenuData()
|
|||||||
RDEventImportItem *i_item=new RDEventImportItem();
|
RDEventImportItem *i_item=new RDEventImportItem();
|
||||||
i_item->setEventType(RDLogLine::Marker);
|
i_item->setEventType(RDLogLine::Marker);
|
||||||
i_item->setMarkerComment(note);
|
i_item->setMarkerComment(note);
|
||||||
i_item->setTransType(RDLogLine::Segue);
|
i_item->setTransType(RDLogLine::NoTrans);
|
||||||
import_list->takeItem(import_menu_line,i_item);
|
import_list->takeItem(import_menu_line,i_item);
|
||||||
validateTransitions();
|
emit validationNeeded();
|
||||||
refreshList(import_menu_line);
|
refreshList(import_menu_line);
|
||||||
emit sizeChanged(childCount());
|
emit sizeChanged(childCount());
|
||||||
}
|
}
|
||||||
@ -383,9 +375,9 @@ void ImportListView::insertTrackMenuData()
|
|||||||
RDEventImportItem *i_item=new RDEventImportItem();
|
RDEventImportItem *i_item=new RDEventImportItem();
|
||||||
i_item->setEventType(RDLogLine::Track);
|
i_item->setEventType(RDLogLine::Track);
|
||||||
i_item->setMarkerComment(note);
|
i_item->setMarkerComment(note);
|
||||||
i_item->setTransType(RDLogLine::Segue);
|
i_item->setTransType(RDLogLine::NoTrans);
|
||||||
import_list->takeItem(import_menu_line,i_item);
|
import_list->takeItem(import_menu_line,i_item);
|
||||||
validateTransitions();
|
emit validationNeeded();
|
||||||
refreshList(import_menu_line);
|
refreshList(import_menu_line);
|
||||||
emit sizeChanged(childCount());
|
emit sizeChanged(childCount());
|
||||||
}
|
}
|
||||||
@ -427,7 +419,7 @@ void ImportListView::stopMenuData()
|
|||||||
void ImportListView::deleteMenuData()
|
void ImportListView::deleteMenuData()
|
||||||
{
|
{
|
||||||
import_list->removeItem(import_menu_item->text(6).toInt());
|
import_list->removeItem(import_menu_item->text(6).toInt());
|
||||||
validateTransitions();
|
emit validationNeeded();
|
||||||
refreshList();
|
refreshList();
|
||||||
emit sizeChanged(childCount());
|
emit sizeChanged(childCount());
|
||||||
}
|
}
|
||||||
@ -525,12 +517,12 @@ void ImportListView::dropEvent(QDropEvent *e)
|
|||||||
else {
|
else {
|
||||||
i_item->setEventType(RDLogLine::Macro);
|
i_item->setEventType(RDLogLine::Macro);
|
||||||
}
|
}
|
||||||
i_item->setTransType(RDLogLine::Segue);
|
i_item->setTransType(RDLogLine::NoTrans);
|
||||||
import_list->takeItem(line,i_item);
|
import_list->takeItem(line,i_item);
|
||||||
delete cart;
|
delete cart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
validateTransitions();
|
emit validationNeeded();
|
||||||
refreshList(line);
|
refreshList(line);
|
||||||
emit sizeChanged(childCount());
|
emit sizeChanged(childCount());
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// The Import Carts ListView widget for RDLogManager.
|
// The Import Carts ListView widget for RDLogManager.
|
||||||
//
|
//
|
||||||
// (C) Copyright 2002-2018 Fred Gleason <fredg@paravelsystems.com>
|
// (C) Copyright 2002-2020 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
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <q3listview.h>
|
#include <q3listview.h>
|
||||||
#include <qpixmap.h>
|
#include <qpixmap.h>
|
||||||
#include <q3popupmenu.h>
|
#include <qmenu.h>
|
||||||
|
|
||||||
#include <rdeventimportlist.h>
|
#include <rdeventimportlist.h>
|
||||||
|
|
||||||
@ -33,19 +33,19 @@ class ImportListView : public Q3ListView
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ImportListView(QWidget *parent);
|
ImportListView(QWidget *parent);
|
||||||
void setForceTrans(RDLogLine::TransType trans);
|
RDEventImportList *eventImportList() const;
|
||||||
void setAllowStop(bool state);
|
|
||||||
void setAllowFirstTrans(bool state);
|
void setAllowFirstTrans(bool state);
|
||||||
void move(int from_line,int to_line);
|
void move(int from_line,int to_line);
|
||||||
void setEventName(const QString &str);
|
void setEventName(const QString &str);
|
||||||
bool load(const QString &event_name,RDEventImportList::ImportType type);
|
bool load(const QString &event_name,RDEventImportList::ImportType type);
|
||||||
void save();
|
void save(RDLogLine::TransType first_trans);
|
||||||
void refreshList(int line=-1);
|
void refreshList(int line=-1);
|
||||||
void validateTransitions();
|
void fixupTransitions(RDLogLine::TransType repl_trans);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sizeChanged(int size);
|
void sizeChanged(int size);
|
||||||
void lengthChanged(int msecs);
|
void lengthChanged(int msecs);
|
||||||
|
void validationNeeded();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void aboutToShowData();
|
void aboutToShowData();
|
||||||
@ -70,12 +70,10 @@ class ImportListView : public Q3ListView
|
|||||||
QPixmap *import_macro_map;
|
QPixmap *import_macro_map;
|
||||||
QPixmap *import_notemarker_map;
|
QPixmap *import_notemarker_map;
|
||||||
QPixmap *import_mic16_map;
|
QPixmap *import_mic16_map;
|
||||||
Q3PopupMenu *import_menu;
|
QMenu *import_menu;
|
||||||
int import_menu_line;
|
int import_menu_line;
|
||||||
RDEventImportItem *import_menu_i_item;
|
RDEventImportItem *import_menu_i_item;
|
||||||
Q3ListViewItem *import_menu_item;
|
Q3ListViewItem *import_menu_item;
|
||||||
RDLogLine::TransType import_force_trans;
|
|
||||||
bool import_allow_stop;
|
|
||||||
bool import_allow_first_trans;
|
bool import_allow_first_trans;
|
||||||
QWidget *import_parent;
|
QWidget *import_parent;
|
||||||
};
|
};
|
||||||
|
@ -1136,7 +1136,7 @@ Opětovné sloučení tato data smaže. Sloučit znovu?</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -1136,7 +1136,7 @@ Einbinden wird diese entfernen. Fortfahren?</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -1138,7 +1138,7 @@ removerá estos datos. ¿Remezclar?</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -936,7 +936,7 @@ Do you want to save?</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -1141,7 +1141,7 @@ Flettar du på nytt, vil du fjerna desse dataa. Flett på nytt?</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -1141,7 +1141,7 @@ Flettar du på nytt, vil du fjerna desse dataa. Flett på nytt?</translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -1138,7 +1138,7 @@ Re-agregar removerá estes dados. Re-agregar? </translation>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>STOP Transition</source>
|
<source>[auto]</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user