29 #ifndef SODA_LOGTABLE_HDR 30 #define SODA_LOGTABLE_HDR 33 #include <QDesktopWidget> 34 #include <QHeaderView> 35 #include <QTableWidget> 36 #include <QFileDialog> 50 explicit LogTable(QWidget *parent = Q_NULLPTR);
55 void entryUpdated(
int row,
const QString & key,
const QString & val);
58 void logContact(
const QString & from_call,
59 const QString & from_grid,
60 const QString & to_call,
61 const QString & to_grid,
63 const QString & comment,
68 void setKeys(QStringList headers);
69 void setLogFile(
const QString & fname);
71 void writeLogReport(
const QString & fname);
72 void readLogReport(
const QString & fname);
74 void writeLogReportDlg();
75 void readLogReportDlg();
78 void recordChange(
int r,
int c);
82 void readLogFile(
const QString & fname);
83 void recordEdit(
int row,
int col);
87 void setField(
int row,
const QString & key_st,
const QString & st) {
88 int ncol = current_headers.indexOf(key_st);
90 qDebug() << QString(
"Could not find column key [%1] in log table column headers").arg(key_st);
93 setItem(row, ncol,
new QTableWidgetItem(st));
96 void setField(
int row,
const QString & key_st,
double val) {
97 int ncol = current_headers.indexOf(key_st);
99 qDebug() << QString(
"Could not find column key [%1] in log table column headers").arg(key_st);
102 setItem(row, ncol,
new QTableWidgetItem(QString(
"%1").arg(val, 15,
'f')));
113 #endif // SODA_LOGTABLE_HDR QStringList current_headers
void setField(int row, const QString &key_st, double val)
void setField(int row, const QString &key_st, const QString &st)