diff --git a/jceGrade.pro b/jceGrade.pro
index 5283ecb..3a29449 100644
--- a/jceGrade.pro
+++ b/jceGrade.pro
@@ -6,7 +6,7 @@
QT += core gui network widgets
-CONFIG += qt c++11 static
+CONFIG += qt c++11
#CONFIG += console static
TARGET = jceManager
diff --git a/jce_en.qm b/jce_en.qm
index 9408f16..919512b 100644
Binary files a/jce_en.qm and b/jce_en.qm differ
diff --git a/jce_en.ts b/jce_en.ts
index 08621ff..13f13f0 100644
--- a/jce_en.ts
+++ b/jce_en.ts
@@ -46,8 +46,8 @@
MainScreen
-
- JCE Avg Calculator
+
+ JCE Manager
@@ -148,7 +148,8 @@
-
+
+ <p align="right">Made By <a href="http://liranbg.github.io/JceManager/"><span style=" text-decoration: underline; color:#0000ff;">JceManager</span></a></p><p align="right">Made By <a href="http://liranbg.github.io/JceManager/"><span style=" text-decoration: underline; color:#0000ff;">JceManager</span></a></p>
@@ -192,107 +193,107 @@
How To
-
+ Ready
-
-
-
-
+
+
+
+ Error
-
+ Invalid dates. Make sure everything is correct and try again
-
-
+
+ Not Connected
-
+ Missmatching Data
-
+ License:
-
+ powered by: Powered By:
-
+ Developed By
-
+ GuideHelp Guide
-
+ Liran Ben Gida
-
+ Sagi Dayan
-
+ <br><li>Login: <ul><li>Type your username and password and click Login.</li><li>Once you are connected, you will see a green ball in the right buttom panel.</li></ul></li>
-
+ <br><li>Getting GPA sheet<ul><li>Click on GPA Tab</li><li> Select your dates and click on Add</li></ul></li>
-
+ <br><li>Average Changing<ul><li>Change one of your grade and see the average in the buttom panel changing.</li></ul></li>
-
+ <br><li>Getting Calendar<ul><li>Click on Calendar Tab</li><li> Select your dates and click on Get Calendar</li></ul></li>
-
+
- <br><li>על מנת לייצא לקובץ CSV<ul><li>חזור על השלב הקודם ורק אז</li><li> לחת על ייצוא לקובץ CSV</li><li>בחר את התאריכים המתאימים ולחץ על אישור</li><li>ברגע שתסיים תוכל הודעה ולאחר מכן תוכל לייבא את הקובץ היכן שתרצה</li></li>
+ <br><li>For exporting your calendar to a .CSV file:<ul><li>Do previous step and continue to next step</li><li> Click on Export to CSV</li><li>Select your dates and click OK</li><li>Once you're Done, go on your calendar and import your csv file</li></li>
-
+ <b>For more information, please visit us at: <a href='http://liranbg.github.io/JceManager/'>Jce Manager site</a></b>
-
-
+
+ Settings
-
-
-
+
+
+ Your settings will take effect next time you start the program
@@ -423,117 +424,117 @@ If this message appear without reason, please contact me at liranbg@gmail.comFriday
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
-
+ Your error is critical. Our team need your help, please send your log file named J_M_Log.log to us. see link in About. The file DOES NOT CONTAIN YOUR PASSWORD
diff --git a/jce_he.qm b/jce_he.qm
index 036e7ac..71711a3 100644
Binary files a/jce_he.qm and b/jce_he.qm differ
diff --git a/jce_he.ts b/jce_he.ts
index 6b131b2..1b9d47c 100644
--- a/jce_he.ts
+++ b/jce_he.ts
@@ -46,8 +46,8 @@
MainScreen
-
- JCE Avg Calculator
+
+ JCE Manager
@@ -148,8 +148,9 @@
-
- <p align="right">נוצר ע"י: <a href="http://liranbg.github.io/JceManager/"><span style=" text-decoration: underline; color:#0000ff;">JceManager</span></a></p>
+
+ <p align="right">Made By <a href="http://liranbg.github.io/JceManager/"><span style=" text-decoration: underline; color:#0000ff;">JceManager</span></a></p>
+ <p align="center">נוצר ע"י: <a href="http://liranbg.github.io/JceManager/"><span style=" text-decoration: underline; color:#0000ff;">JceManager</span></a></p>
@@ -192,107 +193,107 @@
עזרה
-
+ מוכן
-
-
-
-
+
+
+
+ שגיאה
-
+ תאריכים לא חוקיים. אנא בדוק שהנתונים שהוזנו נכונים ונסה מחדשה
-
-
+
+ לא מחובר
-
+ שגיאה בהכנסת נתונים
-
+ רישיון:
-
+ powered by: מנוע:
-
+
-
+ Guideתפריט עזרה
-
+ לירן בן גידה
-
+ שגיא דיין
-
+ <br><li>התחברות: <ul><li>הזן את שם המשתמש והסיסמה ולחץ על התחבר</li><li>בגמר ההתחברות תראה בכדור ירוק בשורת המצב. המשמעות שהינך מחובר לאתר</li></ul></li>
-
+ <br><li>קבלת גליון ציונים<ul><li>לחץ על לשונית הציונים</li><li>בחר את טווח התאריכים הרצויים ולחץ על הוספה</li></ul></li>
-
+ <br><li>שינוי ממוצע<ul><li>שנה את אחד הציונים שלך בקורס והממוצע ישתנה בהתאם.</li></ul></li>
-
+ <br><li>קבלת שעות מערכת<ul><li>לחץ על לשונית שעות מערכת</li><li>בחר את השנה והסמסטר ולחץ על הצג מערכת</li></ul></li>
-
+ <br><li>על מנת לייצא לקובץ CSV<ul><li>בצע את השלב הקודם ואז</li><li> לחץ על ייצוא לCSV</li><li>בחר את התאריכים המתאימים ולחץ אישור</li><li>לאחר השלמת הפעולה תוכל לייבא את המערכת שעות</li></li>
-
+ <b>לעוד מידע: <a href='http://liranbg.github.io/JceManager/'>Jce Manager site</a></b>
-
-
+
+ הגדרות
-
-
-
+
+
+ ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה
@@ -423,117 +424,117 @@ If this message appear without reason, please contact me at liranbg@gmail.comשישי
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp
index d1fadd0..fa7d03f 100644
--- a/main/mainscreen.cpp
+++ b/main/mainscreen.cpp
@@ -4,343 +4,359 @@
MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainScreen)
{
- ui->setupUi(this);
- //this->setFixedSize(this->size()); //main not resizeable
+ ui->setupUi(this);
+ //this->setFixedSize(this->size()); //main not resizeable
- //Login Tab
- iconPix.load(":/icons/iconX.png");
- ui->pswdLineEdit->setEchoMode((QLineEdit::Password));
- ui->labelUsrInputStatus->setVisible(false);
- ui->labelPswInputStatus->setVisible(false);
- ui->labelUsrInputStatus->setPixmap(iconPix);
- ui->labelPswInputStatus->setPixmap(iconPix);
+ ui->labelMadeBy->setOpenExternalLinks(true);
- //StatusBar
- ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };");
- ui->statusBar->setFixedHeight(STATUS_ICON_HEIGH);
- ui->statusBar->showMessage(tr("Ready"));
+ //Login Tab
+ iconPix.load(":/icons/iconX.png");
+ ui->pswdLineEdit->setEchoMode((QLineEdit::Password));
+ ui->labelUsrInputStatus->setVisible(false);
+ ui->labelPswInputStatus->setVisible(false);
+ ui->labelUsrInputStatus->setPixmap(iconPix);
+ ui->labelPswInputStatus->setPixmap(iconPix);
- //GPA Tab
- ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue));
+ //StatusBar
+ ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };");
+ ui->statusBar->setFixedHeight(STATUS_ICON_HEIGH);
+ ui->statusBar->showMessage(tr("Ready"));
- //Pointer allocating
- qDebug() << Q_FUNC_INFO << "Allocating pointers";
- this->userLoginSetting = new user("","");
- this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
- this->loginHandel = new loginHandler(userLoginSetting,ui->statusBar,ui->loginButton);
- this->calendar = new CalendarManager(ui->calendarGridLayoutMain);
- this->data = new SaveData();
+ //GPA Tab
+ ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue));
- //check login File
- if (data->isSaved())
+ //Pointer allocating
+ qDebug() << Q_FUNC_INFO << "Allocating pointers";
+ this->userLoginSetting = new user("","");
+ this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
+ this->loginHandel = new loginHandler(userLoginSetting,ui->statusBar,ui->loginButton);
+ this->calendar = new CalendarManager(ui->calendarGridLayoutMain);
+ this->data = new SaveData();
+
+ //check login File
+ if (data->isSaved())
{
- qDebug() << Q_FUNC_INFO << "Loading data from file";
- ui->usrnmLineEdit->setText(data->getUsername());
- ui->pswdLineEdit->setText(data->getPassword());
- ui->keepLogin->setChecked(true);
+ qDebug() << Q_FUNC_INFO << "Loading data from file";
+ ui->usrnmLineEdit->setText(data->getUsername());
+ ui->pswdLineEdit->setText(data->getPassword());
+ ui->keepLogin->setChecked(true);
}
- //language
- qDebug() << Q_FUNC_INFO << "Checking locale";
- checkLocale();
- qDebug() << Q_FUNC_INFO << "Ready.";
+ //language
+ qDebug() << Q_FUNC_INFO << "Checking locale";
+ checkLocale();
+ qDebug() << Q_FUNC_INFO << "Ready.";
}
MainScreen::~MainScreen()
{
- delete calendar;
- delete courseTableMgr;
- delete userLoginSetting;
- delete loginHandel;
- delete data;
- delete ui;
+ delete calendar;
+ delete courseTableMgr;
+ delete userLoginSetting;
+ delete loginHandel;
+ delete data;
+ delete ui;
}
//EVENTS ON LOGIN TAB
void MainScreen::on_loginButton_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
{
- if (ui->usrnmLineEdit->text().isEmpty())
+ if (ui->usrnmLineEdit->text().isEmpty())
{
- ui->labelUsrInputStatus->setVisible(true);
- qDebug() << Q_FUNC_INFO << "username input is empty";
+ ui->labelUsrInputStatus->setVisible(true);
+ qDebug() << Q_FUNC_INFO << "username input is empty";
}
- else
- ui->labelUsrInputStatus->setVisible(false);
- if (ui->pswdLineEdit->text().isEmpty())
- {
- ui->labelPswInputStatus->setVisible(true);
- qDebug() << Q_FUNC_INFO << "password input is empty";
- }
- else
- ui->labelPswInputStatus->setVisible(false);
- return;
- }
- else
- {
+ else
ui->labelUsrInputStatus->setVisible(false);
- ui->labelPswInputStatus->setVisible(false);
- }
- qDebug() << Q_FUNC_INFO << "login session start";
- if (this->loginHandel->login(ui->usrnmLineEdit->text(),ui->pswdLineEdit->text()) == true)
- {
- qDebug() << Q_FUNC_INFO << "login session end with true";
- ui->pswdLineEdit->setDisabled(true);
- ui->usrnmLineEdit->setDisabled(true);
- if (ui->keepLogin->isChecked())
+ if (ui->pswdLineEdit->text().isEmpty())
{
- qDebug() << Q_FUNC_INFO << "saving data";
- data->setUsername(ui->usrnmLineEdit->text());
- data->setPassword(ui->pswdLineEdit->text());
+ ui->labelPswInputStatus->setVisible(true);
+ qDebug() << Q_FUNC_INFO << "password input is empty";
+ }
+ else
+ ui->labelPswInputStatus->setVisible(false);
+ return;
+ }
+ else
+ {
+ ui->labelUsrInputStatus->setVisible(false);
+ ui->labelPswInputStatus->setVisible(false);
+ }
+ qDebug() << Q_FUNC_INFO << "login session start";
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ if (this->loginHandel->login(ui->usrnmLineEdit->text(),ui->pswdLineEdit->text()) == true)
+ {
+ qDebug() << Q_FUNC_INFO << "login session end with true";
+ ui->pswdLineEdit->setDisabled(true);
+ ui->usrnmLineEdit->setDisabled(true);
+ if (ui->keepLogin->isChecked())
+ {
+ qDebug() << Q_FUNC_INFO << "saving data";
+ data->setUsername(ui->usrnmLineEdit->text());
+ data->setPassword(ui->pswdLineEdit->text());
}
}
- else
+ else
{
- qDebug() << Q_FUNC_INFO << "login session end with false";
- ui->pswdLineEdit->setDisabled(false);
- ui->usrnmLineEdit->setDisabled(false);
+ qDebug() << Q_FUNC_INFO << "login session end with false";
+ ui->pswdLineEdit->setDisabled(false);
+ ui->usrnmLineEdit->setDisabled(false);
}
+ QApplication::restoreOverrideCursor();
}
void MainScreen::on_keepLogin_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- if (ui->keepLogin->isChecked())
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ if (ui->keepLogin->isChecked())
{
- qDebug() << Q_FUNC_INFO << "saving data";
- data->setUsername(ui->usrnmLineEdit->text());
- data->setPassword(ui->pswdLineEdit->text());
+ qDebug() << Q_FUNC_INFO << "saving data";
+ data->setUsername(ui->usrnmLineEdit->text());
+ data->setPassword(ui->pswdLineEdit->text());
}
- else
- data->reset();
+ else
+ data->reset();
}
void MainScreen::on_usrnmLineEdit_editingFinished()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
}
//EVENTS ON GPA TAB
void MainScreen::on_ratesButton_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- if (!checkIfValidDates())
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ if (!checkIfValidDates())
{
- qWarning() << Q_FUNC_INFO << "Invalid dates! return";
- QMessageBox::critical(this,tr("Error"),tr("Invalid Dates.\nMake Sure everything is correct and try again"));
- return;
+ qWarning() << Q_FUNC_INFO << "Invalid dates! return";
+ QMessageBox::critical(this,tr("Error"),tr("Invalid Dates.\nMake Sure everything is correct and try again"));
+ return;
}
- QString pageString;
- int status = 0;
- if (loginHandel->isLoggedInFlag())
+ QString pageString;
+ int status = 0;
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ if (loginHandel->isLoggedInFlag())
{
- if ((status = loginHandel->makeGradeRequest(ui->spinBoxCoursesFromYear->value(),
- ui->spinBoxCoursesToYear->value(),ui->spinBoxCoursesFromSemester->value(),
- ui->spinBoxCoursesToSemester->value())) == jceLogin::JCE_PAGE_PASSED)
+ if ((status = loginHandel->makeGradeRequest(ui->spinBoxCoursesFromYear->value(),
+ ui->spinBoxCoursesToYear->value(),ui->spinBoxCoursesFromSemester->value(),
+ ui->spinBoxCoursesToSemester->value())) == jceLogin::JCE_PAGE_PASSED)
{
- qDebug() << Q_FUNC_INFO << "grade page is ready";
- pageString = loginHandel->getCurrentPageContect();
- courseTableMgr->setCoursesList(pageString);
- courseTableMgr->insertJceCoursesIntoTable();
+ qDebug() << Q_FUNC_INFO << "grade page is ready";
+ pageString = loginHandel->getCurrentPageContect();
+ courseTableMgr->setCoursesList(pageString);
+ courseTableMgr->insertJceCoursesIntoTable();
}
- else if (status == jceLogin::JCE_NOT_CONNECTED)
+ else if (status == jceLogin::JCE_NOT_CONNECTED)
{
- qWarning() << Q_FUNC_INFO << "not connected";
- QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ qWarning() << Q_FUNC_INFO << "not connected";
+ QApplication::restoreOverrideCursor();
+ QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
}
- else
+ else
{
- qCritical() << Q_FUNC_INFO << "grade get ended with" << status;
+ qCritical() << Q_FUNC_INFO << "grade get ended with" << status;
}
}
+ QApplication::restoreOverrideCursor();
}
bool MainScreen::checkIfValidDates()
{
- bool flag = false;
- if (ui->spinBoxCoursesFromYear->value() < ui->spinBoxCoursesToYear->value())
+ bool flag = false;
+ if (ui->spinBoxCoursesFromYear->value() < ui->spinBoxCoursesToYear->value())
{
- //doesnt matter what is the semester, its valid!
+ //doesnt matter what is the semester, its valid!
+ flag = true;
+ }
+ else if ((ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value()))
+ {
+ //semester from must be equal or less than to semester
+ if (ui->spinBoxCoursesFromSemester->value() <= ui->spinBoxCoursesToSemester->value())
flag = true;
}
- else if ((ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value()))
- {
- //semester from must be equal or less than to semester
- if (ui->spinBoxCoursesFromSemester->value() <= ui->spinBoxCoursesToSemester->value())
- flag = true;
- }
- return flag;
+ return flag;
}
void MainScreen::on_checkBoxCoursesInfluence_toggled(bool checked)
{
- qDebug() << Q_FUNC_INFO << "only main courses toggeled" << checked;
- this->userLoginSetting->setInfluenceCourseOnly(checked);
- this->courseTableMgr->influnceCourseChanged(checked);
+ qDebug() << Q_FUNC_INFO << "only main courses toggeled" << checked;
+ this->userLoginSetting->setInfluenceCourseOnly(checked);
+ this->courseTableMgr->influnceCourseChanged(checked);
}
void MainScreen::on_spinBoxCoursesFromYear_valueChanged(int arg1)
{
- ui->spinBoxCoursesFromYear->setValue(arg1);
+ ui->spinBoxCoursesFromYear->setValue(arg1);
}
void MainScreen::on_spinBoxCoursesToYear_valueChanged(int arg1)
{
- ui->spinBoxCoursesToYear->setValue(arg1);
+ ui->spinBoxCoursesToYear->setValue(arg1);
}
void MainScreen::on_spinBoxCoursesFromSemester_valueChanged(int arg1)
{
- ui->spinBoxCoursesFromSemester->setValue(arg1%4);
+ ui->spinBoxCoursesFromSemester->setValue(arg1%4);
}
void MainScreen::on_spinBoxCoursesToSemester_valueChanged(int arg1)
{
- ui->spinBoxCoursesToSemester->setValue(arg1%4);
+ ui->spinBoxCoursesToSemester->setValue(arg1%4);
}
void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item)
{
- qDebug() << Q_FUNC_INFO << "item at row:" << item->row() << " colum:" << item->column() << " text: " << item->text();
- if (this->courseTableMgr->changes(item->text(),item->row(),item->column()))
- ui->avgLCD->display(courseTableMgr->getAvg());
- else
+ if (this->courseTableMgr->changes(item->text(),item->row(),item->column()))
+ ui->avgLCD->display(courseTableMgr->getAvg());
+ else
{
- qWarning() << Q_FUNC_INFO << "missmatch data";
- QMessageBox::critical(this,tr("Error"),tr("Missmatching data"));
+ qWarning() << Q_FUNC_INFO << "missmatch data";
+ QMessageBox::critical(this,tr("Error"),tr("Missmatching data"));
}
}
void MainScreen::on_clearTableButton_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- courseTableMgr->clearTable();
- ui->avgLCD->display(courseTableMgr->getAvg());
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ courseTableMgr->clearTable();
+ ui->avgLCD->display(courseTableMgr->getAvg());
}
//EVENTS ON CALENDAR TAB
void MainScreen::on_getCalendarBtn_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- int status = 0;
- if (loginHandel->isLoggedInFlag())
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ int status = 0;
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ if (loginHandel->isLoggedInFlag())
{
- if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED)
+ if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED)
{
- //Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request
- //ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect());
- calendar->resetTable();
- calendar->setCalendar(loginHandel->getCurrentPageContect());
- qDebug() << Q_FUNC_INFO << "calendar is loaded";
+ //Use it for debug. add plain text and change the object name to 'plainTextEdit' so you will get the html request
+ //ui->plainTextEdit->setPlainText(loginHandel->getCurrentPageContect());
+ calendar->resetTable();
+ calendar->setCalendar(loginHandel->getCurrentPageContect());
+ qDebug() << Q_FUNC_INFO << "calendar is loaded";
}
- else if (status == jceLogin::JCE_NOT_CONNECTED)
+ else if (status == jceLogin::JCE_NOT_CONNECTED)
{
- qWarning() << Q_FUNC_INFO << "not connected";
- QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ qWarning() << Q_FUNC_INFO << "not connected";
+ QApplication::restoreOverrideCursor();
+ QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
}
- else
- qCritical() << Q_FUNC_INFO << "calendar get ended with" << status;
+ else
+ qCritical() << Q_FUNC_INFO << "calendar get ended with" << status;
}
+ QApplication::restoreOverrideCursor();
}
void MainScreen::on_exportToCVSBtn_clicked()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
- if (loginHandel->isLoggedInFlag())
+ qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
+ if (loginHandel->isLoggedInFlag())
{
- this->calendar->exportCalendarCSV();
+ this->calendar->exportCalendarCSV();
}
}
//EVENTS ON MENU BAR
void MainScreen::on_actionCredits_triggered()
{
- qDebug() << Q_FUNC_INFO;
- QMessageBox::about(this, "About",
- "Jce Manager v1.0.0
"
- +tr("License:")+
- " GNU LESSER GENERAL PUBLIC LICENSE V2.1 "
- +" "+
- "JceManager Repository"+
- "