From 7881ec777054dd365b585a023a8d095d9b8f8dfc Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 2 Aug 2018 19:06:07 -0400 Subject: [PATCH] 2018-08-02 Fred Gleason * Modified reports in rdgpimon(1) to display UTF-8 strings correctly. --- ChangeLog | 3 +++ utils/rdgpimon/rdgpimon.cpp | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index be3452d1..481fdc62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17308,3 +17308,6 @@ 2018-08-02 Fred Gleason * Modified reports in rdcastmanager(1) to display UTF-8 strings correctly. +2018-08-02 Fred Gleason + * Modified reports in rdgpimon(1) to display UTF-8 strings + correctly. diff --git a/utils/rdgpimon/rdgpimon.cpp b/utils/rdgpimon/rdgpimon.cpp index 2114b1e0..31bad3c6 100644 --- a/utils/rdgpimon/rdgpimon.cpp +++ b/utils/rdgpimon/rdgpimon.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "rdgpimon.h" @@ -385,14 +386,21 @@ void MainWidget::eventsReportData() QString sql; RDSqlQuery *q; - report=" Rivendell GPIO Event Report\n"; - report+=" Date: "+gpi_events_date_edit->date().toString("MM/dd/yyyy")+ - " Station/Matrix: "+rda->station()->name()+":"+ - QString().sprintf("%d ",gpi_matrix_box->currentItem())+ - " State Filter: "+gpi_events_state_box->currentText()+"\n"; + report=RDReport::center("Rivendell GPIO Event Report",78)+"\n"; + report+= + RDReport::center(QString("Date: ")+ + gpi_events_date_edit->date().toString("MM/dd/yyyy")+ + " "+rda->station()->name()+":"+ + QString().sprintf("%d ",gpi_matrix_box->currentItem())+ + " State Filter: "+ + gpi_events_state_box->currentText(),78)+"\n"; report+="\n"; - sql=QString("select EVENT_DATETIME,NUMBER,EDGE from GPIO_EVENTS where ")+ + sql=QString("select ")+ + "EVENT_DATETIME,"+ // 00 + "NUMBER,"+ // 01 + "EDGE "+ // 02 + "from GPIO_EVENTS where "+ "(STATION_NAME=\""+RDEscapeString(rda->station()->name())+"\")&&"+ QString().sprintf("(MATRIX=%d)&&",gpi_matrix_box->currentItem())+ QString().sprintf("(TYPE=%d)&&",gpi_type_box->currentItem())+