mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-29 15:09:35 +02:00
2016-07-20 Fred Gleason <fredg@paravelsystems.com>
* Added a 'settrans' command to rdclilogedit(1) in 'utils/rdclilogedit/rdclilogedit.cpp' and 'utils/rdclilogedit/rdclilogedit.h'.
This commit is contained in:
parent
a166e4f731
commit
42d9286fd8
@ -15326,3 +15326,7 @@
|
||||
* Added a 'remove' command to rdclilogedit(1) in
|
||||
'utils/rdclilogedit/rdclilogedit.cpp' and
|
||||
'utils/rdclilogedit/rdclilogedit.h'.
|
||||
2016-07-20 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added a 'settrans' command to rdclilogedit(1) in
|
||||
'utils/rdclilogedit/rdclilogedit.cpp' and
|
||||
'utils/rdclilogedit/rdclilogedit.h'.
|
||||
|
@ -108,6 +108,14 @@ void MainObject::Help(const QStringList &cmds) const
|
||||
printf("\n");
|
||||
processed=true;
|
||||
}
|
||||
if(verb=="settrans") {
|
||||
printf("\n");
|
||||
printf(" settrans <line> play|segue|stop\n");
|
||||
printf("\n");
|
||||
printf("Set the transition type of the event at line <line>.\n");
|
||||
printf("\n");
|
||||
processed=true;
|
||||
}
|
||||
if(verb=="unload") {
|
||||
printf("\n");
|
||||
printf(" unload\n");
|
||||
|
@ -305,6 +305,13 @@ void MainObject::Setcart(int line,unsigned cartnum)
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Settrans(int line,RDLogLine::TransType type)
|
||||
{
|
||||
edit_log_event->logLine(line)->setTransType(type);
|
||||
edit_log_event->refresh(line);
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Unload()
|
||||
{
|
||||
if(edit_log!=NULL) {
|
||||
@ -433,6 +440,37 @@ void MainObject::DispatchCommand(const QString &cmd)
|
||||
processed=true;
|
||||
}
|
||||
|
||||
if(verb=="settrans") {
|
||||
if(cmds.size()==3) {
|
||||
line=cmds[1].toInt(&ok);
|
||||
if(ok&&(line>=0)&&(line<edit_log_event->size())) {
|
||||
RDLogLine::TransType trans=RDLogLine::NoTrans;
|
||||
if(cmds[2].lower()=="play") {
|
||||
trans=RDLogLine::Play;
|
||||
}
|
||||
if(cmds[2].lower()=="segue") {
|
||||
trans=RDLogLine::Segue;
|
||||
}
|
||||
if(cmds[2].lower()=="stop") {
|
||||
trans=RDLogLine::Stop;
|
||||
}
|
||||
if(trans!=RDLogLine::NoTrans) {
|
||||
Settrans(line,trans);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"settrans: invalid transition type\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"settrans: invalid line number\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"settrans: invalid command arguments\n");
|
||||
}
|
||||
processed=true;
|
||||
}
|
||||
|
||||
if(verb=="unload") {
|
||||
Unload();
|
||||
processed=true;
|
||||
|
@ -55,6 +55,7 @@ class MainObject : public QObject
|
||||
void Save();
|
||||
void Saveas(const QString &logname);
|
||||
void Setcart(int line,unsigned cartnum);
|
||||
void Settrans(int line,RDLogLine::TransType type);
|
||||
void Unload();
|
||||
void DispatchCommand(const QString &cmd);
|
||||
QString ListLine(RDLogEvent *evt,int line) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user