From 8a5f99279cf447bb7b04d814fc65d6c4caa1793c Mon Sep 17 00:00:00 2001 From: liranbg Date: Fri, 12 Sep 2014 11:43:55 +0300 Subject: [PATCH 1/2] fix null ptr on exportCalendarCSV --- jceGrade.pro | 134 ++++---- main/CalendarTab/CalendarManager.cpp | 2 +- src/jceData/Calendar/calendarCourse.h | 136 ++++---- src/jceData/Calendar/calendarPage.cpp | 214 ++++++------ src/jceData/Calendar/calendarPage.h | 68 ++-- src/jceData/Calendar/calendardialog.cpp | 158 ++++----- src/jceData/Calendar/calendardialog.h | 70 ++-- src/jceData/Calendar/calendardialog.ui | 420 ++++++++++++------------ 8 files changed, 602 insertions(+), 600 deletions(-) diff --git a/jceGrade.pro b/jceGrade.pro index e8174e4..9e91aed 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -1,67 +1,67 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-05-31T19:49:42 -# -#------------------------------------------------- - -QT += core gui network widgets -TARGET = jceGrade -TEMPLATE = app -RC_FILE = appConfigure.rc -CONFIG += qt c++11 -CONFIG += console static - -TRANSLATIONS = jce_en.ts \ - jce_he.ts - - -FORMS += \ - main/mainscreen.ui \ - src/jceData/Calendar/calendardialog.ui - -OTHER_FILES += - -RESOURCES += \ - resources/connectionstatus.qrc - -HEADERS += \ - main/CalendarTab/CalendarManager.h \ - main/CourseTab/coursestablemanager.h \ - main/LoginTab/loginhandler.h \ - main/mainscreen.h \ - src/appDatabase/savedata.h \ - src/jceConnection/jcesslclient.h \ - src/jceData/Calendar/calendarPage.h \ - src/jceData/Grades/gradeCourse.h \ - src/jceData/Grades/gradePage.h \ - src/jceData/course.h \ - src/jceData/page.h \ - src/jceSettings/jcelogin.h \ - src/jceSettings/jceLoginHtmlScripts.h \ - src/jceSettings/user.h \ - src/jceData/Calendar/calendarCourse.h \ - src/jceData/Calendar/calendarSchedule.h \ - src/jceData/CSV/csv_exporter.h \ - src/appDatabase/simplecrypt.h \ - src/jceData/Calendar/calendardialog.h - -SOURCES += \ - main/CalendarTab/CalendarManager.cpp \ - main/CourseTab/coursestablemanager.cpp \ - main/LoginTab/loginhandler.cpp \ - main/main.cpp \ - main/mainscreen.cpp \ - src/appDatabase/savedata.cpp \ - src/jceConnection/jcesslclient.cpp \ - src/jceData/Calendar/calendarPage.cpp \ - src/jceData/Grades/gradeCourse.cpp \ - src/jceData/Grades/gradePage.cpp \ - src/jceData/page.cpp \ - src/jceSettings/jcelogin.cpp \ - src/jceSettings/user.cpp \ - src/jceData/Calendar/calendarCourse.cpp \ - src/jceData/Calendar/calendarSchedule.cpp \ - src/jceData/CSV/csv_exporter.cpp \ - src/appDatabase/simplecrypt.cpp \ - src/jceData/Calendar/calendardialog.cpp - +#------------------------------------------------- +# +# Project created by QtCreator 2014-05-31T19:49:42 +# +#------------------------------------------------- + +QT += core gui network widgets +TARGET = jceGrade +TEMPLATE = app +RC_FILE = appConfigure.rc +CONFIG += qt c++11 +CONFIG += console static + +TRANSLATIONS = jce_en.ts \ + jce_he.ts + + +FORMS += \ + main/mainscreen.ui \ + src/jceData/Calendar/calendardialog.ui + +OTHER_FILES += + +RESOURCES += \ + resources/connectionstatus.qrc + +HEADERS += \ + main/CalendarTab/CalendarManager.h \ + main/CourseTab/coursestablemanager.h \ + main/LoginTab/loginhandler.h \ + main/mainscreen.h \ + src/appDatabase/savedata.h \ + src/jceConnection/jcesslclient.h \ + src/jceData/Calendar/calendarPage.h \ + src/jceData/Grades/gradeCourse.h \ + src/jceData/Grades/gradePage.h \ + src/jceData/course.h \ + src/jceData/page.h \ + src/jceSettings/jcelogin.h \ + src/jceSettings/jceLoginHtmlScripts.h \ + src/jceSettings/user.h \ + src/jceData/Calendar/calendarCourse.h \ + src/jceData/Calendar/calendarSchedule.h \ + src/jceData/CSV/csv_exporter.h \ + src/appDatabase/simplecrypt.h \ + src/jceData/Calendar/calendardialog.h + +SOURCES += \ + main/CalendarTab/CalendarManager.cpp \ + main/CourseTab/coursestablemanager.cpp \ + main/LoginTab/loginhandler.cpp \ + main/main.cpp \ + main/mainscreen.cpp \ + src/appDatabase/savedata.cpp \ + src/jceConnection/jcesslclient.cpp \ + src/jceData/Calendar/calendarPage.cpp \ + src/jceData/Grades/gradeCourse.cpp \ + src/jceData/Grades/gradePage.cpp \ + src/jceData/page.cpp \ + src/jceSettings/jcelogin.cpp \ + src/jceSettings/user.cpp \ + src/jceData/Calendar/calendarCourse.cpp \ + src/jceData/Calendar/calendarSchedule.cpp \ + src/jceData/CSV/csv_exporter.cpp \ + src/appDatabase/simplecrypt.cpp \ + src/jceData/Calendar/calendardialog.cpp + diff --git a/main/CalendarTab/CalendarManager.cpp b/main/CalendarTab/CalendarManager.cpp index 7851a2b..865a67d 100644 --- a/main/CalendarTab/CalendarManager.cpp +++ b/main/CalendarTab/CalendarManager.cpp @@ -12,7 +12,7 @@ void CalendarManager::setCalendar(std::string html) } void CalendarManager::exportCalendarCSV() //need to add fix to the null pointer bug { - if (caliSchedPtr->getCourses()->empty()) + if (caliSchedPtr->getCourses() == NULL) return; QMessageBox msgBox; int buttonClicked = caliDialog->exec(); diff --git a/src/jceData/Calendar/calendarCourse.h b/src/jceData/Calendar/calendarCourse.h index 9c585a5..05b05f6 100644 --- a/src/jceData/Calendar/calendarCourse.h +++ b/src/jceData/Calendar/calendarCourse.h @@ -1,68 +1,68 @@ -#ifndef CALENDARCOURSE_H -#define CALENDARCOURSE_H - -#include "../course.h" -#include -#include -#include - -#include - -#define CALENDAR_COURSE_FIELDS 8 - -class calendarCourse : public Course -{ -public: - enum CourseScheme - { - SERIAL, - NAME, - TYPE, - LECTURER, - POINTS, - SEM_HOURS, - DAY_AND_HOURS, - ROOM - }; - calendarCourse(int serial, std::string name, std::string type, std::string lecturer, - double points, double semesterHours, std::string dayAndHour, std::string room); - ~calendarCourse(){} - - int getDay() const; - std::string getLecturer() const; - std::string getRoom() const; - double getSemesterHours() const; - int getHourBegin() const; - int getMinutesBegin() const; - int getHourEnd() const; - int getMinutesEnd() const; - - void setDay(const std::string &value); - void setLecturer(const std::string &value); - void setRoom(const std::string &value); - void setSemesterHours(double value); - void setHourBegin(int value); - void setMinutesBegin(int value); - void setHourEnd(int value); - void setMinutesEnd(int value); - - std::string courseToString(); - - -private: - - void setDayAndHour(std::string phrase); - - std::string lecturer; - double semesterHours; - int day; - int hourBegin; - int minutesBegin; - int hourEnd; - int minutesEnd; - std::string room; - -}; - - -#endif // CALENDARCOURSE_H +#ifndef CALENDARCOURSE_H +#define CALENDARCOURSE_H + +#include "../course.h" +#include +#include +#include + +#include + +#define CALENDAR_COURSE_FIELDS 8 + +class calendarCourse : public Course +{ +public: + enum CourseScheme + { + SERIAL, + NAME, + TYPE, + LECTURER, + POINTS, + SEM_HOURS, + DAY_AND_HOURS, + ROOM + }; + calendarCourse(int serial, std::string name, std::string type, std::string lecturer, + double points, double semesterHours, std::string dayAndHour, std::string room); + ~calendarCourse(){} + + int getDay() const; + std::string getLecturer() const; + std::string getRoom() const; + double getSemesterHours() const; + int getHourBegin() const; + int getMinutesBegin() const; + int getHourEnd() const; + int getMinutesEnd() const; + + void setDay(const std::string &value); + void setLecturer(const std::string &value); + void setRoom(const std::string &value); + void setSemesterHours(double value); + void setHourBegin(int value); + void setMinutesBegin(int value); + void setHourEnd(int value); + void setMinutesEnd(int value); + + std::string courseToString(); + + +private: + + void setDayAndHour(std::string phrase); + + std::string lecturer; + double semesterHours; + int day; + int hourBegin; + int minutesBegin; + int hourEnd; + int minutesEnd; + std::string room; + +}; + + +#endif // CALENDARCOURSE_H diff --git a/src/jceData/Calendar/calendarPage.cpp b/src/jceData/Calendar/calendarPage.cpp index 71d93d4..72e8056 100644 --- a/src/jceData/Calendar/calendarPage.cpp +++ b/src/jceData/Calendar/calendarPage.cpp @@ -1,106 +1,108 @@ -#include "calendarPage.h" - -std::string CalendarPage::htmlToString() -{ - return tempHtml; -} - -void CalendarPage::setPage(std::string html) -{ - courses = new std::list(); - tempHtml = getString(html); - tempHtml = tokenToLines(tempHtml); - calendarListInit(tempHtml); -} - -std::string CalendarPage::tokenToLines(std::string &textToPhrase) -{ - int ctr = 0; - std::string temp = ""; - char *tok; - char* textToTok = strdup(textToPhrase.c_str()); - tok = strtok(textToTok, "\n"); - while(tok != NULL) - { - //amount of data before the actual needed data and no empty lines - if (strcmp(tok," \t ") != 0) - { - temp += tok; - temp += "\n"; - } - ctr++; - tok = strtok(NULL, "\n"); - } - return temp; -} - -void CalendarPage::calendarListInit(std::string &linesTokinzedString) -{ - std::list stringHolder; - std::string temp; - calendarCourse * cTemp = NULL; - char* tok; - char* textToTok = strdup(linesTokinzedString.c_str()); - tok = strtok(textToTok,"\n"); - while (tok != NULL) - { - temp = tok; - stringHolder.push_back(temp); - tok = strtok(NULL, "\n"); - } - for(std::string temp: stringHolder) - { - cTemp = lineToCourse(temp); - if (cTemp != NULL) - courses->push_back(cTemp); - } -} - -calendarCourse *CalendarPage::lineToCourse(std::string line) -{ - - calendarCourse *tempC = NULL; - std::string templinearray[CALENDAR_COURSE_FIELDS];//[serial,name,type,lecturer,points,semesterhours,dayandhours,room] - int serial; - double points,semesterHours; - std::string name,type, lecturer,dayAndHour,room; - std::string tempS = ""; - std::string emptyTab = " "; - int i = 0; - char* tok; - char* cLine = strdup(line.c_str()); - tok = strtok(cLine, "\t"); - while(tok != NULL) - { - - tempS = tok; - if (i>=1) - templinearray[i-1] = tempS; - i++; - if (i > 8) - break; - tok=strtok(NULL, "\t"); - } - if (templinearray[0] == "") //empty phrasing - return NULL; - serial = stoi(templinearray[calendarCourse::CourseScheme::SERIAL]); - name = templinearray[calendarCourse::CourseScheme::NAME]; - type = templinearray[calendarCourse::CourseScheme::TYPE]; - lecturer = templinearray[calendarCourse::CourseScheme::LECTURER]; - - if (templinearray[calendarCourse::CourseScheme::POINTS].compare(" ") == 0) - points = stod(templinearray[calendarCourse::CourseScheme::POINTS]); - else - points = 0; - if (templinearray[calendarCourse::CourseScheme::SEM_HOURS].compare(" ") == 0) - semesterHours = stod(templinearray[calendarCourse::CourseScheme::SEM_HOURS]); - else - semesterHours = 0; - dayAndHour = templinearray[calendarCourse::CourseScheme::DAY_AND_HOURS]; - room = templinearray[calendarCourse::CourseScheme::ROOM]; - - - tempC = new calendarCourse(serial,name,type,lecturer,points,semesterHours,dayAndHour,room); - - return tempC; -} +#include "calendarPage.h" + +std::string CalendarPage::htmlToString() +{ + return tempHtml; +} + +void CalendarPage::setPage(std::string html) +{ + + courses = new std::list(); + tempHtml = getString(html); + tempHtml = tokenToLines(tempHtml); + calendarListInit(tempHtml); + +} + +std::string CalendarPage::tokenToLines(std::string &textToPhrase) +{ + int ctr = 0; + std::string temp = ""; + char *tok; + char* textToTok = strdup(textToPhrase.c_str()); + tok = strtok(textToTok, "\n"); + while(tok != NULL) + { + //amount of data before the actual needed data and no empty lines + if (strcmp(tok," \t ") != 0) + { + temp += tok; + temp += "\n"; + } + ctr++; + tok = strtok(NULL, "\n"); + } + return temp; +} + +void CalendarPage::calendarListInit(std::string &linesTokinzedString) +{ + std::list stringHolder; + std::string temp; + calendarCourse * cTemp = NULL; + char* tok; + char* textToTok = strdup(linesTokinzedString.c_str()); + tok = strtok(textToTok,"\n"); + while (tok != NULL) + { + temp = tok; + stringHolder.push_back(temp); + tok = strtok(NULL, "\n"); + } + for(std::string temp: stringHolder) + { + cTemp = lineToCourse(temp); + if (cTemp != NULL) + courses->push_back(cTemp); + } +} + +calendarCourse *CalendarPage::lineToCourse(std::string line) +{ + + calendarCourse *tempC = NULL; + std::string templinearray[CALENDAR_COURSE_FIELDS];//[serial,name,type,lecturer,points,semesterhours,dayandhours,room] + int serial; + double points,semesterHours; + std::string name,type, lecturer,dayAndHour,room; + std::string tempS = ""; + std::string emptyTab = " "; + int i = 0; + char* tok; + char* cLine = strdup(line.c_str()); + tok = strtok(cLine, "\t"); + while(tok != NULL) + { + + tempS = tok; + if (i>=1) + templinearray[i-1] = tempS; + i++; + if (i > 8) + break; + tok=strtok(NULL, "\t"); + } + if (templinearray[0] == "") //empty phrasing + return NULL; + serial = stoi(templinearray[calendarCourse::CourseScheme::SERIAL]); + name = templinearray[calendarCourse::CourseScheme::NAME]; + type = templinearray[calendarCourse::CourseScheme::TYPE]; + lecturer = templinearray[calendarCourse::CourseScheme::LECTURER]; + + if (templinearray[calendarCourse::CourseScheme::POINTS].compare(" ") == 0) + points = stod(templinearray[calendarCourse::CourseScheme::POINTS]); + else + points = 0; + if (templinearray[calendarCourse::CourseScheme::SEM_HOURS].compare(" ") == 0) + semesterHours = stod(templinearray[calendarCourse::CourseScheme::SEM_HOURS]); + else + semesterHours = 0; + dayAndHour = templinearray[calendarCourse::CourseScheme::DAY_AND_HOURS]; + room = templinearray[calendarCourse::CourseScheme::ROOM]; + + + tempC = new calendarCourse(serial,name,type,lecturer,points,semesterHours,dayAndHour,room); + + return tempC; +} diff --git a/src/jceData/Calendar/calendarPage.h b/src/jceData/Calendar/calendarPage.h index d1e7e38..cc7e13c 100644 --- a/src/jceData/Calendar/calendarPage.h +++ b/src/jceData/Calendar/calendarPage.h @@ -1,34 +1,34 @@ -#ifndef CALENDARPAGE_H -#define CALENDARPAGE_H - -#include "../page.h" -#include "calendarCourse.h" -#include -#include //strlen and strtok to phrase the html file -#include //checks if character is numeric - -class CalendarPage : public Page -{ -public: - - std::string htmlToString(); - std::list* getCourses() { return courses; } - - -protected: - virtual void setPage(std::string html); -CalendarPage() { } - - -private: - std::string tokenToLines(std::string& textToPhrase); - void calendarListInit(std::string& linesTokinzedString); - calendarCourse* lineToCourse(std::string line); - - std::string tempHtml; - std::list* courses; - - -}; - -#endif // CALENDARPAGE_H +#ifndef CALENDARPAGE_H +#define CALENDARPAGE_H + +#include "../page.h" +#include "calendarCourse.h" +#include +#include //strlen and strtok to phrase the html file +#include //checks if character is numeric + +class CalendarPage : public Page +{ +public: + + std::string htmlToString(); + std::list* getCourses() { return courses; } + + +protected: + virtual void setPage(std::string html); +CalendarPage() { } + + +private: + std::string tokenToLines(std::string& textToPhrase); + void calendarListInit(std::string& linesTokinzedString); + calendarCourse* lineToCourse(std::string line); + + std::string tempHtml; + std::list* courses; + + +}; + +#endif // CALENDARPAGE_H diff --git a/src/jceData/Calendar/calendardialog.cpp b/src/jceData/Calendar/calendardialog.cpp index e1e3115..4ca3c93 100644 --- a/src/jceData/Calendar/calendardialog.cpp +++ b/src/jceData/Calendar/calendardialog.cpp @@ -1,79 +1,79 @@ -#include "calendardialog.h" -#include "ui_calendardialog.h" - - -CalendarDialog::CalendarDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::CalendarDialog) -{ - ui->setupUi(this); - changeLabeStatusIcon(true);//be default the dates are ok, i Updated it according to jce official dates - this->isOK = true; -} - -CalendarDialog::~CalendarDialog() -{ - delete ui; -} - -QDate CalendarDialog::getStartDate() -{ - return ui->calStart->selectedDate(); -} - -QDate CalendarDialog::getEndDate() -{ - return ui->calEnd->selectedDate(); -} - -bool CalendarDialog::ok() -{ - return this->isOK; -} -void CalendarDialog::on_calStart_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 semester begins.")); - this->isOK = false; - } - else - { - changeLabeStatusIcon(true); - ui->lbl_status->setText(tr("Looks ok, Press OK")); - this->isOK = true; - } -} - -void CalendarDialog::on_buttonBox_accepted() -{ - if(ui->calStart->selectedDate() > ui->calEnd->selectedDate()) - qDebug() << "start bigger than end!"; -} - -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 semester begins.")); - this->isOK = false; - } - else - { - changeLabeStatusIcon(true); - ui->lbl_status->setText(tr("Looks ok, Press OK")); - this->isOK = true; - } - -} - -void CalendarDialog::changeLabeStatusIcon(bool goodOrBad) -{ - if (goodOrBad == true) //good date! - iconPixStatus.load(":/icons/iconV.png"); - else - iconPixStatus.load(":/icons/iconX.png"); - this->ui->labelIconStatus->setPixmap(iconPixStatus); -} +#include "calendardialog.h" +#include "ui_calendardialog.h" + + +CalendarDialog::CalendarDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::CalendarDialog) +{ + ui->setupUi(this); + changeLabeStatusIcon(true);//be default the dates are ok, i Updated it according to jce official dates + this->isOK = true; +} + +CalendarDialog::~CalendarDialog() +{ + delete ui; +} + +QDate CalendarDialog::getStartDate() +{ + return ui->calStart->selectedDate(); +} + +QDate CalendarDialog::getEndDate() +{ + return ui->calEnd->selectedDate(); +} + +bool CalendarDialog::ok() +{ + return this->isOK; +} +void CalendarDialog::on_calStart_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 semester begins.")); + this->isOK = false; + } + else + { + changeLabeStatusIcon(true); + ui->lbl_status->setText(tr("Looks ok, Press OK")); + this->isOK = true; + } +} + +void CalendarDialog::on_buttonBox_accepted() +{ + if(ui->calStart->selectedDate() > ui->calEnd->selectedDate()) + qDebug() << "start bigger than end!"; +} + +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 semester begins.")); + this->isOK = false; + } + else + { + changeLabeStatusIcon(true); + ui->lbl_status->setText(tr("Looks ok, Press OK")); + this->isOK = true; + } + +} + +void CalendarDialog::changeLabeStatusIcon(bool goodOrBad) +{ + if (goodOrBad == true) //good date! + iconPixStatus.load(":/icons/iconV.png"); + else + iconPixStatus.load(":/icons/iconX.png"); + this->ui->labelIconStatus->setPixmap(iconPixStatus); +} diff --git a/src/jceData/Calendar/calendardialog.h b/src/jceData/Calendar/calendardialog.h index e0c6edc..1c7ee38 100644 --- a/src/jceData/Calendar/calendardialog.h +++ b/src/jceData/Calendar/calendardialog.h @@ -1,35 +1,35 @@ -#ifndef CALENDARDIALOG_H -#define CALENDARDIALOG_H - -#include -#include -#include - -namespace Ui { -class CalendarDialog; -} - -class CalendarDialog : public QDialog -{ - Q_OBJECT - -public: - explicit CalendarDialog(QWidget *parent = 0); - ~CalendarDialog(); - QDate getStartDate(); - QDate getEndDate(); - bool ok(); - -private slots: - void on_calStart_selectionChanged(); - void on_calEnd_selectionChanged(); - void on_buttonBox_accepted(); - -private: - void changeLabeStatusIcon(bool goodOrBad); - Ui::CalendarDialog *ui; - bool isOK; - QPixmap iconPixStatus; -}; - -#endif // CALENDARDIALOG_H +#ifndef CALENDARDIALOG_H +#define CALENDARDIALOG_H + +#include +#include +#include + +namespace Ui { +class CalendarDialog; +} + +class CalendarDialog : public QDialog +{ + Q_OBJECT + +public: + explicit CalendarDialog(QWidget *parent = 0); + ~CalendarDialog(); + QDate getStartDate(); + QDate getEndDate(); + bool ok(); + +private slots: + void on_calStart_selectionChanged(); + void on_calEnd_selectionChanged(); + void on_buttonBox_accepted(); + +private: + void changeLabeStatusIcon(bool goodOrBad); + Ui::CalendarDialog *ui; + bool isOK; + QPixmap iconPixStatus; +}; + +#endif // CALENDARDIALOG_H diff --git a/src/jceData/Calendar/calendardialog.ui b/src/jceData/Calendar/calendardialog.ui index d808852..d42da7e 100644 --- a/src/jceData/Calendar/calendardialog.ui +++ b/src/jceData/Calendar/calendardialog.ui @@ -1,210 +1,210 @@ - - - CalendarDialog - - - - 0 - 0 - 577 - 268 - - - - Dialog - - - - - 10 - 10 - 551 - 235 - - - - - - - <body><p><span style=" font-size:9pt; font-weight:600;">The dates were chosen according to JCE General Academic Calendar for the first semester</span></p> - - - - - - - - - - - - - Semester Starts At: - - - - - - - Semester Ends At: - - - - - - - - - - - - - - Qt::ImhNone - - - - 2014 - 10 - 26 - - - - - 2000 - 9 - 14 - - - - - 2080 - 12 - 31 - - - - true - - - QCalendarWidget::NoVerticalHeader - - - - - - - - 2015 - 2 - 1 - - - - - 2000 - 9 - 14 - - - - - 2080 - 12 - 31 - - - - true - - - QCalendarWidget::NoVerticalHeader - - - - - - - - - - - - - - - - - - - - <b>Please chose your dates correctly</b> - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - - - - - buttonBox - accepted() - CalendarDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - CalendarDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - + + + CalendarDialog + + + + 0 + 0 + 577 + 268 + + + + Dialog + + + + + 10 + 10 + 551 + 235 + + + + + + + <body><p><span style=" font-size:9pt; font-weight:600;">The dates were chosen according to JCE General Academic Calendar for the first semester</span></p> + + + + + + + + + + + + + Semester Starts At: + + + + + + + Semester Ends At: + + + + + + + + + + + + + + Qt::ImhNone + + + + 2014 + 10 + 26 + + + + + 2000 + 9 + 14 + + + + + 2080 + 12 + 31 + + + + true + + + QCalendarWidget::NoVerticalHeader + + + + + + + + 2015 + 2 + 1 + + + + + 2000 + 9 + 14 + + + + + 2080 + 12 + 31 + + + + true + + + QCalendarWidget::NoVerticalHeader + + + + + + + + + + + + + + + + + + + + <b>Please chose your dates correctly</b> + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + + + + buttonBox + accepted() + CalendarDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + CalendarDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + From 00477ab26dcc3745a0f28c222add429cb4977c71 Mon Sep 17 00:00:00 2001 From: liranbg Date: Fri, 12 Sep 2014 11:50:21 +0300 Subject: [PATCH 2/2] nothing special --- jceGrade.pro | 131 +++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/jceGrade.pro b/jceGrade.pro index 9e91aed..aca4266 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -1,67 +1,64 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2014-05-31T19:49:42 -# -#------------------------------------------------- - -QT += core gui network widgets -TARGET = jceGrade -TEMPLATE = app -RC_FILE = appConfigure.rc -CONFIG += qt c++11 -CONFIG += console static - -TRANSLATIONS = jce_en.ts \ - jce_he.ts - - -FORMS += \ - main/mainscreen.ui \ - src/jceData/Calendar/calendardialog.ui - -OTHER_FILES += - -RESOURCES += \ - resources/connectionstatus.qrc - -HEADERS += \ - main/CalendarTab/CalendarManager.h \ - main/CourseTab/coursestablemanager.h \ - main/LoginTab/loginhandler.h \ - main/mainscreen.h \ - src/appDatabase/savedata.h \ - src/jceConnection/jcesslclient.h \ - src/jceData/Calendar/calendarPage.h \ - src/jceData/Grades/gradeCourse.h \ - src/jceData/Grades/gradePage.h \ - src/jceData/course.h \ - src/jceData/page.h \ - src/jceSettings/jcelogin.h \ - src/jceSettings/jceLoginHtmlScripts.h \ - src/jceSettings/user.h \ - src/jceData/Calendar/calendarCourse.h \ - src/jceData/Calendar/calendarSchedule.h \ - src/jceData/CSV/csv_exporter.h \ - src/appDatabase/simplecrypt.h \ - src/jceData/Calendar/calendardialog.h - -SOURCES += \ - main/CalendarTab/CalendarManager.cpp \ - main/CourseTab/coursestablemanager.cpp \ - main/LoginTab/loginhandler.cpp \ - main/main.cpp \ - main/mainscreen.cpp \ - src/appDatabase/savedata.cpp \ - src/jceConnection/jcesslclient.cpp \ - src/jceData/Calendar/calendarPage.cpp \ - src/jceData/Grades/gradeCourse.cpp \ - src/jceData/Grades/gradePage.cpp \ - src/jceData/page.cpp \ - src/jceSettings/jcelogin.cpp \ - src/jceSettings/user.cpp \ - src/jceData/Calendar/calendarCourse.cpp \ - src/jceData/Calendar/calendarSchedule.cpp \ - src/jceData/CSV/csv_exporter.cpp \ - src/appDatabase/simplecrypt.cpp \ - src/jceData/Calendar/calendardialog.cpp - +#------------------------------------------------- +# +# Project created by QtCreator 2014-05-31T19:49:42 +# +#------------------------------------------------- + +QT += core gui network widgets +TARGET = jceGrade +TEMPLATE = app +RC_FILE = appConfigure.rc +CONFIG += qt c++11 +CONFIG += console static + +TRANSLATIONS = jce_en.ts \ + jce_he.ts + +FORMS += \ + main/mainscreen.ui + +OTHER_FILES += + +RESOURCES += \ + resources/connectionstatus.qrc + +HEADERS += \ + main/CalendarTab/CalendarManager.h \ + main/CourseTab/coursestablemanager.h \ + main/LoginTab/loginhandler.h \ + main/mainscreen.h \ + src/appDatabase/savedata.h \ + src/jceConnection/jcesslclient.h \ + src/jceData/Calendar/calendarPage.h \ + src/jceData/Grades/gradeCourse.h \ + src/jceData/Grades/gradePage.h \ + src/jceData/course.h \ + src/jceData/page.h \ + src/jceSettings/jcelogin.h \ + src/jceSettings/jceLoginHtmlScripts.h \ + src/jceSettings/user.h \ + src/jceData/Calendar/calendarCourse.h \ + src/jceData/Calendar/calendarSchedule.h \ + src/jceData/CSV/csv_exporter.h \ + src/appDatabase/simplecrypt.h + +SOURCES += \ + main/CalendarTab/CalendarManager.cpp \ + main/CourseTab/coursestablemanager.cpp \ + main/LoginTab/loginhandler.cpp \ + main/main.cpp \ + main/mainscreen.cpp \ + src/appDatabase/savedata.cpp \ + src/jceConnection/jcesslclient.cpp \ + src/jceData/Calendar/calendarPage.cpp \ + src/jceData/Grades/gradeCourse.cpp \ + src/jceData/Grades/gradePage.cpp \ + src/jceData/page.cpp \ + src/jceSettings/jcelogin.cpp \ + src/jceSettings/user.cpp \ + src/jceData/Calendar/calendarCourse.cpp \ + src/jceData/Calendar/calendarSchedule.cpp \ + src/jceData/CSV/csv_exporter.cpp \ + src/appDatabase/simplecrypt.cpp + +