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:
Fred Gleason
2021-08-13 10:02:26 -04:00
parent a7ea971910
commit 338465531c
25 changed files with 128 additions and 105 deletions

View File

@@ -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+=" ";

View File

@@ -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