/** * @RDE_HEADER@ * DBUpdate - Show history * $Id$ * $HeadURL$ * $Author$ * Created by Iuliana Ojog, 2021-02-17 */ #include "show_history.h" #include "ui_show_history.h" #include namespace DBUpdate { ShowHistory::ShowHistory(QWidget *parent) : QWidget(parent) , m_ui(new Ui::ShowHistory) , m_logger(getLogger("ShowHistory")) { m_ui->setupUi(this); connect(m_ui->pbClose, &QPushButton::clicked, this, &ShowHistory::onClosedClicked); } ShowHistory::~ShowHistory() { delete m_ui; } bool ShowHistory::init(const QSqlDatabase &db, const QString &schema) { m_model = new HistoryModel(this); m_proxyModel = new HistoryProxyModel(this); m_model->initModel(db, schema); m_proxyModel->setSourceModel(m_model); m_ui->tvHistory->setModel(m_proxyModel); m_ui->tvHistory->resizeColumnsToContents(); return true; } void ShowHistory::onClosedClicked() { close(); } } // namespace DBUpdate