13 #include <QMessageBox> 15 #include <QFileDialog> 16 #include <QStringList> 17 #include <QHeaderView> 37 ui.tableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
38 ui.tableView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
39 ui.tableView->horizontalHeader()->setSectionResizeMode(2, QHeaderView::ResizeToContents);
40 ui.tableView->horizontalHeader()->setSectionResizeMode(3, QHeaderView::Interactive);
41 ui.tableView->horizontalHeader()->setSectionResizeMode(4, QHeaderView::Stretch);
44 ui.tableView->verticalHeader()->setVisible(
false);
46 connect( &
model, &LogsTableModel::rowsInserted,
66 static_cast<ModelFilter::FilterMode>(
ui.comboBoxMessageFilter->currentIndex() ),
68 ui.tableView->resizeColumnToContents(3);
74 static_cast<ModelFilter::FilterMode>( mode ),
75 ui.lineEditMessageFilter->text() );
76 ui.tableView->resizeColumnToContents(4);
81 ui.labelMessageFilter->setEnabled( checked );
82 ui.comboBoxMessageFilter->setEnabled( checked );
83 ui.lineEditMessageFilter->setEnabled( checked );
86 ui.tableView->resizeColumnToContents(4);
92 static_cast<ModelFilter::FilterMode>(
ui.comboBoxLoggerFilter->currentIndex() ),
94 ui.tableView->resizeColumnToContents(3);
100 static_cast<ModelFilter::FilterMode>( mode ),
101 ui.lineEditLoggerFilter->text() );
102 ui.tableView->resizeColumnToContents(3);
107 ui.labelLoggerFilter->setEnabled( checked );
108 ui.comboBoxLoggerFilter->setEnabled( checked );
109 ui.lineEditLoggerFilter->setEnabled( checked );
112 ui.tableView->resizeColumnToContents(3);
117 ui.tableView->scrollToBottom();
123 ui.tableView->resizeColumnToContents(2);
129 ui.tableView->resizeColumnToContents(2);
135 ui.tableView->resizeColumnToContents(2);
141 ui.tableView->resizeColumnToContents(2);
146 using namespace std::chrono;
148 auto msec_since_epoch_A = duration_cast<milliseconds>( time_min.time_since_epoch() );
149 auto datetimeA = QDateTime::fromMSecsSinceEpoch( msec_since_epoch_A.count());
150 ui.timeRangeMin->setDateTime( datetimeA );
154 auto msec_since_epoch_B = duration_cast<milliseconds>( time_max.time_since_epoch() );
155 auto datetimeB = QDateTime::fromMSecsSinceEpoch( msec_since_epoch_B.count());
156 ui.timeRangeMax->setDateTime( datetimeB );
163 ui.tableView->scrollToBottom();
164 ui.tableView->resizeColumnToContents(0);
165 ui.tableView->resizeColumnToContents(1);
std::chrono::high_resolution_clock::time_point TimePoint
void timeMinMaxUpdated(TimePoint min, TimePoint max)
void setNodeFilterEnabled(bool enabled)
void messageFilterUpdated(FilterMode mode, const QString &text)
void setSeverityInfoEnabled(bool enabled)
void setSeverityErrorEnabled(bool enabled)
void setTimeFilterEnabled(bool enabled)
void nodeFilterUpdated(FilterMode mode, const QString &text)
void setSeverityDebugEnabled(bool enabled)
void setSeverityWarningsEnabled(bool enabled)
void setMessageFilterEnabled(bool enabled)