From c3598673c6ddeecce8e24ad01dfe51f3a884ecc7 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Mon, 29 May 2017 22:35:51 +0200 Subject: [PATCH] Improved camp wizard UI. --- camp/campwizard.cpp | 13 ++++++++-- camp/campwizard.ui | 62 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 62 insertions(+), 13 deletions(-) diff --git a/camp/campwizard.cpp b/camp/campwizard.cpp index 5a3d382..8bbf952 100644 --- a/camp/campwizard.cpp +++ b/camp/campwizard.cpp @@ -185,7 +185,16 @@ CampWizard::CampWizard(QWidget *parent) : m_saleBinder->bindToUi(); ui->tabPeople->setModel(m_peopleModel); + ui->tabPeople->hideColumn(0); + ui->tabPeople->hideColumn(1); + ui->tabPeople->hideColumn(4); + ui->tabPeople->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch); + ui->tabServices->setModel(m_itemsModel); + ui->tabServices->hideColumn(1); + ui->tabServices->hideColumn(6); + ui->tabServices->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch); + ui->tabServices->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch); } CampWizard::~CampWizard() @@ -286,8 +295,8 @@ void CampWizard::on_CampWizard_currentIdChanged(int id) m_dataBinder->bindToUi(); m_itemsModel->setData(m_data->services()); - ui->lFrom->setText(m_data->start().toString()); - ui->lTo->setText(m_data->end().toString()); + ui->lFrom->setText(m_data->start().toString("d. M. yyyy")); + ui->lTo->setText(m_data->end().toString("d. M. yyyy")); ui->lDays->setText(QString::number(m_data->start().daysTo(m_data->end()))); ui->lOwner->setText(m_data->ownerAddress()); } diff --git a/camp/campwizard.ui b/camp/campwizard.ui index ae420fa..9e8e78f 100644 --- a/camp/campwizard.ui +++ b/camp/campwizard.ui @@ -448,6 +448,19 @@ ... + + + :/icons/new.svg:/icons/new.svg + + + + 32 + 32 + + + + true + @@ -458,6 +471,19 @@ ... + + + :/icons/remove.svg:/icons/remove.svg + + + + 32 + 32 + + + + true + @@ -698,28 +724,42 @@ + + + + true + + + false + + + QAbstractSpinBox::NoButtons + + + 999999999.990000009536743 + + + - + 75 true - true - - false - - + true - - - - false + + QAbstractSpinBox::NoButtons + + + 999999999.990000009536743 + @@ -792,8 +832,8 @@ tableServices - +