From 0af4db2641c0c3bcb5e133f2ffeb1e6071092d24 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Sat, 7 Jan 2017 15:19:40 +0100 Subject: [PATCH] Minor UI changes. Added gcc switches to odb compiler. --- odb.pri | 2 +- shop/shop.json | 1 + shop/shopform.cpp | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/odb.pri b/odb.pri index 5459420..ab3dc7b 100644 --- a/odb.pri +++ b/odb.pri @@ -46,7 +46,7 @@ ODB_FLAGS += -I $$PWD/core ODB_FLAGS += -I $$PWD/qdecimal/src ODB_FLAGS += -I $$PWD/qdecimal/decnumber ODB_FLAGS += $$ODB_OTHER_INCLUDES -ODB_FLAGS += -D __PIC__ +ODB_FLAGS += -x -std=c++11 -x -fPIC win32 { ODB_FLAGS += -I d:/prac/odb/libodb-2.4.0 diff --git a/shop/shop.json b/shop/shop.json index 9f54cc6..ccd3cab 100644 --- a/shop/shop.json +++ b/shop/shop.json @@ -57,6 +57,7 @@ CREATE TABLE \"Voucher\" ( "translations" : { "CZ" : { "name" : "Název", + "code" : "Kod", "count" : "Počet", "unitPrice" : "Jednotková cena", "vatRate" : "Procento DPH", diff --git a/shop/shopform.cpp b/shop/shopform.cpp index d62030e..3df7c76 100644 --- a/shop/shopform.cpp +++ b/shop/shopform.cpp @@ -60,6 +60,7 @@ void ShopForm::loadLast() if (m_commodityModel == NULL) { m_commodityModel = new AutoTableModel(this); + m_commodityModel->setTranslations(Context::instance().plugin("SHOP")->translations()); ui->commodityTable->setModel(m_commodityModel); connect(ui->commodityTable->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, const QModelIndex &){ @@ -68,6 +69,8 @@ void ShopForm::loadLast() } m_commodityModel->setData(srv.allSellableItems()); + ui->commodityTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch); + ui->commodityTable->setColumnHidden(3, true); } void ShopForm::fillRaceiptCombo()