mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-08-12 14:11:11 +02:00
2021-08-13 Fred Gleason <fredg@paravelsystems.com>
* Replaced hard-coded date/time formats with standard formats in all reports and GUI modules. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
a7ea971910
commit
338465531c
@ -22256,3 +22256,6 @@
|
||||
2021-08-12 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Modified reports in rdlogmanager(1) to use standard date/time
|
||||
formats.
|
||||
2021-08-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Replaced hard-coded date/time formats with standard formats in
|
||||
all reports and GUI modules.
|
||||
|
@ -354,6 +354,12 @@ QString RDCoreApplication::shortDateString(const QDate &date) const
|
||||
}
|
||||
|
||||
|
||||
QString RDCoreApplication::shortDateTimeString(const QDateTime &dt) const
|
||||
{
|
||||
return shortDateString(dt.date())+" "+timeString(dt.time());
|
||||
}
|
||||
|
||||
|
||||
QString RDCoreApplication::timeString(const QTime &time,bool padded) const
|
||||
{
|
||||
if(app_show_twelve_hour_time) {
|
||||
@ -368,19 +374,13 @@ QString RDCoreApplication::timeString(const QTime &time,bool padded) const
|
||||
|
||||
QString RDCoreApplication::tenthsTimeString(const QTime &time,bool padded) const
|
||||
{
|
||||
QString ret;
|
||||
|
||||
if(app_show_twelve_hour_time) {
|
||||
if(padded) {
|
||||
ret=time.toString(RD_TWELVE_HOUR_TENTHS_PADDED_FORMAT);
|
||||
return time.toString(RD_TWELVE_HOUR_TENTHS_PADDED_FORMAT);
|
||||
}
|
||||
ret=time.toString(RD_TWELVE_HOUR_TENTHS_FORMAT);
|
||||
return time.toString(RD_TWELVE_HOUR_TENTHS_FORMAT);
|
||||
}
|
||||
else {
|
||||
ret=time.toString(RD_TWENTYFOUR_HOUR_TENTHS_FORMAT);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return time.toString(RD_TWENTYFOUR_HOUR_TENTHS_FORMAT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,6 +75,7 @@ class RDCoreApplication : public QObject
|
||||
QString longDateString(const QDate &date) const;
|
||||
QString shortDateFormat() const;
|
||||
QString shortDateString(const QDate &date) const;
|
||||
QString shortDateTimeString(const QDateTime &dt) const;
|
||||
QString timeString(const QTime &time,bool padded=false) const;
|
||||
QString tenthsTimeString(const QTime &time,bool padded=false) const;
|
||||
bool dropTable(const QString &tbl_name);
|
||||
|
@ -18,6 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdconf.h"
|
||||
#include "rdcutlistmodel.h"
|
||||
#include "rdescape_string.h"
|
||||
@ -327,7 +328,8 @@ void RDCutListModel::updateRow(int row,RDSqlQuery *q)
|
||||
d_texts[d_row_index.at(row)][1]=q->value(2);
|
||||
d_texts[d_row_index.at(row)][2]=RDGetTimeLength(q->value(3).toUInt());
|
||||
if(q->value(5).toUInt()>0) {
|
||||
d_texts[d_row_index.at(row)][3]=q->value(4).toDateTime().toString("M/d/yy");
|
||||
d_texts[d_row_index.at(row)][3]=
|
||||
rda->shortDateString(q->value(4).toDateTime().date());
|
||||
}
|
||||
else {
|
||||
d_texts[d_row_index.at(row)][3]=tr("Never");
|
||||
@ -345,25 +347,26 @@ void RDCutListModel::updateRow(int row,RDSqlQuery *q)
|
||||
}
|
||||
if(!q->value(6).toDateTime().isNull()) {
|
||||
d_texts[d_row_index.at(row)][6]=q->value(7).toString()+" - "+
|
||||
q->value(6).toDateTime().toString("M/d/yy hh:mm:ss");
|
||||
rda->shortDateTimeString(q->value(6).toDateTime());
|
||||
}
|
||||
d_texts[d_row_index.at(row)][7]=q->value(10).toString();
|
||||
if(!q->value(14).toDateTime().isNull()) {
|
||||
d_texts[d_row_index.at(row)][8]=
|
||||
q->value(14).toDateTime().toString("M/d/yyyy hh:mm:ss");
|
||||
rda->shortDateTimeString(q->value(14).toDateTime());
|
||||
}
|
||||
else {
|
||||
d_texts[d_row_index.at(row)][8]=tr("None");
|
||||
}
|
||||
if(!q->value(15).toDateTime().isNull()) {
|
||||
d_texts[d_row_index.at(row)][9]=q->value(15).toDateTime().toString("M/d/yyyy hh:mm:ss");
|
||||
d_texts[d_row_index.at(row)][9]=
|
||||
rda->shortDateTimeString(q->value(15).toDateTime());
|
||||
}
|
||||
else {
|
||||
d_texts[d_row_index.at(row)][9]=tr("None");
|
||||
}
|
||||
if(!q->value(17).isNull()) {
|
||||
d_texts[d_row_index.at(row)][10]=q->value(16).toTime().toString("hh:mm:ss");
|
||||
d_texts[d_row_index.at(row)][11]=q->value(17).toTime().toString("hh:mm:ss");
|
||||
d_texts[d_row_index.at(row)][10]=rda->timeString(q->value(16).toTime());
|
||||
d_texts[d_row_index.at(row)][11]=rda->timeString(q->value(17).toTime());
|
||||
}
|
||||
else {
|
||||
d_texts[d_row_index.at(row)][10]=tr("None");
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdconf.h"
|
||||
#include "rdcart.h"
|
||||
#include "rddb.h"
|
||||
@ -653,7 +654,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Title separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
@ -685,7 +686,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Artist separation");
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
@ -731,7 +732,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q1;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Max. in a Row/Min. Wait for ")+
|
||||
q->value(0).toString()+"\n";
|
||||
schedCL->restore();
|
||||
@ -759,7 +760,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q1;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Do not schedule ")+
|
||||
q->value(0).toString()+" "+QObject::tr("after")+" "+
|
||||
q->value(3).toString()+"\n";
|
||||
@ -787,7 +788,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q1;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Do not schedule")+" "+
|
||||
q->value(0).toString()+" "+QObject::tr("after")+" "+
|
||||
q->value(4).toString()+"\n";
|
||||
@ -815,7 +816,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
delete q1;
|
||||
if(schedCL->getNumberOfItems()==0) {
|
||||
*report+=time.toString("hh:mm:ss")+" "+
|
||||
*report+=rda->timeString(time)+" "+
|
||||
QObject::tr("Rule broken: Do not schedule")+" "+
|
||||
q->value(0).toString()+" "+QObject::tr("after")+" "+
|
||||
q->value(5).toString()+"\n";
|
||||
@ -872,7 +873,7 @@ bool RDEventLine::generateLog(QString logname,const QString &svcname,
|
||||
}
|
||||
else {
|
||||
// We don't have any carts to work with
|
||||
*report+=time.toString("hh:mm:ss")+
|
||||
*report+=rda->timeString(time)+
|
||||
" "+QObject::tr("No carts found in group")+" "+schedGroup();
|
||||
if(!HaveCode().isEmpty()) {
|
||||
*report+=QObject::tr(" with sched code(s): ")+HaveCode()+" "+HaveCode2();
|
||||
@ -1202,14 +1203,14 @@ bool RDEventLine::linkLog(RDLogModel *e,RDLog *log,const QString &svcname,
|
||||
int slop=QTime(0,0,0).msecsTo(end_time)-QTime(0,0,0).msecsTo(time);
|
||||
if(abs(slop)>=event_autofill_slop) {
|
||||
if(slop>0) {
|
||||
*errors+=QString(" ")+time.toString("hh:mm:ss")+
|
||||
*errors+=QString(" ")+rda->timeString(time)+
|
||||
" -- \""+event_name+"\" "+QObject::tr("is underscheduled by")+" "+
|
||||
QTime(0,0,0).addMSecs(slop).toString("hh:mm:ss")+".\n";
|
||||
rda->timeString(QTime(0,0,0).addMSecs(slop))+".\n";
|
||||
}
|
||||
else {
|
||||
*errors+=QString(" ")+time.toString("hh:mm:ss")+
|
||||
*errors+=QString(" ")+rda->timeString(time)+
|
||||
" -- \""+event_name+"\" "+QObject::tr("is overscheduled by")+" "+
|
||||
QTime(0,0,0).addMSecs(-slop).toString("hh:mm:ss")+".\n";
|
||||
rda->timeString(QTime(0,0,0).addMSecs(-slop))+".\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ void RDFeedListModel::updateRow(int row,RDSqlQuery *q)
|
||||
else {
|
||||
d_texts[row][2]="0 / 0"; // Casts
|
||||
}
|
||||
d_texts[row][3]=q->value(7).toDate().toString("MM/dd/yyyy"); // Creation Date
|
||||
d_texts[row][3]=rda->shortDateString(q->value(7).toDate()); // Creation Date
|
||||
d_texts[row][4]=q->value(3).toString(); // Autopost
|
||||
d_texts[row][5]=q->value(4).toString(); // Superfeed
|
||||
d_texts[row][6]=RDFeed::publicUrl(q->value(6).toString(),keyname);
|
||||
@ -614,7 +614,7 @@ void RDFeedListModel::updateRow(int row,RDSqlQuery *q)
|
||||
d_cast_texts[row].push_back(list);
|
||||
d_cast_texts[row].back()[1]=q->value(9); // Item Title
|
||||
d_cast_texts[row].back()[3]=
|
||||
q->value(11).toDateTime().toString("MM/dd/yyyy");
|
||||
rda->shortDateString(q->value(11).toDateTime().date());
|
||||
} while(q->next()&&(q->value(1).toString()==keyname));
|
||||
q->previous();
|
||||
|
||||
|
@ -172,7 +172,7 @@ void RDGpioLogModel::addEvent(int line,bool state)
|
||||
QList<QVariant> texts;
|
||||
|
||||
// Time
|
||||
texts.push_back(QTime::currentTime().toString("hh:mm:ss"));
|
||||
texts.push_back(rda->timeString(QTime::currentTime()));
|
||||
|
||||
// Line
|
||||
texts.push_back(QString().sprintf("%d",line+1));
|
||||
@ -269,7 +269,7 @@ void RDGpioLogModel::updateRow(int row,RDSqlQuery *q)
|
||||
QList<QVariant> texts;
|
||||
|
||||
// Time
|
||||
texts.push_back(q->value(0).toDateTime().toString("hh:mm:ss"));
|
||||
texts.push_back(rda->timeString(q->value(0).toDateTime().time()));
|
||||
|
||||
// Line
|
||||
texts.push_back(QString().sprintf("%d",q->value(1).toInt()));
|
||||
|
@ -351,7 +351,7 @@ void RDLogListModel::updateRow(int row,RDSqlQuery *q)
|
||||
texts.push_back(tr("Always"));
|
||||
}
|
||||
else {
|
||||
texts.push_back(q->value(3).toDate().toString("MM/dd/yyyy"));
|
||||
texts.push_back(rda->shortDateString(q->value(3).toDate()));
|
||||
}
|
||||
icons.push_back(QVariant());
|
||||
|
||||
@ -360,7 +360,7 @@ void RDLogListModel::updateRow(int row,RDSqlQuery *q)
|
||||
texts.push_back(tr("Always"));
|
||||
}
|
||||
else {
|
||||
texts.push_back(q->value(4).toDate().toString("MM/dd/yyyy"));
|
||||
texts.push_back(rda->shortDateString(q->value(4).toDate()));
|
||||
}
|
||||
icons.push_back(QVariant());
|
||||
|
||||
|
@ -371,14 +371,15 @@ int RDLogModel::validate(QString *report,const QDate &date)
|
||||
RDSqlQuery *q;
|
||||
RDSqlQuery *q1;
|
||||
int errs=0;
|
||||
QDateTime now=QDateTime::currentDateTime();
|
||||
|
||||
//
|
||||
// Report Header
|
||||
//
|
||||
*report="Rivendell Log Exception Report\n";
|
||||
*report+=QString("Generated at: ")+
|
||||
QDate::currentDate().toString("MM/dd/yyyy")+" - "+
|
||||
QTime::currentTime().toString("hh:mm:ss")+"\n";
|
||||
rda->shortDateString(now.date())+" - "+
|
||||
rda->timeString(now.time())+"\n";
|
||||
*report+=QString("Log: ")+d_log_name+"\n";
|
||||
*report+=QString("Effective Airdate: ")+date.toString("MM/dd/yyyy")+"\n";
|
||||
*report+="\n";
|
||||
@ -440,7 +441,7 @@ int RDLogModel::validate(QString *report,const QDate &date)
|
||||
q1=new RDSqlQuery(sql);
|
||||
if(!q1->first()) {
|
||||
*report+=QString(" ")+
|
||||
logLine(i)->startTime(RDLogLine::Logged).toString("hh:mm:ss")+
|
||||
rda->timeString(logLine(i)->startTime(RDLogLine::Logged))+
|
||||
QString().sprintf(" - cart %06d [",logLine(i)->cartNumber())+
|
||||
q->value(1).toString()+"] "+QObject::tr("is not playable")+"\n";
|
||||
errs++;
|
||||
|
@ -657,7 +657,7 @@ void RDRenderer::ProgressMessage(const QTime &time,int line,
|
||||
const QString &trans,const QString &msg)
|
||||
{
|
||||
QString str=QString().sprintf("%04d : ",line)+
|
||||
time.toString("hh:mm:ss")+" : "+
|
||||
rda->timeString(time)+" : "+
|
||||
QString().sprintf("%-5s",trans.toUtf8().constData())+msg;
|
||||
emit progressMessageSent(str);
|
||||
}
|
||||
|
@ -1821,7 +1821,7 @@ bool RDSvc::ResolveInlineEvents(const QString &logname,QString *err_msg)
|
||||
q=new RDSqlQuery(sql);
|
||||
if(q->size()>1) {
|
||||
*err_msg+=tr("In event")+" \""+logline->linkEventName()+"\"@"+
|
||||
logline->startTime(RDLogLine::Logged).toString("hh:mm:ss")+":\n";
|
||||
rda->timeString(logline->startTime(RDLogLine::Logged))+":\n";
|
||||
while(q->next()) {
|
||||
*err_msg+=MakeErrorLine(4,q->value(1).toUInt(),
|
||||
tr("multiple inline traffic breaks not permitted within the same music event"));
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Container Class for Audio Meta Data.
|
||||
//
|
||||
// (C) Copyright 2002-2020 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Library General Public License
|
||||
@ -18,10 +18,10 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <qobject.h>
|
||||
#include <QObject>
|
||||
|
||||
#include <rdconf.h>
|
||||
#include <rdwavedata.h>
|
||||
#include "rdconf.h"
|
||||
#include "rdwavedata.h"
|
||||
|
||||
RDWaveData::RDWaveData()
|
||||
{
|
||||
|
@ -208,7 +208,7 @@ EditSystem::EditSystem(QWidget *parent)
|
||||
edit_short_date_label->setFont(labelFont());
|
||||
edit_short_date_edit=new QLineEdit(edit_datetime_group);
|
||||
edit_short_date_edit->setFont(defaultFont());
|
||||
edit_short_date_edit->setMaxLength(32);
|
||||
edit_short_date_edit->setMaxLength(11);
|
||||
|
||||
edit_time_label=
|
||||
new QLabel(tr("Time Format")+":",edit_datetime_group);
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QPainter>
|
||||
|
||||
#include <rdapplication.h>
|
||||
|
||||
#include "stop_counter.h"
|
||||
|
||||
StopCounter::StopCounter(QWidget *parent)
|
||||
@ -131,7 +133,7 @@ void StopCounter::UpdateTime()
|
||||
msecs += 86400000; /* 1 day */
|
||||
}
|
||||
if(stop_running) {
|
||||
text=QTime(0,0,1).addMSecs(msecs).toString("hh:mm:ss");
|
||||
text=rda->timeString(QTime(0,0,1).addMSecs(msecs));
|
||||
p->drawText((sizeHint().width()-2-p->fontMetrics().width(text))/2,59,
|
||||
text);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <rdescape_string.h>
|
||||
#include <rdtextvalidator.h>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "edit_cartevent.h"
|
||||
#include "globals.h"
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
|
||||
#include <rdapplication.h>
|
||||
#include <rdconf.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdrecording.h>
|
||||
@ -130,14 +131,15 @@ void ListReports::GenerateEventReport(QString *report)
|
||||
RDSqlQuery *q1;
|
||||
QString str;
|
||||
bool exists=false;
|
||||
QDateTime now=QDateTime::currentDateTime();
|
||||
|
||||
//
|
||||
// Generate Header
|
||||
//
|
||||
*report=RDReport::center("Rivendell RDCatch Event Report",132)+"\n";
|
||||
*report+=QString("Generated: ")+QDateTime::currentDateTime().toString("MM/dd/yyyy - hh:mm:ss")+"\n";
|
||||
*report+=QString("Generated: ")+rda->shortDateString(now.date())+" "+rda->timeString(now.time())+"\n";
|
||||
*report+="\n";
|
||||
*report+="T -Start-------- -End---------- -Days of Week- -Location----- -Source------------- -Destination-------- -Description-----------------\n";
|
||||
*report+="T -Start----------- -End------------- -Days of Week- -Location----- -Source------------- -Destination-------- -Description-----------------\n";
|
||||
|
||||
//
|
||||
// Generate Rows
|
||||
@ -219,12 +221,12 @@ void ListReports::GenerateEventReport(QString *report)
|
||||
switch((RDRecording::StartType)q->value(1).toInt()) {
|
||||
case RDRecording::HardStart:
|
||||
*report+=QString("Hard: ")+
|
||||
RDReport::leftJustify(q->value(2).toTime().toString("hh:mm:ss"),8)+" ";
|
||||
RDReport::leftJustify(rda->timeString(q->value(2).toTime(),true),11)+" ";
|
||||
break;
|
||||
|
||||
case RDRecording::GpiStart:
|
||||
*report+=QString("Gpi: ")+
|
||||
RDReport::leftJustify(q->value(2).toTime().toString("hh:mm:ss"),8)+" ";
|
||||
RDReport::leftJustify(rda->timeString(q->value(2).toTime(),true),11)+" ";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -236,23 +238,23 @@ void ListReports::GenerateEventReport(QString *report)
|
||||
switch((RDRecording::EndType)q->value(3).toInt()) {
|
||||
case RDRecording::HardEnd:
|
||||
*report+=QString("Hard: ")+
|
||||
RDReport::leftJustify(q->value(4).toTime().toString("hh:mm:ss"),8)+" ";
|
||||
RDReport::leftJustify(rda->timeString(q->value(4).toTime(),true),11)+" ";
|
||||
break;
|
||||
|
||||
case RDRecording::GpiEnd:
|
||||
*report+=QString("Gpi: ")+
|
||||
RDReport::leftJustify(q->value(4).toTime().toString("hh:mm:ss"),8)+" ";
|
||||
RDReport::leftJustify(rda->timeString(q->value(4).toTime(),true),11)+" ";
|
||||
break;
|
||||
|
||||
case RDRecording::LengthEnd:
|
||||
*report+=QString("Len: ")+
|
||||
RDReport::leftJustify(RDGetTimeLength(q->value(5).toInt(),false,false),8)+" ";
|
||||
RDReport::leftJustify(RDGetTimeLength(q->value(5).toInt(),false,false),11)+" ";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
*report+=" ";
|
||||
*report+=" ";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -412,9 +414,14 @@ void ListReports::GenerateXloadReport(QString *report)
|
||||
//
|
||||
*report=RDReport::center("Rivendell RDCatch Upload/Download Report",132)+"\n";
|
||||
*report+=QString("Generated: ")+
|
||||
QDateTime::currentDateTime().toString("MM/dd/yyyy")+"\n";
|
||||
rda->shortDateString(QDateTime::currentDateTime().date())+"\n";
|
||||
*report+="\n";
|
||||
*report+="T -Start-- -Days of Week- -Location----- -Cut------- -URL------------------------------------- -Username---- -Description------------\n";
|
||||
if(rda->showTwelveHourTime()) {
|
||||
*report+="T -Start----- -Days of Week- -Location----- -Cut------- -URL------------------------------------- -Username---- -Description------------\n";
|
||||
}
|
||||
else {
|
||||
*report+="T -Start-- -Days of Week- -Location----- -Cut------- -URL------------------------------------- -Username---- -Description------------\n";
|
||||
}
|
||||
|
||||
//
|
||||
// Generate Rows
|
||||
@ -469,7 +476,12 @@ void ListReports::GenerateXloadReport(QString *report)
|
||||
//
|
||||
// Start Time
|
||||
//
|
||||
*report+=RDReport::leftJustify(q->value(1).toTime().toString("hh:mm:ss"),8)+" ";
|
||||
if(rda->showTwelveHourTime()) {
|
||||
*report+=RDReport::leftJustify(rda->timeString(q->value(1).toTime(),true),11)+" ";
|
||||
}
|
||||
else {
|
||||
*report+=RDReport::leftJustify(rda->timeString(q->value(1).toTime(),true),8)+" ";
|
||||
}
|
||||
|
||||
//
|
||||
// Days of the Week
|
||||
|
@ -451,7 +451,7 @@ MainWidget::MainWidget(RDConfig *c,QWidget *parent)
|
||||
|
||||
QSize MainWidget::sizeHint() const
|
||||
{
|
||||
return QSize(940,600);
|
||||
return QSize(980,600);
|
||||
}
|
||||
|
||||
|
||||
@ -1109,7 +1109,7 @@ void MainWidget::filterActivatedData(int id)
|
||||
void MainWidget::clockData()
|
||||
{
|
||||
QTime current_time=QTime::currentTime().addMSecs(catch_time_offset);
|
||||
catch_clock_label->setText(current_time.toString("hh:mm:ss"));
|
||||
catch_clock_label->setText(rda->timeString(current_time));
|
||||
catch_clock_timer->start(1000-current_time.msec());
|
||||
}
|
||||
|
||||
|
@ -607,13 +607,13 @@ void RecordListModel::updateRow(int row,RDSqlQuery *q)
|
||||
QString().sprintf(" : %dR",q->value(24).toInt());
|
||||
switch((RDRecording::StartType)q->value(30).toUInt()) {
|
||||
case RDRecording::HardStart:
|
||||
texts[2]=tr("Hard")+": "+q->value(4).toTime().toString("hh:mm:ss");
|
||||
texts[2]=tr("Hard")+": "+rda->timeString(q->value(4).toTime());
|
||||
break;
|
||||
|
||||
case RDRecording::GpiStart:
|
||||
texts[2]=tr("Gpi")+": "+q->value(4).toTime().toString("hh:mm:ss")+
|
||||
","+q->value(4).toTime().addMSecs(q->value(31).toInt()).
|
||||
toString("hh:mm:ss")+","+
|
||||
texts[2]=tr("Gpi")+": "+rda->timeString(q->value(4).toTime())+","+
|
||||
rda->timeString(q->value(4).toTime().addMSecs(q->value(31).toInt()))+
|
||||
","+
|
||||
QString().sprintf("%d:%d,",q->value(32).toInt(),q->value(33).toInt())+
|
||||
QTime(0,0,0).addMSecs(q->value(34).toUInt()).toString("mm:ss");
|
||||
break;
|
||||
@ -624,14 +624,14 @@ void RecordListModel::updateRow(int row,RDSqlQuery *q)
|
||||
break;
|
||||
|
||||
case RDRecording::HardEnd:
|
||||
texts[3]=tr("Hard")+": "+q->value(36).toTime().toString("hh:mm:ss");
|
||||
texts[3]=tr("Hard")+": "+rda->timeString(q->value(36).toTime());
|
||||
break;
|
||||
|
||||
case RDRecording::GpiEnd:
|
||||
texts[3]=tr("Gpi")+": "+q->value(36).toTime().toString("hh:mm:ss")+
|
||||
","+q->value(36).toTime().addMSecs(q->value(37).toInt()).
|
||||
toString("hh:mm:ss")+QString().sprintf(",%d:%d",q->value(38).toInt(),
|
||||
q->value(39).toInt());
|
||||
texts[3]=tr("Gpi")+": "+rda->timeString(q->value(36).toTime())+","+
|
||||
rda->timeString(q->value(36).toTime().addMSecs(q->value(37).toInt()))+
|
||||
QString().sprintf(",%d:%d",q->value(38).toInt(),
|
||||
q->value(39).toInt());
|
||||
break;
|
||||
}
|
||||
texts[5]=tr("Cut")+" "+q->value(6).toString();
|
||||
@ -685,7 +685,7 @@ void RecordListModel::updateRow(int row,RDSqlQuery *q)
|
||||
case RDRecording::Playout:
|
||||
texts[1]=q->value(3).toString()+QString().sprintf(" : %dP",
|
||||
q->value(24).toInt()-128);
|
||||
texts[2]=tr("Hard")+": "+q->value(4).toTime().toString("hh:mm:ss");
|
||||
texts[2]=tr("Hard")+": "+rda->timeString(q->value(4).toTime());
|
||||
cut=new RDCut(q->value(6).toString());
|
||||
if(cut->exists()) {
|
||||
texts[3]=tr("Len")+": "+RDGetTimeLength(cut->length(),false,false);
|
||||
@ -703,7 +703,7 @@ void RecordListModel::updateRow(int row,RDSqlQuery *q)
|
||||
|
||||
case RDRecording::SwitchEvent:
|
||||
texts[1]=q->value(3).toString();
|
||||
texts[2]=tr("Hard")+": "+q->value(4).toTime().toString("hh:mm:ss");
|
||||
texts[2]=tr("Hard")+": "+rda->timeString(q->value(4).toTime());
|
||||
texts[4]=GetSourceName(q->value(3).toString(), // Source
|
||||
q->value(24).toInt(),
|
||||
q->value(14).toInt());
|
||||
@ -714,14 +714,14 @@ void RecordListModel::updateRow(int row,RDSqlQuery *q)
|
||||
|
||||
case RDRecording::Download:
|
||||
texts[1]=q->value(3).toString();
|
||||
texts[2]=tr("Hard")+": "+q->value(4).toTime().toString("hh:mm:ss");
|
||||
texts[2]=tr("Hard")+": "+rda->timeString(q->value(4).toTime());
|
||||
texts[4]=q->value(42).toString();
|
||||
texts[5]=tr("Cut")+" "+q->value(6).toString();
|
||||
break;
|
||||
|
||||
case RDRecording::Upload:
|
||||
texts[1]=q->value(3).toString();
|
||||
texts[2]=tr("Hard")+": "+q->value(4).toTime().toString("hh:mm:ss");
|
||||
texts[2]=tr("Hard")+": "+rda->timeString(q->value(4).toTime());
|
||||
texts[4]=tr("Cut")+" "+q->value(6).toString();
|
||||
texts[5]=q->value(42).toString();
|
||||
switch((RDSettings::Format)q->value(20).toInt()) { // Format
|
||||
|
@ -2466,7 +2466,7 @@ void MainObject::ResolveErrorWildcards(CatchEvent *event,
|
||||
rml->replace("%d",event->description());
|
||||
rml->replace("%e",err_desc); // Error Description
|
||||
rml->replace("%i",QString().sprintf("%u",event->id()));
|
||||
rml->replace("%t",event->startTime().toString("hh:mm:ss"));
|
||||
rml->replace("%t",rda->timeString(event->startTime()));
|
||||
rml->replace("%y",RDRecording::typeString(event->type()));
|
||||
switch(event->type()) {
|
||||
case RDRecording::Recording:
|
||||
|
@ -304,10 +304,10 @@ void ListReports::GenerateCutReport(QString *report)
|
||||
if(list_filter.isEmpty()) {
|
||||
filter="[none]";
|
||||
}
|
||||
*report=RDReport::center("Rivendell Cut Report",132)+"\n";
|
||||
*report=RDReport::center("Rivendell Cut Report",136)+"\n";
|
||||
*report+=RDReport::center(QString("Generated: ")+
|
||||
QDateTime::currentDateTime().toString("MM/dd/yyyy - hh:mm:ss")+" Group: "+list_group+" Filter: "+filter,132)+"\n";
|
||||
*report+="-Cart- Cut W/O- -Cart Title-------------- -Description-- -Len- Last Play Plays Start Date End Date -Days of Week- -Daypart-----------\n";
|
||||
QDateTime::currentDateTime().toString("MM/dd/yyyy - hh:mm:ss")+" Group: "+list_group+" Filter: "+filter,136)+"\n";
|
||||
*report+="-Cart- Cut W/O- -Cart Title-------------- -Description-- -Len- Last Play-- Plays Start Date- End Date--- -Days of Week- -Daypart----------------\n";
|
||||
|
||||
//
|
||||
// Generate Rows
|
||||
@ -391,10 +391,10 @@ void ListReports::GenerateCutReport(QString *report)
|
||||
// Last Play
|
||||
//
|
||||
if(q->value(8).toDateTime().isNull()) {
|
||||
*report+=" [none] ";
|
||||
*report+=" [none] ";
|
||||
}
|
||||
else {
|
||||
*report+=RDReport::center(q->value(8).toDate().toString("MM/dd/yy"),10)+" ";
|
||||
*report+=RDReport::center(rda->shortDateString(q->value(8).toDate()),12)+" ";
|
||||
}
|
||||
|
||||
//
|
||||
@ -406,20 +406,20 @@ void ListReports::GenerateCutReport(QString *report)
|
||||
// Start Date
|
||||
//
|
||||
if(q->value(10).toDateTime().isNull()) {
|
||||
*report+=" [none] ";
|
||||
*report+=" [none] ";
|
||||
}
|
||||
else {
|
||||
*report+=RDReport::center(q->value(10).toDateTime().toString("MM/dd/yy"),10)+" ";
|
||||
*report+=RDReport::center(rda->shortDateString(q->value(10).toDateTime().date()),12)+" ";
|
||||
}
|
||||
|
||||
//
|
||||
// End Date
|
||||
//
|
||||
if(q->value(11).toDateTime().isNull()) {
|
||||
*report+=" TFN ";
|
||||
*report+=" TFN ";
|
||||
}
|
||||
else {
|
||||
*report+=RDReport::center(q->value(11).toDateTime().toString("MM/dd/yy"),10)+" ";
|
||||
*report+=RDReport::center(rda->shortDateString(q->value(11).toDateTime().date()),12)+" ";
|
||||
}
|
||||
|
||||
//
|
||||
@ -475,8 +475,8 @@ void ListReports::GenerateCutReport(QString *report)
|
||||
*report+="[none]";
|
||||
}
|
||||
else {
|
||||
*report+=q->value(19).toTime().toString("hh:mm:ss")+" - "+
|
||||
q->value(20).toTime().toString("hh:mm:ss");
|
||||
*report+=rda->timeString(q->value(19).toTime())+" - "+
|
||||
rda->timeString(q->value(20).toTime());
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -168,15 +168,16 @@ void ListReports::GenerateLogReport(QString *report)
|
||||
}
|
||||
QString start_date=tr("[none]");
|
||||
if(!list_start_date.isNull()) {
|
||||
start_date=list_start_date.toString("MM/dd/yyyy");
|
||||
start_date=rda->shortDateString(list_start_date);
|
||||
}
|
||||
QString end_date=tr("[none]");
|
||||
if(!list_end_date.isNull()) {
|
||||
end_date=list_end_date.toString("MM/dd/yyyy");
|
||||
end_date=rda->shortDateString(list_end_date);
|
||||
}
|
||||
*report=RDReport::center("Rivendell Log Listing",132)+"\n";
|
||||
*report+=QString("Generated: ")+
|
||||
QDateTime::currentDateTime().toString("MM/dd/yyyy")+" Log: "+
|
||||
rda->shortDateString(QDate::currentDate())+
|
||||
" Log: "+
|
||||
RDReport::leftJustify(list_log_name,30)+
|
||||
" Description: "+RDReport::leftJustify(list_description,27)+"\n";
|
||||
*report+=QString("Service: ")+RDReport::leftJustify(list_service_name,10)+
|
||||
@ -184,7 +185,7 @@ void ListReports::GenerateLogReport(QString *report)
|
||||
RDReport::leftJustify(start_date,10)+" "+end_date+"\n";
|
||||
|
||||
*report+="\n";
|
||||
*report+="-Type-- -Time---- Trans -Cart- -Group---- -Length- -Title--------------------------- -Artist----------------------- -Source----- Line\n";
|
||||
*report+="-Type-- -Start Time--- Trans -Cart- -Group---- -Length- -Title--------------------------- -Artist----------------------- -Source----- Line\n";
|
||||
|
||||
//
|
||||
// Generate Event Listing
|
||||
@ -202,13 +203,13 @@ void ListReports::GenerateLogReport(QString *report)
|
||||
// Time
|
||||
//
|
||||
if(logline->timeType()==RDLogLine::Hard) {
|
||||
*report+="H";
|
||||
*report+="T";
|
||||
}
|
||||
else {
|
||||
*report+=" ";
|
||||
}
|
||||
if(!logline->startTime(RDLogLine::Imported).isNull()) {
|
||||
*report+=RDReport::leftJustify(logline->startTime(RDLogLine::Logged).toString("hh:mm:ss"),8)+" ";
|
||||
*report+=RDReport::leftJustify(rda->tenthsTimeString(logline->startTime(RDLogLine::Logged),true),13)+" ";
|
||||
}
|
||||
else {
|
||||
*report+=" ";
|
||||
|
@ -456,10 +456,10 @@ void MainWidget::reportData()
|
||||
//
|
||||
// Generate Header
|
||||
//
|
||||
report=RDReport::center("Rivendell Log Listing",132)+"\n";
|
||||
report=RDReport::center("Rivendell Log Listing",135)+"\n";
|
||||
report+=QString("Generated: ")+QDateTime::currentDateTime().toString("MM/dd/yyyy - hh:mm:ss")+"\n";
|
||||
report+="\n";
|
||||
report+="Rdy -Log Name-------------------- -Description----------------- -Service------------ Mus Tfc Tracks- Start Date -End Date- -Mod Date-\n";
|
||||
report+="Rdy -Log Name-------------------- -Description----------------- -Service------------ Mus Tfc Tracks- Start Date- -End Date-- -Mod Date--\n";
|
||||
|
||||
//
|
||||
// Report Body
|
||||
@ -531,34 +531,32 @@ void MainWidget::reportData()
|
||||
// Voice Tracks
|
||||
//
|
||||
report+=
|
||||
QString().sprintf("%3u/%3u ",q->value(8).toUInt(),q->value(7).toUInt());
|
||||
QString().sprintf("%3u/%-3u ",q->value(8).toUInt(),q->value(7).toUInt());
|
||||
|
||||
//
|
||||
// Start Date
|
||||
//
|
||||
if(q->value(9).toDate().isNull()) {
|
||||
report+="[none] ";
|
||||
report+="[none] ";
|
||||
}
|
||||
else {
|
||||
report+=q->value(9).toDate().toString("MM/dd/yyyy")+" ";
|
||||
report+=RDReport::leftJustify(rda->shortDateString(q->value(9).toDate())+" ",12);
|
||||
}
|
||||
|
||||
//
|
||||
// End Date
|
||||
//
|
||||
if(q->value(10).toDate().isNull()) {
|
||||
report+="[none] ";
|
||||
report+="[none] ";
|
||||
}
|
||||
else {
|
||||
report+=q->value(10).toDate().toString("MM/dd/yyyy")+" ";
|
||||
report+=QString().sprintf("%s ",q->value(10).toDate().
|
||||
toString("MM/dd/yyyy").toUtf8().constData());
|
||||
report+=RDReport::leftJustify(rda->shortDateString(q->value(10).toDate())+" ",12);
|
||||
}
|
||||
|
||||
//
|
||||
// Last Modified Date
|
||||
//
|
||||
report+=q->value(11).toDate().toString("MM/dd/yyyy");
|
||||
report+=rda->shortDateString(q->value(11).toDate());
|
||||
|
||||
//
|
||||
// End of Line
|
||||
|
@ -274,7 +274,7 @@ void GenerateLog::createData()
|
||||
if(log->exists()) {
|
||||
if(QMessageBox::question(this,"RDLogManager - "+tr("Log Exists"),
|
||||
tr("The log for")+" "+
|
||||
gen_date_edit->date().toString("MM/dd/yyyy")+" "+
|
||||
rda->shortDateString(gen_date_edit->date())+" "+
|
||||
tr("already exists. Recreating it")+"\n"+
|
||||
tr("will remove any merged Music or Traffic events.")+
|
||||
"\n\n"+tr("Recreate?"),
|
||||
@ -368,7 +368,7 @@ void GenerateLog::musicData()
|
||||
if(log->includeImportMarkers()) {
|
||||
if(QMessageBox::question(this,"RDLogManager - "+tr("Music Exists"),
|
||||
tr("The log for")+" "+
|
||||
gen_date_edit->date().toString("MM/dd/yyyy")+" "+
|
||||
rda->shortDateString(gen_date_edit->date())+" "+
|
||||
tr("already contains merged music and/or traffic data.")+"\n"+
|
||||
tr("Remerging it will remove this data. Remerge?"),
|
||||
QMessageBox::Yes,QMessageBox::No)!=
|
||||
@ -394,7 +394,7 @@ void GenerateLog::musicData()
|
||||
else {
|
||||
QMessageBox::warning(this,"RDLogManager - "+tr("Error"),
|
||||
tr("The log for")+" "+
|
||||
gen_date_edit->date().toString("MM/dd/yyyy")+" "+
|
||||
rda->shortDateString(gen_date_edit->date())+" "+
|
||||
tr("cannot be relinked."));
|
||||
return;
|
||||
}
|
||||
@ -449,7 +449,7 @@ void GenerateLog::trafficData()
|
||||
if(log->includeImportMarkers()) {
|
||||
if(QMessageBox::question(this,"RDLogManager - "+tr("Traffic Exists"),
|
||||
tr("The log for")+" "+
|
||||
gen_date_edit->date().toString("MM/dd/yyyy")+" "+
|
||||
rda->shortDateString(gen_date_edit->date())+" "+
|
||||
tr("already contains merged traffic data.")+"\n"+
|
||||
tr("Remerging it will remove this data. Remerge?"),
|
||||
QMessageBox::Yes,QMessageBox::No)!=
|
||||
@ -462,7 +462,7 @@ void GenerateLog::trafficData()
|
||||
else {
|
||||
QMessageBox::warning(this,"RDLogManager - "+tr("Error"),
|
||||
tr("The log for")+" "+
|
||||
gen_date_edit->date().toString("MM/dd/yyyy")+" "+
|
||||
rda->shortDateString(gen_date_edit->date())+" "+
|
||||
tr("cannot be relinked."));
|
||||
return;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ void SvcRecDialog::deleteData()
|
||||
if(QMessageBox::question(this,tr("Delete Report Data"),
|
||||
tr("Are you sure you want to delete report data for")+
|
||||
" "+
|
||||
date_picker->date().toString("MM/dd/yyyy"),
|
||||
rda->shortDateString(date_picker->date()),
|
||||
QMessageBox::Yes,QMessageBox::No)!=
|
||||
QMessageBox::Yes) {
|
||||
return;
|
||||
|
@ -320,7 +320,7 @@ void MainWidget::eventsReportData()
|
||||
report=RDReport::center("Rivendell GPIO Event Report",78)+"\n";
|
||||
report+=
|
||||
RDReport::center(QString("Date: ")+
|
||||
gpi_events_date_edit->date().toString("MM/dd/yyyy")+
|
||||
rda->shortDateString(gpi_events_date_edit->date())+
|
||||
" "+rda->station()->name()+":"+
|
||||
QString().sprintf("%d ",gpi_matrix_box->currentIndex())+
|
||||
" State Filter: "+
|
||||
@ -349,7 +349,7 @@ void MainWidget::eventsReportData()
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
report+=" ";
|
||||
report+=q->value(0).toDateTime().toString("hh:mm:ss")+" ";
|
||||
report+=rda->timeString(q->value(0).toDateTime().time())+" ";
|
||||
report+=QString().sprintf(" %5d ",q->value(1).toInt());
|
||||
if(q->value(2).toInt()==0) {
|
||||
report+=tr("OFF");
|
||||
|
Loading…
x
Reference in New Issue
Block a user