mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-18 08:31:16 +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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user