mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-09 17:07:44 +02:00
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. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
dcf2076087
commit
a994558a89
@ -19897,3 +19897,7 @@
|
||||
* 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.
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// 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
|
||||
// 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 ")+
|
||||
"EVENT_NAME=\""+RDEscapeString(list_event_name)+"\" && "+
|
||||
@ -205,8 +205,14 @@ void RDEventImportList::save() const
|
||||
QString().sprintf("COUNT=%u,",i)+
|
||||
QString().sprintf("EVENT_TYPE=%d,",item->eventType())+
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// 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
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -64,7 +64,7 @@ class RDEventImportList
|
||||
void removeItem(int n);
|
||||
void moveItem(int from_line,int to_line);
|
||||
void load();
|
||||
void save() const;
|
||||
void save(RDLogLine::TransType first_trans=RDLogLine::NoTrans) const;
|
||||
void clear();
|
||||
|
||||
private:
|
||||
|
@ -309,7 +309,9 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
20);
|
||||
event_firsttrans_label->setAlignment(Qt::AlignVCenter|Qt::AlignLeft);
|
||||
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("Segue"));
|
||||
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->load(event_name,RDEventImportList::PreImport);
|
||||
event_preimport_list->setSortColumn(-1);
|
||||
connect(event_preimport_list,SIGNAL(sizeChanged(int)),
|
||||
this,SLOT(preimportChangedData(int)));
|
||||
connect(event_preimport_list,SIGNAL(validationNeeded()),
|
||||
this,SLOT(validate()));
|
||||
event_preimport_list->addColumn("");
|
||||
event_preimport_list->addColumn(tr("Cart"));
|
||||
event_preimport_list->addColumn(tr("Group"));
|
||||
@ -460,9 +462,9 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
connect(event_preimport_down_button,SIGNAL(clicked()),
|
||||
this,SLOT(preimportDownData()));
|
||||
|
||||
// *************************
|
||||
// Import Section
|
||||
// *************************
|
||||
//
|
||||
// Imports
|
||||
//
|
||||
label=new QLabel(tr("IMPORT"),this);
|
||||
label->setFont(labelFont());
|
||||
label->setGeometry(CENTER_LINE+15,387,200,16);
|
||||
@ -657,7 +659,6 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
event_postimport_list->setAllColumnsShowFocus(true);
|
||||
event_postimport_list->setItemMargin(5);
|
||||
event_postimport_list->setSortColumn(-1);
|
||||
event_postimport_list->setAllowStop(false);
|
||||
event_postimport_list->load(event_name,RDEventImportList::PostImport);
|
||||
event_postimport_list->addColumn("");
|
||||
event_postimport_list->addColumn(tr("Cart"));
|
||||
@ -671,6 +672,8 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
this,SLOT(cartClickedData(Q3ListViewItem *)));
|
||||
connect(event_postimport_list,SIGNAL(lengthChanged(int)),
|
||||
this,SLOT(postimportLengthChangedData(int)));
|
||||
connect(event_postimport_list,SIGNAL(validationNeeded()),
|
||||
this,SLOT(validate()));
|
||||
event_postimport_up_button=
|
||||
new RDTransportButton(RDTransportButton::Up,this);
|
||||
event_postimport_up_button->setGeometry(sizeHint().width()-50,532-3,40,40);
|
||||
@ -803,7 +806,7 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
event_firsttrans_box->setCurrentItem(event_event->firstTransType());
|
||||
}
|
||||
else {
|
||||
if(event_preimport_list->eventImportList()->size()>=1) {
|
||||
if(event_preimport_list->eventImportList()->size()>=2) {
|
||||
event_firsttrans_box->
|
||||
setCurrentItem(event_preimport_list->eventImportList()->
|
||||
item(0)->transType());
|
||||
@ -855,8 +858,8 @@ EditEvent::EditEvent(QString eventname,bool new_event,
|
||||
prepositionToggledData(event_position_box->isChecked());
|
||||
timeToggledData(event_timetype_check->isChecked());
|
||||
importClickedData(event_source_group->checkedId());
|
||||
preimportChangedData(event_preimport_list->childCount());
|
||||
SetPostTransition();
|
||||
event_postimport_list->refreshList();
|
||||
validate();
|
||||
}
|
||||
|
||||
|
||||
@ -961,21 +964,7 @@ void EditEvent::prepositionToggledData(bool state)
|
||||
//
|
||||
// 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();
|
||||
SetPostTransition();
|
||||
}
|
||||
|
||||
|
||||
@ -986,18 +975,6 @@ void EditEvent::timeToggledData(bool state)
|
||||
event_next_button->setEnabled(state);
|
||||
event_wait_button->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();
|
||||
if(state) {
|
||||
graceClickedData(event_grace_group->checkedId());
|
||||
@ -1022,7 +999,6 @@ void EditEvent::timeToggledData(bool state)
|
||||
(event_preimport_list->childCount()==0)) {
|
||||
}
|
||||
}
|
||||
SetPostTransition();
|
||||
}
|
||||
|
||||
|
||||
@ -1044,16 +1020,12 @@ void EditEvent::graceClickedData(int id)
|
||||
event_grace_edit->setEnabled(true);
|
||||
break;
|
||||
}
|
||||
SetPostTransition();
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::timeTransitionData(int id)
|
||||
{
|
||||
event_preimport_list->
|
||||
setForceTrans((RDLogLine::TransType)event_firsttrans_box->currentItem());
|
||||
event_preimport_list->refreshList();
|
||||
SetPostTransition();
|
||||
}
|
||||
|
||||
|
||||
@ -1103,7 +1075,6 @@ void EditEvent::importClickedData(int id)
|
||||
state=(id==2)&&state;
|
||||
event_nestevent_label->setEnabled(state);
|
||||
event_nestevent_box->setEnabled(state);
|
||||
SetPostTransition();
|
||||
event_sched_group_box->setEnabled(stateschedinv);
|
||||
event_artist_sep_label->setEnabled(stateschedinv);
|
||||
event_artist_sep_spinbox->setEnabled(stateschedinv);
|
||||
@ -1118,12 +1089,6 @@ void EditEvent::importClickedData(int id)
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::preimportChangedData(int size)
|
||||
{
|
||||
SetPostTransition();
|
||||
}
|
||||
|
||||
|
||||
void EditEvent::preimportLengthChangedData(int msecs)
|
||||
{
|
||||
event_preimport_length_edit->setText(RDGetTimeLength(msecs,true,false));
|
||||
@ -1143,7 +1108,6 @@ void EditEvent::preimportUpData()
|
||||
return;
|
||||
}
|
||||
event_preimport_list->move(line,line-1);
|
||||
event_preimport_list->validateTransitions();
|
||||
event_preimport_list->refreshList(line-1);
|
||||
}
|
||||
|
||||
@ -1161,7 +1125,6 @@ void EditEvent::preimportDownData()
|
||||
return;
|
||||
}
|
||||
event_preimport_list->move(line,line+1);
|
||||
event_preimport_list->validateTransitions();
|
||||
event_preimport_list->refreshList(line+1);
|
||||
event_preimport_list->ensureItemVisible(item);
|
||||
}
|
||||
@ -1180,7 +1143,6 @@ void EditEvent::postimportUpData()
|
||||
return;
|
||||
}
|
||||
event_postimport_list->move(line,line-1);
|
||||
event_postimport_list->validateTransitions();
|
||||
event_postimport_list->refreshList(line-1);
|
||||
}
|
||||
|
||||
@ -1198,7 +1160,6 @@ void EditEvent::postimportDownData()
|
||||
return;
|
||||
}
|
||||
event_postimport_list->move(line,line+1);
|
||||
event_postimport_list->validateTransitions();
|
||||
event_postimport_list->refreshList(line+1);
|
||||
}
|
||||
|
||||
@ -1252,7 +1213,8 @@ void EditEvent::saveAsData()
|
||||
if(event_new_event) {
|
||||
AbandonEvent(old_name);
|
||||
}
|
||||
setCaption("RDLogManager - "+tr("Editing Event")+" - "+event_event->name());
|
||||
setWindowTitle("RDLogManager - "+tr("Editing Event")+" - "+
|
||||
event_event->name());
|
||||
}
|
||||
else {
|
||||
if(QMessageBox::question(this,tr("RDLogManager"),
|
||||
@ -1297,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()
|
||||
{
|
||||
Save();
|
||||
@ -1409,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()
|
||||
{
|
||||
QString properties;
|
||||
@ -1459,7 +1440,6 @@ void EditEvent::Save()
|
||||
}
|
||||
if(event_timetype_check->isChecked()) {
|
||||
event_event->setTimeType(RDLogLine::Hard);
|
||||
// event_event->setPostPoint(event_post_box->isChecked());
|
||||
event_event->setFirstTransType((RDLogLine::TransType)
|
||||
event_firsttrans_box->currentItem());
|
||||
switch(event_grace_group->checkedId()) {
|
||||
@ -1479,7 +1459,6 @@ void EditEvent::Save()
|
||||
else {
|
||||
event_event->setTimeType(RDLogLine::Relative);
|
||||
event_event->setGraceTime(0);
|
||||
// event_event->setPostPoint(false);
|
||||
event_event->setFirstTransType(RDLogLine::Play);
|
||||
}
|
||||
|
||||
@ -1539,9 +1518,11 @@ void EditEvent::Save()
|
||||
}
|
||||
|
||||
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->save();
|
||||
event_postimport_list->
|
||||
save((RDLogLine::TransType)event_firsttrans_box->currentIndex());
|
||||
|
||||
event_saved=true;
|
||||
}
|
||||
|
@ -68,7 +68,6 @@ class EditEvent : public RDDialog
|
||||
void autofillToggledData(bool);
|
||||
void autofillWarnToggledData(bool);
|
||||
void importClickedData(int);
|
||||
void preimportChangedData(int size);
|
||||
void preimportLengthChangedData(int msecs);
|
||||
void preimportUpData();
|
||||
void preimportDownData();
|
||||
@ -81,6 +80,7 @@ class EditEvent : public RDDialog
|
||||
void saveAsData();
|
||||
void svcData();
|
||||
void colorData();
|
||||
void validate();
|
||||
void okData();
|
||||
void cancelData();
|
||||
|
||||
@ -90,7 +90,6 @@ class EditEvent : public RDDialog
|
||||
|
||||
private:
|
||||
void RefreshLibrary();
|
||||
void SetPostTransition();
|
||||
void Save();
|
||||
void CopyEventPerms(QString old_name,QString new_name);
|
||||
void AbandonEvent(QString name);
|
||||
|
@ -48,8 +48,7 @@
|
||||
#define MENU_EDIT_TRACK 3
|
||||
#define MENU_PLAY_TRANS 4
|
||||
#define MENU_SEGUE_TRANS 5
|
||||
#define MENU_STOP_TRANS 6
|
||||
#define MENU_DELETE 7
|
||||
#define MENU_DELETE 6
|
||||
|
||||
ImportListView::ImportListView(QWidget *parent)
|
||||
: Q3ListView(parent)
|
||||
@ -89,16 +88,10 @@ ImportListView::ImportListView(QWidget *parent)
|
||||
0,MENU_PLAY_TRANS);
|
||||
import_menu->insertItem(tr("SEGUE Transition"),this,SLOT(segueMenuData()),
|
||||
0,MENU_SEGUE_TRANS);
|
||||
import_menu->insertItem(tr("STOP Transition"),this,SLOT(stopMenuData()),
|
||||
0,MENU_STOP_TRANS);
|
||||
import_menu->insertSeparator();
|
||||
import_menu->insertItem(tr("Delete"),this,SLOT(deleteMenuData()),
|
||||
0,MENU_DELETE);
|
||||
|
||||
import_force_trans=RDLogLine::NoTrans;
|
||||
import_allow_stop=true;
|
||||
import_allow_first_trans=true;
|
||||
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
@ -109,23 +102,27 @@ RDEventImportList *ImportListView::eventImportList() const
|
||||
}
|
||||
|
||||
|
||||
void ImportListView::setForceTrans(RDLogLine::TransType trans)
|
||||
{
|
||||
import_force_trans=trans;
|
||||
validateTransitions();
|
||||
}
|
||||
|
||||
|
||||
void ImportListView::setAllowStop(bool state)
|
||||
{
|
||||
import_allow_stop=state;
|
||||
}
|
||||
|
||||
|
||||
void ImportListView::setAllowFirstTrans(bool 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ImportListView::move(int from_line,int to_line)
|
||||
@ -150,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -211,21 +213,11 @@ void ImportListView::refreshList(int line)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(i_item->transType()) {
|
||||
case RDLogLine::Play:
|
||||
item->setText(5,tr("PLAY"));
|
||||
break;
|
||||
|
||||
case RDLogLine::Segue:
|
||||
item->setText(5,tr("SEGUE"));
|
||||
break;
|
||||
|
||||
case RDLogLine::Stop:
|
||||
item->setText(5,tr("STOP"));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
if((i==0)&&(!import_allow_first_trans)) {
|
||||
item->setText(5,tr("[auto]"));
|
||||
}
|
||||
else {
|
||||
item->setText(5,RDLogLine::transText(i_item->transType()));
|
||||
}
|
||||
item->setText(6,QString().sprintf("%d",i));
|
||||
if(cart!=NULL) {
|
||||
@ -246,22 +238,18 @@ void ImportListView::refreshList(int line)
|
||||
}
|
||||
|
||||
|
||||
void ImportListView::validateTransitions()
|
||||
void ImportListView::fixupTransitions(RDLogLine::TransType repl_trans)
|
||||
{
|
||||
if(import_list->size()>=1) {
|
||||
if(import_force_trans!=RDLogLine::NoTrans) {
|
||||
import_list->item(0)->setTransType(import_force_trans);
|
||||
Q3ListViewItem *item=firstChild();
|
||||
|
||||
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++) {
|
||||
if(import_list->item(i)->transType()==RDLogLine::Stop) {
|
||||
import_list->item(1)->setTransType(RDLogLine::Segue);
|
||||
for(int i=0;i<import_list->size();i++) {
|
||||
if(import_list->item(i)->transType()==RDLogLine::NoTrans) {
|
||||
import_list->item(i)->setTransType(repl_trans);
|
||||
item->setText(5,RDLogLine::transText(repl_trans));
|
||||
item=item->nextSibling();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -278,8 +266,6 @@ void ImportListView::aboutToShowData()
|
||||
import_menu->setItemEnabled(MENU_PLAY_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||
import_menu->setItemEnabled(MENU_SEGUE_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_STOP_TRANS,false);
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,false);
|
||||
import_menu->setItemEnabled(MENU_DELETE,false);
|
||||
return;
|
||||
}
|
||||
@ -297,41 +283,29 @@ void ImportListView::aboutToShowData()
|
||||
}
|
||||
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_STOP_TRANS,false);
|
||||
if(import_menu_line==0) {
|
||||
import_menu->setItemEnabled(MENU_PLAY_TRANS,import_allow_first_trans);
|
||||
import_menu->setItemEnabled(MENU_SEGUE_TRANS,import_allow_first_trans);
|
||||
import_menu->setItemEnabled(MENU_DELETE,import_allow_first_trans);
|
||||
if((import_menu_line==0)&&import_allow_stop&&import_allow_first_trans) {
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,true);
|
||||
}
|
||||
else {
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
import_menu->setItemEnabled(MENU_PLAY_TRANS,true);
|
||||
import_menu->setItemEnabled(MENU_SEGUE_TRANS,true);
|
||||
import_menu->setItemEnabled(MENU_DELETE,true);
|
||||
if((import_menu_line==0)&&import_allow_stop) {
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,true);
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,true);
|
||||
}
|
||||
else {
|
||||
import_menu->setItemEnabled(MENU_STOP_TRANS,false);
|
||||
}
|
||||
}
|
||||
switch(import_menu_i_item->transType()) {
|
||||
case RDLogLine::Play:
|
||||
import_menu->setItemChecked(MENU_PLAY_TRANS,true);
|
||||
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||
break;
|
||||
|
||||
case RDLogLine::Segue:
|
||||
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_SEGUE_TRANS,true);
|
||||
break;
|
||||
|
||||
case RDLogLine::Stop:
|
||||
import_menu->setItemChecked(MENU_STOP_TRANS,true);
|
||||
import_menu->setItemChecked(MENU_PLAY_TRANS,false);
|
||||
import_menu->setItemChecked(MENU_SEGUE_TRANS,false);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -361,9 +335,9 @@ void ImportListView::insertNoteMenuData()
|
||||
RDEventImportItem *i_item=new RDEventImportItem();
|
||||
i_item->setEventType(RDLogLine::Marker);
|
||||
i_item->setMarkerComment(note);
|
||||
i_item->setTransType(RDLogLine::Segue);
|
||||
i_item->setTransType(RDLogLine::NoTrans);
|
||||
import_list->takeItem(import_menu_line,i_item);
|
||||
validateTransitions();
|
||||
emit validationNeeded();
|
||||
refreshList(import_menu_line);
|
||||
emit sizeChanged(childCount());
|
||||
}
|
||||
@ -401,9 +375,9 @@ void ImportListView::insertTrackMenuData()
|
||||
RDEventImportItem *i_item=new RDEventImportItem();
|
||||
i_item->setEventType(RDLogLine::Track);
|
||||
i_item->setMarkerComment(note);
|
||||
i_item->setTransType(RDLogLine::Segue);
|
||||
i_item->setTransType(RDLogLine::NoTrans);
|
||||
import_list->takeItem(import_menu_line,i_item);
|
||||
validateTransitions();
|
||||
emit validationNeeded();
|
||||
refreshList(import_menu_line);
|
||||
emit sizeChanged(childCount());
|
||||
}
|
||||
@ -445,7 +419,7 @@ void ImportListView::stopMenuData()
|
||||
void ImportListView::deleteMenuData()
|
||||
{
|
||||
import_list->removeItem(import_menu_item->text(6).toInt());
|
||||
validateTransitions();
|
||||
emit validationNeeded();
|
||||
refreshList();
|
||||
emit sizeChanged(childCount());
|
||||
}
|
||||
@ -543,12 +517,12 @@ void ImportListView::dropEvent(QDropEvent *e)
|
||||
else {
|
||||
i_item->setEventType(RDLogLine::Macro);
|
||||
}
|
||||
i_item->setTransType(RDLogLine::Segue);
|
||||
i_item->setTransType(RDLogLine::NoTrans);
|
||||
import_list->takeItem(line,i_item);
|
||||
delete cart;
|
||||
}
|
||||
}
|
||||
validateTransitions();
|
||||
emit validationNeeded();
|
||||
refreshList(line);
|
||||
emit sizeChanged(childCount());
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// 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
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@ -34,19 +34,18 @@ class ImportListView : public Q3ListView
|
||||
public:
|
||||
ImportListView(QWidget *parent);
|
||||
RDEventImportList *eventImportList() const;
|
||||
void setForceTrans(RDLogLine::TransType trans);
|
||||
void setAllowStop(bool state);
|
||||
void setAllowFirstTrans(bool state);
|
||||
void move(int from_line,int to_line);
|
||||
void setEventName(const QString &str);
|
||||
bool load(const QString &event_name,RDEventImportList::ImportType type);
|
||||
void save();
|
||||
void save(RDLogLine::TransType first_trans);
|
||||
void refreshList(int line=-1);
|
||||
void validateTransitions();
|
||||
void fixupTransitions(RDLogLine::TransType repl_trans);
|
||||
|
||||
signals:
|
||||
void sizeChanged(int size);
|
||||
void lengthChanged(int msecs);
|
||||
void validationNeeded();
|
||||
|
||||
private slots:
|
||||
void aboutToShowData();
|
||||
@ -75,8 +74,6 @@ class ImportListView : public Q3ListView
|
||||
int import_menu_line;
|
||||
RDEventImportItem *import_menu_i_item;
|
||||
Q3ListViewItem *import_menu_item;
|
||||
RDLogLine::TransType import_force_trans;
|
||||
bool import_allow_stop;
|
||||
bool import_allow_first_trans;
|
||||
QWidget *import_parent;
|
||||
};
|
||||
|
@ -1136,7 +1136,7 @@ Opětovné sloučení tato data smaže. Sloučit znovu?</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1136,7 +1136,7 @@ Einbinden wird diese entfernen. Fortfahren?</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1138,7 +1138,7 @@ removerá estos datos. ¿Remezclar?</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -936,7 +936,7 @@ Do you want to save?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1141,7 +1141,7 @@ Flettar du på nytt, vil du fjerna desse dataa. Flett på nytt?</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1141,7 +1141,7 @@ Flettar du på nytt, vil du fjerna desse dataa. Flett på nytt?</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
@ -1138,7 +1138,7 @@ Re-agregar removerá estes dados. Re-agregar? </translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STOP Transition</source>
|
||||
<source>[auto]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
|
Loading…
x
Reference in New Issue
Block a user