Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+49
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @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 <nglsettings/nglsettings_settings.h>
|
||||
|
||||
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
|
||||
Reference in new issue
Block a user