From 773679374b4ce18f60e0192911273c7d0bf76ac8 Mon Sep 17 00:00:00 2001 From: liranbg Date: Mon, 13 Oct 2014 06:49:10 +0300 Subject: [PATCH] fixed resizing calendar dialog --- main/mainscreen.ui | 2 +- .../Calendar/coursesSchedule/calendarDialog.cpp | 6 ++++-- .../Calendar/coursesSchedule/calendarDialog.ui | 13 +++++++++++-- .../Calendar/coursesSchedule/calendarSchedule.cpp | 3 --- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/main/mainscreen.ui b/main/mainscreen.ui index ace596d..a768d0a 100644 --- a/main/mainscreen.ui +++ b/main/mainscreen.ui @@ -74,7 +74,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r QTabWidget::Rounded - 0 + 1 false diff --git a/src/jceData/Calendar/coursesSchedule/calendarDialog.cpp b/src/jceData/Calendar/coursesSchedule/calendarDialog.cpp index bf36e36..cd9984f 100644 --- a/src/jceData/Calendar/coursesSchedule/calendarDialog.cpp +++ b/src/jceData/Calendar/coursesSchedule/calendarDialog.cpp @@ -43,12 +43,14 @@ void CalendarDialog::on_calStart_selectionChanged() { if(ui->calStart->selectedDate() >= ui->calEnd->selectedDate()) //User input is invalid { + changeLabeStatusIcon(false); - ui->lbl_status->setText(tr("The end of the semester can NOT be equal or before the semester begin.")); + ui->lbl_status->setText(tr("Invalid dates interval")); this->isOK = false; } else // input is valid { + this->resize(610,310); changeLabeStatusIcon(true); ui->lbl_status->setText(tr("Looks fine, Click \"OK\"")); this->isOK = true; @@ -69,7 +71,7 @@ void CalendarDialog::on_calEnd_selectionChanged() if(ui->calStart->selectedDate() >= ui->calEnd->selectedDate()) { changeLabeStatusIcon(false); - ui->lbl_status->setText(tr("The end of the semester can NOT be equal or before the semester begin.")); + ui->lbl_status->setText(tr("Invalid dates interval")); this->isOK = false; } diff --git a/src/jceData/Calendar/coursesSchedule/calendarDialog.ui b/src/jceData/Calendar/coursesSchedule/calendarDialog.ui index 863d278..cf08792 100644 --- a/src/jceData/Calendar/coursesSchedule/calendarDialog.ui +++ b/src/jceData/Calendar/coursesSchedule/calendarDialog.ui @@ -6,12 +6,12 @@ 0 0 - 610 + 609 310 - + 0 0 @@ -156,6 +156,15 @@ + + + 0 + 0 + + + + + <b>Please chose your dates correctly</b> diff --git a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp index 6017097..99afda7 100644 --- a/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp +++ b/src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp @@ -1,7 +1,4 @@ #include "calendarSchedule.h" -/* - * BUG: fix resizing when showing error on dates validation - */ calendarSchedule::calendarSchedule(QWidget *parent) : QTableWidget(parent) { QStringList days,hours;