Log Viewer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

6 months ago
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include "viewmodel/table/ELogColumn.h"
/*************************************************************************************************/
MainWindow::MainWindow(QWidget* parent)
6 months ago
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
6 months ago
prepareTableView();
6 months ago
}
6 months ago
/*************************************************************************************************/
6 months ago
MainWindow::~MainWindow()
{
delete ui;
}
6 months ago
/*************************************************************************************************/
void MainWindow::setTable(QAbstractTableModel* model)
{
ui->tableView->setModel(model);
6 months ago
//ui->tableView->setColumnHidden(ELogColumn::id, true);
//ui->tableView->setColumnHidden(ELogColumn::scope, true);
//ui->tableView->setColumnHidden(ELogColumn::lineno, true);
6 months ago
}
/*************************************************************************************************/
void MainWindow::prepareTableView()
{
ui->tableView->verticalHeader()->setVisible(false);
6 months ago
ui->tableView->horizontalHeader()->setSectionResizeMode(
QHeaderView::ResizeMode::ResizeToContents);
6 months ago
ui->tableView->horizontalHeader()->setSectionsMovable(true);
}