Commit eb502a67 authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Add headers in comments for different tabs.

parent b6b777a3
...@@ -127,7 +127,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -127,7 +127,7 @@ MainWindow::MainWindow(QWidget *parent) :
MoneyDelegate* monDel = new MoneyDelegate; MoneyDelegate* monDel = new MoneyDelegate;
// ================================================== // ============= Product List =======================
model = new QSqlTableModel; model = new QSqlTableModel;
model->setTable("products"); model->setTable("products");
...@@ -170,7 +170,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -170,7 +170,7 @@ MainWindow::MainWindow(QWidget *parent) :
setProductFilter(); setProductFilter();
// ================================================== // ============= Stock ==============================
QSqlRelationalTableModel* stockModel = new QSqlRelationalTableModel(); QSqlRelationalTableModel* stockModel = new QSqlRelationalTableModel();
stockModel->setTable("stock"); stockModel->setTable("stock");
...@@ -186,7 +186,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -186,7 +186,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->stockView->header()->setSectionResizeMode(0, QHeaderView::Stretch); ui->stockView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
ui->stockView->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->stockView->setEditTriggers(QAbstractItemView::NoEditTriggers);
// ================================================== // ============= Acquisitions =======================
QSqlQuery("UPDATE my_db_settings SET value = 0 WHERE name = 'acquisitions_temp_transfer'"); QSqlQuery("UPDATE my_db_settings SET value = 0 WHERE name = 'acquisitions_temp_transfer'");
QSqlQuery("DELETE FROM acquisitions_temp"); QSqlQuery("DELETE FROM acquisitions_temp");
...@@ -246,7 +246,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -246,7 +246,7 @@ MainWindow::MainWindow(QWidget *parent) :
acView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); acView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
acView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); acView->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
// ================================================== // ============== Stock Check =======================
clear_stockDiffTemp(); clear_stockDiffTemp();
...@@ -280,13 +280,13 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -280,13 +280,13 @@ MainWindow::MainWindow(QWidget *parent) :
ui->quickInventoryCheckBox->setChecked(true); ui->quickInventoryCheckBox->setChecked(true);
// -------------------------------------------------- // -------------- Money Check -----------------------
setMoneyDiffLabels(); setMoneyDiffLabels();
ui->diffDrawer->setValidator(anyIntVal); ui->diffDrawer->setValidator(anyIntVal);
// ================================================== // ============== Drainage ==========================
// TODO some of these things possibly should requery under usage // TODO some of these things possibly should requery under usage
// Autoupdate, as it's called // Autoupdate, as it's called
...@@ -321,7 +321,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -321,7 +321,7 @@ MainWindow::MainWindow(QWidget *parent) :
// TODO past drainages // TODO past drainages
// ================================================== // ============= Money ==============================
QSqlTableModel* accModel = new QSqlTableModel(); QSqlTableModel* accModel = new QSqlTableModel();
ui->accTreeView->setModel(accModel); ui->accTreeView->setModel(accModel);
...@@ -351,7 +351,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -351,7 +351,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->moneyTransferHistory->header()->setSectionResizeMode(QHeaderView::ResizeToContents); ui->moneyTransferHistory->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
// ================================================== // ============= SQL ================================
QSqlQueryModel* sqlQueryModel = new QSqlQueryModel; QSqlQueryModel* sqlQueryModel = new QSqlQueryModel;
ui->sqlOutput->setModel(sqlQueryModel); ui->sqlOutput->setModel(sqlQueryModel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment