2020-12-15 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RDLogLine::refreshCart()' method.
	* Refactored the 'Edit Log' dialog in rdlogedit(1) to use Qt's
	MVC API.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2020-12-15 12:53:29 -05:00
parent 0bd165a823
commit 0b57b4b8de
40 changed files with 2355 additions and 901 deletions

View File

@ -20688,3 +20688,7 @@
* Incremented the package version to 3.5.0.
2020-12-14 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDLogModel' class.
2020-12-15 Fred Gleason <fredg@paravelsystems.com>
* Added a 'RDLogLine::refreshCart()' method.
* Refactored the 'Edit Log' dialog in rdlogedit(1) to use Qt's
MVC API.

View File

@ -2730,11 +2730,11 @@ Bitte Kofiguration prüfen und erneut versuchen.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2725,11 +2725,11 @@ Bitte Kofiguration prüfen und erneut versuchen.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2715,11 +2715,11 @@ Do you still want to proceed?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2237,11 +2237,11 @@ Do you want to overwrite it?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2696,11 +2696,11 @@ Sjekk eksportoppsettet ditt og prøv att.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2696,11 +2696,11 @@ Sjekk eksportoppsettet ditt og prøv att.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -2730,11 +2730,11 @@ Por Favor, cheque suas configurações e tenbte outra vez.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sch. Time</source>
<source>--- end of log ---</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>--- end of log ---</source>
<source>Start Time</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -1,8 +1,8 @@
// rdgroup_list.cpp
//
// A container class for Rivendell Groups
// A list container for Rivendell Groups
//
// (C) Copyright 2002-2004,2016 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
@ -18,8 +18,9 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include <rddb.h>
#include <rdgroup_list.h>
#include "rddb.h"
#include "rdescape_string.h"
#include "rdgroup_list.h"
RDGroupList::RDGroupList()
{
@ -27,48 +28,58 @@ RDGroupList::RDGroupList()
}
void RDGroupList::loadSvc(QString svcname)
QString RDGroupList::serviceName() const
{
QString sql;
RDSqlQuery *q;
return d_service_name;
}
clear();
sql=QString().sprintf("select GROUP_NAME from AUDIO_PERMS where\
SERVICE_NAME=\"%s\"",
(const char *)svcname);
q=new RDSqlQuery(sql);
while(q->next()) {
list_groups.push_back(QString(q->value(0).toString()));
void RDGroupList::setServiceName(const QString &str)
{
if(d_service_name!=str) {
QString sql;
RDSqlQuery *q;
clear();
sql=QString("select ")+
"GROUP_NAME "+ // 00
"from AUDIO_PERMS where "+
"SERVICE_NAME=\""+RDEscapeString(str)+"\"";
q=new RDSqlQuery(sql);
while(q->next()) {
d_groups.push_back(QString(q->value(0).toString()));
}
delete q;
d_service_name=str;
}
delete q;
}
void RDGroupList::clear()
{
list_groups.clear();
d_groups.clear();
}
int RDGroupList::size() const
{
return list_groups.size();
return d_groups.size();
}
QString RDGroupList::group(unsigned n) const
QString RDGroupList::group(int n) const
{
if(n<list_groups.size()) {
return list_groups[n];
if(n<d_groups.size()) {
return d_groups.at(n);
}
return QString();
}
bool RDGroupList::isGroupValid(QString group)
bool RDGroupList::groupIsValid(QString group)
{
for(unsigned i=0;i<list_groups.size();i++) {
if(list_groups[i].upper()==group.upper()) {
for(int i=0;i<d_groups.size();i++) {
if(d_groups.at(i).toUpper()==group.toUpper()) {
return true;
}
}

View File

@ -1,8 +1,8 @@
// rdgroup_list.h
//
// A container class for Rivendell Groups
// A list container for Rivendell Groups
//
// (C) Copyright 2002-2004,2016 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
@ -21,23 +21,22 @@
#ifndef RDGROUP_LIST_H
#define RDGROUP_LIST_H
#include <vector>
#include <qsqldatabase.h>
using namespace std;
#include <QStringList>
class RDGroupList
{
public:
RDGroupList();
void loadSvc(QString svcname);
QString serviceName() const;
void setServiceName(const QString &str);
void clear();
int size() const;
QString group(unsigned n) const;
bool isGroupValid(QString group);
QString group(int n) const;
bool groupIsValid(QString group);
private:
vector<QString> list_groups;
QString d_service_name;
QStringList d_groups;
};

View File

@ -84,4 +84,4 @@ class RDLogEvent
};
#endif
#endif // RDLOG_LINE_H

View File

@ -2239,6 +2239,61 @@ void RDLogLine::loadCart(int cartnum,int cutnum)
}
void RDLogLine::refreshCart()
{
QString sql;
RDSqlQuery *q=NULL;
if((type()==RDLogLine::Cart)||(type()==RDLogLine::Macro)) {
sql=QString("select ")+
"TITLE,"+ // 00
"ARTIST,"+ // 01
"ALBUM,"+ // 02
"YEAR,"+ // 03
"CONDUCTOR,"+ // 04
"LABEL,"+ // 05
"CLIENT,"+ // 06
"AGENCY,"+ // 07
"PUBLISHER,"+ // 08
"COMPOSER,"+ // 09
"USER_DEFINED,"+ // 10
"SONG_ID,"+ // 11
"USAGE_CODE,"+ // 12
"FORCED_LENGTH,"+ // 13
"ENFORCE_LENGTH,"+ // 14
"VALIDITY,"+ // 15
"START_DATETIME,"+ // 16
"END_DATETIME,"+ // 17
"NOTES "+ // 19
"from CART where "+
QString().sprintf("NUMBER=%u",cartNumber());
q=new RDSqlQuery(sql);
if(q->first()) {
log_title=q->value(0).toString();
log_artist=q->value(1).toString();
log_album=q->value(2).toString();
log_year=q->value(3).toDate();
log_conductor=q->value(4).toString();
log_label=q->value(5).toString();
log_client=q->value(6).toString();
log_agency=q->value(7).toString();
log_publisher=q->value(8).toString();
log_composer=q->value(9).toString();
log_user_defined=q->value(10).toString();
log_song_id=q->value(11).toString();
log_song_id=q->value(12).toString();
log_forced_length=q->value(13).toUInt();
log_enforce_length=q->value(14).toString()=="Y";
log_validity=(RDCart::Validity)q->value(15).toUInt();
log_start_datetime=q->value(16).toDateTime();
log_end_datetime=q->value(17).toDateTime();
log_cart_notes=q->value(18).toString();
}
delete q;
}
}
void RDLogLine::refreshPointers()
{
if(log_cut_name.isEmpty()) {

View File

@ -266,6 +266,7 @@ class RDLogLine
bool timescale,RDLogLine::TransType type=RDLogLine::NoTrans,
int len=-1);
void loadCart(int cartnum,int cutnum=-1);
void refreshCart();
void refreshPointers();
QString xml(int line) const;
static QString resolveNowNextDateTime(const QString &str,const QString &code,

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
//
// Data model for Rivendell logs
//
// (C) Copyright 2020 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
@ -22,21 +22,24 @@
#define RDLOGMODEL_H
#include <QAbstractTableModel>
#include <qfont.h>
#include <qfontmetrics.h>
#include <qlist.h>
#include <QFont>
#include <QFontMetrics>
#include <QList>
#include <QPalette>
#include <rdlog_event.h>
#include <rdlog_icons.h>
#include <rdnotification.h>
class RDLogModel : public QAbstractTableModel
{
Q_OBJECT
public:
RDLogModel(QObject *parent=0);
enum StartTimeStyle {Estimated=0,Scheduled=1};
RDLogModel(const QString &logname,QObject *parent=0);
~RDLogModel();
void setLogEvent(RDLogEvent *log);
void clearLogEvent();
QPalette palette();
void setPalette(const QPalette &pal);
void setFont(const QFont &font);
int columnCount(const QModelIndex &parent=QModelIndex()) const;
int rowCount(const QModelIndex &parent=QModelIndex()) const;
@ -44,8 +47,60 @@ class RDLogModel : public QAbstractTableModel
int role=Qt::DisplayRole) const;
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
//
// From RDLogEvent
//
bool exists();
bool exists(int line);
bool exists(const QTime &hard_time,int except_line=-1);
QString logName() const;
void setLogName(QString logname);
QString serviceName() const;
int load(bool track_ptrs=false);
void saveModified(RDConfig *config,bool update_tracks=true);
void save(RDConfig *config,bool update_tracks=true,int line=-1);
int append(const QString &logname,bool track_ptrs=false);
int validate(QString *report,const QDate &date);
void clear();
void refresh(int line);
int lineCount() const;
void insert(int line,int num_lines,bool preserve_trans=false);
void remove(int line,int num_lines,bool preserve_trans=false);
void move(int from_line,int to_line);
void copy(int from_line,int to_line);
int length(int from_line,int to_line,QTime *sched_time=NULL);
int lengthToStop(int from_line,QTime *sched_time=NULL);
bool blockLength(int *nominal_length,int *actual_length,int line);
QTime blockStartTime(int line) const;
RDLogLine *logLine(int line) const;
void setLogLine(int line,RDLogLine *ll);
RDLogLine *loglineById(int id, bool ignore_holdovers=false) const;
int lineById(int id, bool ignore_holdovers=false) const;
int lineByStartHour(int hour,RDLogLine::StartTimeType type) const;
int lineByStartHour(int hour) const;
int nextTimeStart(QTime after);
RDLogLine::TransType nextTransType(int);
void removeCustomTransition(int line);
int nextId() const;
int nextLinkId() const;
QString xml() const;
public slots:
void processNotification(RDNotification *notify);
void setStartTimeStyle(StartTimeStyle style);
protected:
void emitDataChanged(int row);
virtual QColor backgroundColor(int line,RDLogLine *ll) const;
private:
RDLogEvent *d_log;
QString StartTimeString(int line) const;
int LoadLines(const QString &logname,int id_offset,bool track_ptrs);
void SaveLine(int line);
void InsertLines(QString values);
void InsertLineValues(QString *query, int line);
void LoadNowNext(unsigned from_line);
QPalette d_palette;
QFont d_font;
QFontMetrics *d_fms;
QFont d_bold_font;
@ -53,6 +108,11 @@ class RDLogModel : public QAbstractTableModel
QList<QVariant> d_headers;
QList<QVariant> d_alignments;
RDLogIcons *d_log_icons;
StartTimeStyle d_start_time_style;
QString d_log_name;
QString d_service_name;
int d_max_id;
QList<RDLogLine *> d_log_lines;
};

View File

@ -311,6 +311,72 @@ bool RDRenderer::renderToFile(const QString &outfile,RDLogEvent *log,
}
bool RDRenderer::renderToFile(const QString &outfile,RDLogModel *model,
RDSettings *s,const QTime &start_time,
bool ignore_stops,QString *err_msg,
int first_line,int last_line,
const QTime &first_time,const QTime &last_time)
{
QString temp_output_filename;
char tempdir[PATH_MAX];
bool ok=false;
FILE *f=NULL;
bool ret;
//
// Verify Destination
//
if((f=fopen(outfile,"w"))==NULL) {
*err_msg=tr("unable to open output file")+" ["+QString(strerror(errno))+"]";
return false;
}
fclose(f);
if(((s->format()!=RDSettings::Pcm16)&&(s->format()!=RDSettings::Pcm24))||
(s->normalizationLevel()!=0)) {
ProgressMessage("Pass 1 of 2");
render_total_passes=2;
//
// Get Temporary File
//
strncpy(tempdir,RDTempDirectory::basePath()+"/rdrenderXXXXXX",PATH_MAX);
temp_output_filename=QString(mkdtemp(tempdir))+"/log.wav";
ProgressMessage(tr("Using temporary file")+" \""+temp_output_filename+"\".");
//
// Render It
//
if(!Render(temp_output_filename,model,s,start_time,ignore_stops,err_msg,
first_line,last_line,first_time,last_time)) {
return false;
}
//
// Convert It
//
ProgressMessage(tr("Pass 2 of 2"));
ProgressMessage(tr("Writing output file"));
ok=ConvertAudio(temp_output_filename,outfile,s,err_msg);
DeleteTempFile(temp_output_filename);
emit lineStarted(model->lineCount()+1,model->lineCount()+1);
if(!ok) {
return false;
}
}
else {
ProgressMessage(tr("Pass 1 of 1"));
render_total_passes=1;
ret=Render(outfile,model,s,start_time,ignore_stops,err_msg,
first_line,last_line,first_time,last_time);
emit lineStarted(model->lineCount(),model->lineCount());
return ret;
}
return true;
}
bool RDRenderer::renderToCart(unsigned cartnum,int cutnum,RDLogEvent *log,
RDSettings *s,const QTime &start_time,
bool ignore_stops,QString *err_msg,
@ -384,6 +450,79 @@ bool RDRenderer::renderToCart(unsigned cartnum,int cutnum,RDLogEvent *log,
}
bool RDRenderer::renderToCart(unsigned cartnum,int cutnum,RDLogModel *model,
RDSettings *s,const QTime &start_time,
bool ignore_stops,QString *err_msg,
int first_line,int last_line,
const QTime &first_time,const QTime &last_time)
{
QString temp_output_filename;
char tempdir[PATH_MAX];
bool ok=false;
if(first_line<0) {
first_line=0;
}
if(last_line<0) {
last_line=model->lineCount();
}
//
// Check that we won't overflow the 32 bit BWF structures
// when we go to import the rendered log back into the audio store
//
if((double)model->length(first_line,last_line-1)/1000.0>=
(1073741824.0/((double)s->channels()*(double)s->sampleRate()))) {
*err_msg=tr("Rendered log is too long!");
return false;
}
ProgressMessage(tr("Pass 1 of 2"));
render_total_passes=2;
//
// Verify Destination
//
if(!RDCart::exists(cartnum)) {
*err_msg=tr("no such cart");
return false;
}
if(!RDCut::exists(cartnum,cutnum)) {
*err_msg=tr("no such cut");
return false;
}
//
// Get Temporary File
//
strncpy(tempdir,RDTempDirectory::basePath()+"/rdrenderXXXXXX",PATH_MAX);
temp_output_filename=QString(mkdtemp(tempdir))+"/log.wav";
ProgressMessage(tr("Using temporary file")+" \""+temp_output_filename+"\".");
//
// Render It
//
if(!Render(temp_output_filename,model,s,start_time,ignore_stops,err_msg,
first_line,last_line,first_time,last_time)) {
return false;
}
//
// Convert It
//
ProgressMessage(tr("Pass 2 of 2"));
ProgressMessage(tr("Importing cart"));
ok=ImportCart(temp_output_filename,cartnum,cutnum,s->channels(),err_msg);
DeleteTempFile(temp_output_filename);
emit lineStarted(model->lineCount()+1,model->lineCount()+1);
if(!ok) {
return false;
}
return true;
}
QStringList RDRenderer::warnings() const
{
return render_warnings;
@ -567,6 +706,177 @@ bool RDRenderer::Render(const QString &outfile,RDLogEvent *log,RDSettings *s,
}
bool RDRenderer::Render(const QString &outfile,RDLogModel *model,RDSettings *s,
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time,const QTime &last_time)
{
float *pcm=NULL;
QString temp_output_filename;
QTime current_time;
render_warnings.clear();
render_abort=false;
if(start_time.isNull()) {
current_time=QTime::currentTime();
}
else {
current_time=start_time;
}
//
// Open Output File
//
SF_INFO sf_info;
SNDFILE *sf_out;
memset(&sf_info,0,sizeof(sf_info));
sf_info.samplerate=rda->system()->sampleRate();
sf_info.channels=s->channels();
if(s->format()==RDSettings::Pcm16) {
sf_info.format=SF_FORMAT_WAV|SF_FORMAT_PCM_16;
}
else {
sf_info.format=SF_FORMAT_WAV|SF_FORMAT_PCM_24;
}
sf_out=sf_open(outfile,SFM_WRITE,&sf_info);
if(sf_out==NULL) {
fprintf(stderr,"rdrender: unable to open output file [%s]\n",
sf_strerror(sf_out));
return 1;
}
//
// Initialize the log
//
std::vector<__RDRenderLogLine *> lls;
for(int i=0;i<model->lineCount();i++) {
lls.push_back(new __RDRenderLogLine(model->logLine(i),s->channels()));
if(ignore_stops&&(lls.back()->transType()==RDLogLine::Stop)) {
lls.back()->setTransType(RDLogLine::Play);
}
if((!first_time.isNull())&&
(lls.back()->timeType()==RDLogLine::Hard)&&
(first_line==-1)&&
(lls.back()->startTime(RDLogLine::Imported)==first_time)) {
first_line=i;
}
if((!last_time.isNull())&&
(lls.back()->timeType()==RDLogLine::Hard)&&
(last_line==-1)&&
(lls.back()->startTime(RDLogLine::Imported)==last_time)) {
last_line=i;
}
}
if((!first_time.isNull())&&(first_line==-1)) {
*err_msg+=tr("first-time event not found");
}
if((!last_time.isNull())&&(last_line==-1)) {
if(!err_msg->isEmpty()) {
*err_msg+=", ";
}
*err_msg+=tr("last-time event not found");
}
if(!err_msg->isEmpty()) {
return false;
}
lls.push_back(new __RDRenderLogLine(new RDLogLine(),s->channels()));
lls.back()->setTransType(RDLogLine::Play);
if((!first_time.isNull())&&(first_line==-1)) {
first_line=model->lineCount();
}
//
// Iterate through it
//
for(unsigned i=0;i<lls.size();i++) {
if(render_abort) {
emit lineStarted(model->lineCount()+render_total_passes-1,
model->lineCount()+render_total_passes-1);
*err_msg+="Render aborted.\n";
sf_close(sf_out);
return false;
}
emit lineStarted(i,model->lineCount()+render_total_passes-1);
if(((first_line==-1)||(first_line<=(int)i))&&
((last_line==-1)||(last_line>=(int)i))) {
if(lls.at(i)->transType()==RDLogLine::Stop) {
ProgressMessage(current_time,i,tr("STOP")+" ",lls.at(i)->summary());
render_warnings.
push_back(tr("log render halted at line")+QString().sprintf(" %d ",i)+
tr("due to STOP"));
break;
}
if(lls.at(i)->open(current_time)) {
ProgressMessage(current_time,i,
RDLogLine::transText(lls.at(i)->transType()),
QString().sprintf(" cart %06u [",lls.at(i)->cartNumber())+
lls.at(i)->title()+"]");
sf_count_t frames=0;
if((lls.at(i+1)->transType()==RDLogLine::Segue)&&
(lls.at(i)->segueStartPoint()>=0)) {
if(lls.at(i)->segueStartPoint()>lls.at(i)->startPoint()) {
frames=FramesFromMsec(lls.at(i)->segueStartPoint()-
lls.at(i)->startPoint());
current_time=
current_time.addMSecs(lls.at(i)->segueStartPoint()-
lls.at(i)->startPoint());
}
else {
frames=0;
}
}
else {
if(lls.at(i)->endPoint()>lls.at(i)->startPoint()) {
frames=FramesFromMsec(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
current_time=current_time.addMSecs(lls.at(i)->endPoint()-
lls.at(i)->startPoint());
}
else {
frames=0;
}
}
pcm=new float[frames*s->channels()];
memset(pcm,0,frames*s->channels()*sizeof(float));
for(unsigned j=0;j<i;j++) {
Sum(pcm,lls.at(j),frames,s->channels());
}
Sum(pcm,lls.at(i),frames,s->channels());
sf_writef_float(sf_out,pcm,frames);
delete pcm;
pcm=NULL;
lls.at(i)->setRamp(lls.at(i+1)->transType(),lls.at(i)->segueGain());
}
else {
if(i<(lls.size()-1)) {
if(lls.at(i)->type()==RDLogLine::Cart) {
ProgressMessage(current_time,i,tr("FAIL"),lls.at(i)->summary()+
" ("+tr("NO AUDIO AVAILABLE")+")");
render_warnings.
push_back(lls.at(i)->summary()+tr("at line")+
QString().sprintf(" %d ",i)+
tr("failed to play (NO AUDIO AVAILABLE)"));
}
else {
ProgressMessage(current_time,i,tr("SKIP"),lls.at(i)->summary());
}
}
else {
ProgressMessage(current_time,lls.size()-1,
tr("STOP"),tr("--- end of log ---"));
}
}
}
}
sf_close(sf_out);
return true;
}
void RDRenderer::Sum(float *pcm_out,__RDRenderLogLine *ll,sf_count_t frames,
unsigned chans)
{

View File

@ -29,6 +29,7 @@
#include <qstringlist.h>
#include <rdlog_event.h>
#include <rdlogmodel.h>
#include <rdsettings.h>
class __RDRenderLogLine : public RDLogLine
@ -75,11 +76,21 @@ class RDRenderer : public QObject
QString *err_msg,int first_line,int last_line,
const QTime &first_time=QTime(),
const QTime &last_time=QTime());
bool renderToFile(const QString &outfile,RDLogModel *model,RDSettings *s,
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time=QTime(),
const QTime &last_time=QTime());
bool renderToCart(unsigned cartnum,int cutnum,RDLogEvent *log,RDSettings *s,
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time=QTime(),
const QTime &last_time=QTime());
bool renderToCart(unsigned cartnum,int cutnum,RDLogModel *model,RDSettings *s,
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time=QTime(),
const QTime &last_time=QTime());
QStringList warnings() const;
public slots:
@ -94,6 +105,10 @@ class RDRenderer : public QObject
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time,const QTime &last_time);
bool Render(const QString &outfile,RDLogModel *model,RDSettings *s,
const QTime &start_time,bool ignore_stops,
QString *err_msg,int first_line,int last_line,
const QTime &first_time,const QTime &last_time);
void Sum(float *pcm_out,__RDRenderLogLine *ll,sf_count_t frames,
unsigned chans);
bool ConvertAudio(const QString &srcfile,const QString &dstfile,

View File

@ -41,7 +41,7 @@ all:
bin_PROGRAMS = rdlogedit
dist_rdlogedit_SOURCES = add_meta.cpp add_meta.h\
drop_listview.cpp drop_listview.h\
drop_tableview.cpp drop_tableview.h\
edit_chain.cpp edit_chain.h\
edit_event.cpp edit_event.h\
edit_log.cpp edit_log.h\
@ -51,12 +51,13 @@ dist_rdlogedit_SOURCES = add_meta.cpp add_meta.h\
list_listviewitem.cpp list_listviewitem.h\
list_reports.cpp list_reports.h\
log_listview.cpp log_listview.h\
logmodel.cpp logmodel.h\
rdlogedit.cpp rdlogedit.h globals.h\
render_dialog.cpp render_dialog.h\
voice_tracker.cpp voice_tracker.h
nodist_rdlogedit_SOURCES = moc_add_meta.cpp\
moc_drop_listview.cpp\
moc_drop_tableview.cpp\
moc_edit_chain.cpp\
moc_edit_event.cpp\
moc_edit_log.cpp\
@ -65,6 +66,7 @@ nodist_rdlogedit_SOURCES = moc_add_meta.cpp\
moc_edit_track.cpp\
moc_list_reports.cpp\
moc_log_listview.cpp\
moc_logmodel.cpp\
moc_rdlogedit.cpp\
moc_render_dialog.cpp\
moc_voice_tracker.cpp

View File

@ -1,8 +1,8 @@
// drop_listview.cpp
// drop_tableview.cpp
//
// The Log ListView widget for RDLogEdit.
// The Log TableView widget for RDLogEdit.
//
// (C) Copyright 2002-2013,2016 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
@ -19,39 +19,37 @@
//
//
#include <q3header.h>
//Added by qt3to4:
#include <QDropEvent>
#include <QDragEnterEvent>
#include <rdcartdrag.h>
#include <drop_listview.h>
#include "drop_tableview.h"
DropListView::DropListView(QWidget *parent)
: RDListView(parent)
DropTableView::DropTableView(QWidget *parent)
: QTableView(parent)
{
setAcceptDrops(true);
}
void DropListView::dragEnterEvent(QDragEnterEvent *e)
void DropTableView::dragEnterEvent(QDragEnterEvent *e)
{
e->accept(RDCartDrag::canDecode(e));
}
void DropListView::dropEvent(QDropEvent *e)
void DropTableView::dragMoveEvent(QDragMoveEvent *e)
{
e->accept(RDCartDrag::canDecode(e));
}
void DropTableView::dropEvent(QDropEvent *e)
{
RDLogLine ll;
int line=-1;
QPoint pos(e->pos().x(),e->pos().y()-header()->sectionRect(0).height());
int y_pos=e->pos().y();
if(RDCartDrag::decode(e,&ll)) {
RDListViewItem *item=(RDListViewItem *)itemAt(pos);
if(item!=NULL) {
line=item->text(14).toInt();
}
line=rowAt(y_pos);
emit cartDropped(line,&ll);
}
}

View File

@ -1,8 +1,8 @@
// drop_listview.h
// drop_tableview.h
//
// The Log ListView widget for RDLogEdit.
// The Log TableView widget for RDLogEdit.
//
// (C) Copyright 2002-2013,2016 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
@ -19,28 +19,29 @@
//
//
#ifndef DROP_LISTVIEW_H
#define DROP_LISTVIEW_H
#ifndef DROP_TABLEVIEW_H
#define DROP_TABLEVIEW_H
#include <rdlistview.h>
#include <rdlog_line.h>
//Added by qt3to4:
#include <QDropEvent>
#include <QDragEnterEvent>
#include <QTableView>
class DropListView : public RDListView
#include <rdlog_line.h>
class DropTableView : public QTableView
{
Q_OBJECT
public:
DropListView(QWidget *parent);
DropTableView(QWidget *parent);
signals:
void cartDropped(int line,RDLogLine *ll);
protected:
void dragEnterEvent(QDragEnterEvent *e);
void dragMoveEvent(QDragMoveEvent *e);
void dropEvent(QDropEvent *e);
};
#endif // DROP_LISTVIEW_H
#endif // DROP_TABLEVIEW_H

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
//
// Edit a Rivendell Log
//
// (C) Copyright 2002-2019 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
@ -25,20 +25,17 @@
#include <rdcart_dialog.h>
#include <rddialog.h>
#include <rdgroup_list.h>
#include <rdloglock.h>
#include <rdlogmodel.h>
#include <QList>
#include <QStringList>
#include <QTableView>
//#include "drop_listview.h"
#include "drop_tableview.h"
#include "list_reports.h"
#include "logmodel.h"
#include "render_dialog.h"
//
// Widget Settings
//
#define END_MARKER_ID -2
#define RDLOGEDIT_EDITLOG_DEFAULT_WIDTH 950
#define RDLOGEDIT_EDITLOG_DEFAULT_HEIGHT 600
@ -47,7 +44,7 @@ class EditLog : public RDDialog
Q_OBJECT
public:
EditLog(QString logname,QString *filter,QString *group,QString *schedcode,
vector<RDLogLine> *clipboard,vector<QString> *new_logs,
QList<RDLogLine> *clipboard,QStringList *new_logs,
QWidget *parent=0);
~EditLog();
QSize sizeHint() const;
@ -69,8 +66,9 @@ class EditLog : public RDDialog
void timestyleChangedData(int index);
void insertCartButtonData();
void insertMarkerButtonData();
void clickedData(Q3ListViewItem *item);
void selectionChangedData();
void clickedData(const QModelIndex &index);
void selectionChangedData(const QItemSelection &selected,
const QItemSelection &deselected);
void doubleClickedData(const QModelIndex &index);
void editButtonData();
void deleteButtonData();
@ -80,7 +78,6 @@ class EditLog : public RDDialog
void copyButtonData();
void pasteButtonData();
void cartDroppedData(int line,RDLogLine *ll);
void notificationReceivedData(RDNotification *notify);
void saveData();
void saveasData();
void renderasData();
@ -96,25 +93,17 @@ class EditLog : public RDDialog
private:
void DeleteLines(int line,int count);
void SaveLog();
// void RefreshLine(RDListViewItem *item);
// void SetStartTimeField(RDListViewItem *item);
// void RefreshList();
void UpdateSelection();
void RenumberList(int line);
// bool UpdateColor(RDListViewItem *item,RDLogLine *logline);
void SelectRecord(int id);
void UpdateCounters();
void UpdateTracks();
bool DeleteTracks();
bool ValidateSvc();
void LoadClipboard(bool clear_ext);
int SingleSelectionLine();
int SingleSelectionLine(bool incl_end_handle=false);
void SetLogModified(bool state);
void SendNotification(RDNotification::Action action,const QString &log_name);
RDLog *edit_log;
RDLogEvent *edit_log_event;
std::vector<RDLogLine> *edit_clipboard;
QList<RDLogLine> *edit_clipboard;
std::vector<unsigned> edit_deleted_tracks;
std::vector<QString> *edit_newlogs;
QStringList *edit_newlogs;
QString edit_logname;
QString *edit_filter;
QString *edit_group;
@ -135,16 +124,6 @@ class EditLog : public RDDialog
QCheckBox *edit_startdate_box;
QLabel *edit_enddate_label;
QCheckBox *edit_enddate_box;
// DropListView *edit_log_list;
QPixmap *edit_playout_map;
QPixmap *edit_macro_map;
QPixmap *edit_marker_map;
QPixmap *edit_chain_map;
QPixmap *edit_track_cart_map;
QPixmap *edit_notemarker_map;
QPixmap *edit_music_map;
QPixmap *edit_mic16_map;
QPixmap *edit_traffic_map;
QLabel *edit_modified_label;
QLabel *edit_logname_label_label;
QLabel *edit_logname_label;
@ -171,7 +150,6 @@ class EditLog : public RDDialog
RDTransportButton *edit_stop_button;
QPushButton *edit_ok_button;
QPushButton *edit_cancel_button;
RDGroupList edit_group_list;
RDLogLine::TransType edit_default_trans;
int edit_output_card;
int edit_output_port;
@ -190,8 +168,8 @@ class EditLog : public RDDialog
RDLogLock *edit_log_lock;
QPushButton *edit_renderas_button;
RenderDialog *edit_render_dialog;
QTableView *edit_log_view;
RDLogModel *edit_log_model;
DropTableView *edit_log_view;
LogModel *edit_log_model;
};

View File

@ -2,7 +2,7 @@
//
// Edit a Rivendell Log Entry
//
// (C) Copyright 2002-2019 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
@ -24,8 +24,7 @@
EditLogLine::EditLogLine(RDLogLine *line,QString *filter,QString *group,
QString *schedcode,QString svcname,
RDGroupList *grplist,RDLogEvent *log,int lineno,
QWidget *parent)
LogModel *model,int lineno,QWidget *parent)
: EditEvent(line,parent)
{
//
@ -40,8 +39,7 @@ EditLogLine::EditLogLine(RDLogLine *line,QString *filter,QString *group,
edit_group=group;
edit_schedcode=schedcode;
edit_service=svcname;
edit_group_list=grplist;
edit_log_event=log;
edit_log_model=model;
edit_line=lineno;
//
@ -165,7 +163,7 @@ bool EditLogLine::saveData()
}
RDCart *cart=new RDCart(edit_cart_edit->text().toUInt());
if(cart->exists()) {
if(!edit_group_list->isGroupValid(cart->groupName())) {
if(!edit_log_model->groupIsValid(cart->groupName())) {
delete cart;
QMessageBox::warning(this,tr("Disabled Cart"),
tr("This cart belongs to a disabled\ngroup for the specified service!"));

View File

@ -2,7 +2,7 @@
//
// Edit a Rivendell cart event
//
// (C) Copyright 2002-2019 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
@ -22,18 +22,16 @@
#define EDIT_LOGLINE_H
#include <rdcart_dialog.h>
#include <rdlog_event.h>
#include <rdgroup_list.h>
#include "edit_event.h"
#include "logmodel.h"
class EditLogLine : public EditEvent
{
Q_OBJECT
public:
EditLogLine(RDLogLine *,QString *filter,QString *group,QString *schedcode,
QString svcname,RDGroupList *grplist,RDLogEvent *log,int lineno,
QWidget *parent=0);
QString svcname,LogModel *model,int lineno,QWidget *parent=0);
~EditLogLine();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
@ -56,8 +54,7 @@ class EditLogLine : public EditEvent
QString *edit_group;
QString *edit_schedcode;
QString edit_service;
RDGroupList *edit_group_list;
RDLogEvent *edit_log_event;
LogModel *edit_log_model;
int edit_line;
};

View File

@ -2,7 +2,7 @@
//
// List and Generate Log Reports
//
// (C) Copyright 2002-2019 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
@ -32,7 +32,7 @@
ListReports::ListReports(const QString &logname,const QString &description,
const QString service_name,const QDate &start_date,
const QDate &end_date,bool auto_refresh,
RDLogEvent *events,QWidget *parent)
RDLogModel *model,QWidget *parent)
: RDDialog(parent)
{
list_log_name=logname;
@ -41,7 +41,7 @@ ListReports::ListReports(const QString &logname,const QString &description,
list_start_date=start_date;
list_end_date=end_date;
list_auto_refresh=auto_refresh;
list_events=events;
list_model=model;
setWindowTitle("RDLogEdit - "+tr("Reports"));
@ -176,7 +176,6 @@ void ListReports::GenerateLogReport(QString *report)
end_date=list_end_date.toString("MM/dd/yyyy");
}
*report=RDReport::center("Rivendell Log Listing",132)+"\n";
// *report=" Rivendell Log Listing\n";
*report+=QString("Generated: ")+
QDateTime::currentDateTime().toString("MM/dd/yyyy")+" Log: "+
RDReport::leftJustify(list_log_name,30)+
@ -192,8 +191,8 @@ void ListReports::GenerateLogReport(QString *report)
// Generate Event Listing
//
RDLogLine *logline;
for(int i=0;i<list_events->size();i++) {
logline=list_events->logLine(i);
for(int i=0;i<list_model->lineCount();i++) {
logline=list_model->logLine(i);
//
// Type
@ -290,7 +289,7 @@ void ListReports::GenerateLogReport(QString *report)
void ListReports::GenerateExceptionReport(QString *report,const QDate &date)
{
int errs=list_events->validate(report,date);
int errs=list_model->validate(report,date);
if(errs==0) {
QMessageBox::information(this,tr("Log Check"),tr("No exceptions found."));
*report="";

View File

@ -2,7 +2,7 @@
//
// List and Generate Log Reports
//
// (C) Copyright 2002-2019 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
@ -27,6 +27,7 @@
#include <rddialog.h>
#include <rdlog.h>
#include <rdlogmodel.h>
class ListReports : public RDDialog
{
@ -34,7 +35,7 @@ class ListReports : public RDDialog
public:
ListReports(const QString &logname,const QString &description,
const QString service_name,const QDate &start_date,
const QDate &end_date,bool auto_refresh,RDLogEvent *events,
const QDate &end_date,bool auto_refresh,RDLogModel *model,
QWidget *parent=0);
~ListReports();
QSize sizeHint() const;
@ -55,7 +56,7 @@ class ListReports : public RDDialog
QDate list_start_date;
QDate list_end_date;
bool list_auto_refresh;
RDLogEvent *list_events;
RDLogModel *list_model;
Q3DateEdit *list_date_edit;
};

107
rdlogedit/logmodel.cpp Normal file
View File

@ -0,0 +1,107 @@
// logmodel.cpp
//
// Data model for Rivendell logs in RDLogEdit
//
// (C) Copyright 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#include "logmodel.h"
LogModel::LogModel(const QString &logname,QObject *parent)
: RDLogModel(logname,parent)
{
d_group_list=new RDGroupList();
}
LogModel::~LogModel()
{
delete d_group_list;
}
QString LogModel::serviceName() const
{
return d_group_list->serviceName();
}
bool LogModel::groupIsValid(const QString &grpname) const
{
return d_group_list->groupIsValid(grpname);
}
bool LogModel::allGroupsValid() const
{
RDLogLine *ll;
for(int i=0;i<lineCount();i++) {
if((ll=logLine(i))!=NULL) {
if((ll->type()==RDLogLine::Cart)||(ll->type()==RDLogLine::Macro)) {
if(!d_group_list->groupIsValid(ll->groupName())) {
return false;
}
}
}
}
return true;
}
void LogModel::setServiceName(const QString &str)
{
d_group_list->setServiceName(str);
}
QColor LogModel::backgroundColor(int line,RDLogLine *ll) const
{
QDateTime now=QDateTime(QDate::currentDate(),QTime::currentTime());
switch(ll->type()) {
case RDLogLine::Cart:
switch(ll->validity(now)) {
case RDCart::AlwaysValid:
if(d_group_list->groupIsValid(ll->groupName())||
ll->groupName().isEmpty()) {
return RDLogModel::backgroundColor(line,ll);
}
return RD_CART_INVALID_SERVICE_COLOR;
case RDCart::ConditionallyValid:
return RD_CART_CONDITIONAL_COLOR;
case RDCart::FutureValid:
return RD_CART_FUTURE_COLOR;
case RDCart::EvergreenValid:
return RD_CART_EVERGREEN_COLOR;
case RDCart::NeverValid:
return RD_CART_ERROR_COLOR;
}
break;
default:
if(d_group_list->groupIsValid(ll->groupName())||ll->groupName().isEmpty()) {
return RDLogModel::backgroundColor(line,ll);
}
return RD_CART_INVALID_SERVICE_COLOR;
}
return RDLogModel::backgroundColor(line,ll);
}

48
rdlogedit/logmodel.h Normal file
View File

@ -0,0 +1,48 @@
// logmodel.h
//
// Data model for Rivendell logs in RDLogEdit
//
// (C) Copyright 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
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
#ifndef LOGMODEL_H
#define LOGMODEL_H
#include <rdgroup_list.h>
#include <rdlogmodel.h>
class LogModel : public RDLogModel
{
Q_OBJECT
public:
LogModel(const QString &logname,QObject *parent=0);
~LogModel();
QString serviceName() const;
bool groupIsValid(const QString &grpname) const;
bool allGroupsValid() const;
public slots:
void setServiceName(const QString &str);
protected:
QColor backgroundColor(int line,RDLogLine *ll) const;
private:
RDGroupList *d_group_list;
};
#endif // LOGMODEL_H

View File

@ -2,7 +2,7 @@
//
// The Log Editor Utility for Rivendell.
//
// (C) Copyright 2002-2019 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
@ -280,7 +280,7 @@ void MainWidget::addData()
{
QString logname;
QString svcname;
std::vector<QString> newlogs;
QStringList newlogs;
RDAddLog *log;
if(rda->user()->createLog()) {
@ -309,7 +309,7 @@ void MainWidget::addData()
RefreshItem(item);
log_log_list->setSelected(item,true);
log_log_list->ensureItemVisible((Q3ListViewItem *)item);
for(unsigned i=0;i<newlogs.size();i++) {
for(int i=0;i<newlogs.size();i++) {
item=new ListListViewItem(log_log_list);
item->setText(1,newlogs[i]);
RefreshItem(item);
@ -326,14 +326,14 @@ void MainWidget::editData()
return;
}
QString logname=items.at(0)->text(1);
std::vector<QString> newlogs;
QStringList newlogs;
LockList();
EditLog *log=
new EditLog(logname,&log_filter,&log_group,&log_schedcode,
&log_clipboard,&newlogs,this);
if(log->exec()) {
RefreshItem(items.at(0));
for(unsigned i=0;i<newlogs.size();i++) {
for(int i=0;i<newlogs.size();i++) {
ListListViewItem *item=new ListListViewItem(log_log_list);
item->setText(1,newlogs[i]);
RefreshItem(item);

View File

@ -2,7 +2,7 @@
//
// The Log Editor Utility for Rivendell.
//
// (C) Copyright 2002-2019 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
@ -21,6 +21,8 @@
#ifndef RDLOGEDIT_H
#define RDLOGEDIT_H
#include <QList>
#include <rdlog_line.h>
#include <rdlogfilter.h>
#include <rdnotification.h>
@ -77,7 +79,7 @@ class MainWidget : public RDWidget
int log_stream_no;
RDLogFilter *log_filter_widget;
Q3ListView *log_log_list;
std::vector<RDLogLine> log_clipboard;
QList<RDLogLine> log_clipboard;
QPushButton *log_add_button;
QPushButton *log_edit_button;
QPushButton *log_delete_button;

View File

@ -25,7 +25,7 @@
#
SOURCES += add_meta.cpp
SOURCES += drop_listview.cpp
SOURCES += drop_tableview.cpp
SOURCES += edit_chain.cpp
SOURCES += edit_log.cpp
SOURCES += edit_logline.cpp
@ -33,12 +33,13 @@ SOURCES += edit_marker.cpp
SOURCES += edit_track.cpp
SOURCES += list_listviewitem.cpp
SOURCES += list_reports.cpp
SOURCES += logmodel.cpp
SOURCES += rdlogedit.cpp
SOURCES += render_dialog.cpp
SOURCES += voice_tracker.cpp
HEADERS += add_meta.h
HEADERS += drop_listview.h
HEADERS += drop_tableview.h
HEADERS += edit_chain.h
HEADERS += edit_log.h
HEADERS += edit_logline.h
@ -47,6 +48,7 @@ HEADERS += edit_track.h
HEADERS += globals.h
HEADERS += list_listviewitem.h
HEADERS += list_reports.h
HEADERS += logmodel.h
HEADERS += rdlogedit.h
HEADERS += render_dialog.h
HEADERS += voice_tracker.h

View File

@ -258,12 +258,12 @@ popisná data</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>Tento zápis obsahuje jeden nebo více vozíků,
<translation type="obsolete">Tento zápis obsahuje jeden nebo více vozíků,
jež jsou pro vybranou službu neplatné!</translation>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Stopa hlasu</translation>
<translation type="unfinished">Stopa hlasu</translation>
</message>
<message>
<source>The log contains carts that are disabled
@ -385,7 +385,7 @@ jež jsou pro vybranou službu zakázány!</translation>
</message>
<message>
<source>Selected:</source>
<translation type="obsolete">Vybráno:</translation>
<translation type="unfinished">Vybráno:</translation>
</message>
<message>
<source>Delete on</source>
@ -455,6 +455,10 @@ jež jsou pro vybranou službu zakázány!</translation>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -258,12 +258,12 @@ einfügen</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>Dieses Log enthält einen oder mehrere Carts,
<translation type="obsolete">Dieses Log enthält einen oder mehrere Carts,
die für den gewählten Service ungültig sind!</translation>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Voice Track</translation>
<translation type="unfinished">Voice Track</translation>
</message>
<message>
<source>The log contains carts that are disabled
@ -385,7 +385,7 @@ die für den gewählten Service ungültig sind!</translation>
</message>
<message>
<source>Selected:</source>
<translation type="obsolete">Ausgewählt:</translation>
<translation type="unfinished">Ausgewählt:</translation>
</message>
<message>
<source>Delete on</source>
@ -455,6 +455,10 @@ die für den gewählten Service ungültig sind!</translation>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -234,7 +234,7 @@ Meta</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>¡Esta Lista contiene uno o más cartuchos
<translation type="obsolete">¡Esta Lista contiene uno o más cartuchos
que son inválidos para el dispositivo elegido!</translation>
</message>
<message>
@ -327,7 +327,7 @@ Do you want to save your changes?</source>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Pista de voz</translation>
<translation type="unfinished">Pista de voz</translation>
</message>
<message>
<source>LINK</source>
@ -385,7 +385,7 @@ desactivados para el servicio actual!
</message>
<message>
<source>Selected:</source>
<translation type="obsolete">Seleccionado:</translation>
<translation type="unfinished">Seleccionado:</translation>
</message>
<message>
<source>Delete on</source>
@ -459,6 +459,10 @@ desactivados para el servicio actual!
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -147,11 +147,6 @@ Meta</source>
<source>Invalid Carts</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The log contains carts that are disabled
for the selected service!
@ -237,6 +232,18 @@ for the selected service!</source>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Voice Track</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Selected:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -261,12 +261,12 @@ meta</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>Denne loggen inneheld ei eller fleire
<translation type="obsolete">Denne loggen inneheld ei eller fleire
korger som er ugyldige for denne tenesta!</translation>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Røyst-spor</translation>
<translation type="unfinished">Røyst-spor</translation>
</message>
<message>
<source>The log contains carts that are disabled
@ -458,6 +458,14 @@ skrudd av for denne tenesta!</translation>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Selected:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -261,12 +261,12 @@ meta</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>Denne loggen inneheld ei eller fleire
<translation type="obsolete">Denne loggen inneheld ei eller fleire
korger som er ugyldige for denne tenesta!</translation>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Røyst-spor</translation>
<translation type="unfinished">Røyst-spor</translation>
</message>
<message>
<source>The log contains carts that are disabled
@ -458,6 +458,14 @@ skrudd av for denne tenesta!</translation>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Selected:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -280,12 +280,12 @@ Como</translation>
<message>
<source>This log contains one or more carts
that are invalid for the selected service!</source>
<translation>A Lista contém um ou mais cartões
<translation type="obsolete">A Lista contém um ou mais cartões
que são inválidos para o serviço selecionado!</translation>
</message>
<message>
<source>Voice Track</source>
<translation type="obsolete">Faixa de Voz</translation>
<translation type="unfinished">Faixa de Voz</translation>
</message>
<message>
<source>The log contains carts that are disabled
@ -391,7 +391,7 @@ para o serviço selecionado!</translation>
</message>
<message>
<source>Selected:</source>
<translation type="obsolete">Selecionado:</translation>
<translation type="unfinished">Selecionado:</translation>
</message>
<message>
<source>[INVALID CART]</source>
@ -461,6 +461,10 @@ para o serviço selecionado!</translation>
<source>Estimated</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This log contains one or more carts that are invalid for the selected service!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>EditLogLine</name>

View File

@ -173,11 +173,11 @@ QSize RenderDialog::sizeHint() const
}
int RenderDialog::exec(RDUser *user,RDLogEvent *log,
int RenderDialog::exec(RDUser *user,RDLogModel *model,
int first_line,int last_line)
{
render_user=user;
render_log=log;
render_model=model;
render_first_line=first_line;
render_last_line=last_line;
render_filename_edit->clear();
@ -266,7 +266,7 @@ void RenderDialog::renderData()
bool result;
int first_line=0;
int last_line=render_log->size();
int last_line=render_model->lineCount();
if(render_events_box->currentItem()) {
first_line=render_first_line;
last_line=render_last_line;
@ -280,13 +280,13 @@ void RenderDialog::renderData()
connect(render_progress_dialog,SIGNAL(canceled()),r,SLOT(abort()));
if(render_to_box->currentItem()) {
result=
r->renderToFile(render_filename_edit->text(),render_log,render_settings,
r->renderToFile(render_filename_edit->text(),render_model,render_settings,
start_time,render_ignorestop_box->currentItem(),
&err_msg,first_line,last_line);
}
else {
result=
r->renderToCart(render_to_cartnum,render_to_cutnum,render_log,
r->renderToCart(render_to_cartnum,render_to_cutnum,render_model,
render_settings,start_time,
render_ignorestop_box->currentItem(),
&err_msg,first_line,last_line);

View File

@ -26,7 +26,7 @@
#include <rdcut_dialog.h>
#include <rddialog.h>
#include <rdlog_event.h>
#include <rdlogmodel.h>
//
// Widget Settings
@ -44,7 +44,7 @@ class RenderDialog : public RDDialog
QSize sizeHint() const;
public slots:
int exec(RDUser *user,RDLogEvent *log,int first_line,int last_line);
int exec(RDUser *user,RDLogModel *model,int first_line,int last_line);
private slots:
void toChangedData(int item);
@ -65,7 +65,7 @@ class RenderDialog : public RDDialog
RDSystem *render_system;
RDConfig *render_config;
RDUser *render_user;
RDLogEvent *render_log;
RDLogModel *render_model;
int render_first_line;
int render_last_line;
RDSettings *render_settings;