diff --git a/jceGrade.pro b/jceGrade.pro
index 60edea4..e8174e4 100644
--- a/jceGrade.pro
+++ b/jceGrade.pro
@@ -9,7 +9,10 @@ TARGET = jceGrade
TEMPLATE = app
RC_FILE = appConfigure.rc
CONFIG += qt c++11
-CONFIG += console
+CONFIG += console static
+
+TRANSLATIONS = jce_en.ts \
+ jce_he.ts
FORMS += \
diff --git a/jce_en.qm b/jce_en.qm
index fed56a9..78fec6e 100644
Binary files a/jce_en.qm and b/jce_en.qm differ
diff --git a/jce_en.ts b/jce_en.ts
index 4db1d16..a60083e 100644
--- a/jce_en.ts
+++ b/jce_en.ts
@@ -6,248 +6,380 @@
- JCE Manager
+ JCE Avg Calculator
-
+
Login
-
+
Keep login
-
- Usernameasdfasdg
-
-
-
-
+
Username
-
+
Password
-
-
- Grade Table
+
+
+ GPA
-
+
- Get Your Grades
+ <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html>
-
+
Add
-
+
- Clear Table
+ <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html>
-
+
Clear
-
+
Average:
-
-
- Sattings
+
+
+ Only Main Courses
-
-
- Senester
-
-
-
-
- Year
-
-
-
+
- From
+ <b>From</b>
-
+
+
+
+ Year:
+
+
+
+
+ Semester:
+
+
+
- To
+ <b>To</b>
-
-
- Only influence Courses
+
+
+ Semester
-
-
- &About
+
+
+ Calendar
-
+
+
+ Get Calendar
+
+
+
+
+ Export to .CSV
+
+
+
+
+ &File
+
+
+
+
+ Language
+
+
+
Credits
-
+
Exit
-
-
- How-To
+
+
+ עברית
-
+
+
+ English
+
+
+
+
+ OS Default
+
+
+
+
+ How To
+
+
+
+
+ Connecting
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ &Login
+
+
+
+
+ Log&out
+
+
+
+
+
Error
-
+
+
Not Connected
-
-
-
-A tiny Application to calculate your grades average.
-
-
-
-
-This software is licensed under Qt5's
-
-
-
-
-
-The source code is available at github:
-
-
-
-
-
-This front end is Powered by
-
-
-
-
-
-Developed By
-
-
-
-
-
-Liran Ben Gida
-
-
-
-
-
-Sagi Dayan
-
-
-
-
-
-Nadav Luzzato
-
-
-
-
-
-Thanks to
-
-
-
-
-
-
-Code
-
-
-
-
-Course
-
-
-
-
-Type
-
-
-
-
-Points
-
-
-
-
-Weekly Hours
-
-
-
-
-Grade
-
-
-
-
-Additions
-
-
-
-
-
-
-Insert your username and password correctly
-
-
-
-
-Login and wait for the ball in the status (buttom) bar to become Green
-
-
-
-
-Check the Settings to select your date Interval
-
-
-
-
-Press Courses tab and then press the Add button and wait until courses will be loaded into the table
-
-
-
-
-Change the once of the grade cell and see your average is changing.
-
-
-
-
-Tip: Need to change Date interval? in Courses tab click Clean, then change the date interval then hit the Add button again! :-)
-
-
-
+
+
+ Missmatching Data
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Developed By
+
+
+
+
+ Liran Ben Gida
+
+
+
+
+ Sagi Dayan
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Settings
+
+
+
+
+
+
+ Your settings will take effect next time you start the program
+
+
+
+ QObject
+
+
+
+ Exported Successfuly!
+
+
+
+
+
+
+
+
+
+ Code
+
+
+
+
+ Name
+
+
+
+
+ Type
+
+
+
+
+ Points
+
+
+
+
+ Hours
+
+
+
+
+ Grade
+
+
+
+
+ Additions
+
+
+
+
+ Please Check Your Username & Password
+
+
+
+
+ You have been <b>blocked</b> by JCE, please try in a couple of minutes.
+
+
+
+
+ Please Check Your Internet Connection.
+
+
+
+
+ Receive Request Timeout.
+
+
+
+
+ Send Request Timeout.
+
+
+
+
+
+If this message appear without reason, please contact me at liranbg@gmail.com
+
+
+
+
+ Error
+
+
+
+
+ Sunday
+
+
+
+
+ Monday
+
+
+
+
+ Thesday
+
+
+
+
+ Wednesday
+
+
+
+
+ Thursday
+
+
+
+
+ Friday
+
-
diff --git a/jce_he.qm b/jce_he.qm
index e0f821f..952a5ca 100644
Binary files a/jce_he.qm and b/jce_he.qm differ
diff --git a/jce_he.ts b/jce_he.ts
index e28c3bd..0842582 100644
--- a/jce_he.ts
+++ b/jce_he.ts
@@ -2,261 +2,384 @@
-MainScreen
-
-
-
-JCE Manager
-
-
-
-
-
-התחבר
-
-
-
-
-שמור פרטים
-
-
-
-
-
-שם משתמש
-
-
-
-
-סיסמה
-
-
-
-
-גיליון ציונים
-
-
-
-
-קבל את הציונים שלך
-
-
-
-
-הוספה
-
-
-
-
-נקה טבלה
-
-
-
-
-נקה
-
-
-
-
-ממוצע:
-
-
-
-
-הגדרות
-
-
-
-
-סמסטר
-
-
-
-
-שנה
-
-
-
-
-מסמסטר
-
-
-
-
-לסמסטר
-
-
-
-
-רק קורסים בעלי השפעה
-
-
-
-
-&אודות
-
-
-
-
-אודות
-
-
-
-
-יציאה
-
-
-
-
-עזרה
-
-
-
-
-שגיאה
-
-
-
-
-לא התחבר
-
-
-
-
-מנסה להתחבר
-
-
-
-
-מחובר
-
-
-
-
-מנותק
-
-
-
-
-אפליקציה קטנה לחישוב ציונים
-
-
-
-
-רישיון השימוש בתוכנה ובקוד הפתוח רשום תחת
-
-
-
-
-
-כל קוד המקור של התוכנה נמצא בגיטהאב:
-
-
-
-
-
-התוכנה פועלת בעזרת המנוע
-
-
-
-
-
-פותח ע"י
-
-
-
-
-
-לירן בן גידה
-
-
-
-
-
-שגיא דיין
-
-
-
-
-
-נדב לוצטו
-
-
-
-
-
-תודה רבה ל
-
-
-
-
-
-
-קוד קורס
-
-
-
-
-קורס
-
-
-
-
-סוג
-
-
-
-
-נקודות זכות
-
-
-
-
-שעות שבועיות
-
-
-
-
-ציון
-
-
-
-
-הערות
-
-
-
-
-
-הכנס את שם המשתמש והסיסמה כמו שצריך
-
-
-
-
-לחץ התחבר והמתן על שהתוכנה תתחבר, עיגול ירוק למטה
-
-
-
-
-הכנס להגדרות כדי לבחור את טווח הגיליון
-
-
-
-
-לחץ על העמוד של גיליון הציונים ולחץ הוספהת המתן עד שהציונים יופיעו בטבלה
-
-
-
-
-שנה ושחק עם הציונים כדי לראות את הממוצע משתנה
-
-
-
-
-טיפ: רוצה לשנות את תקופת הזמן? לחץ על נקה, ולאחר מכן שנה את תקופת הזמן ולחץ על הוספה שוב! :-)
-
-
-
-
+ MainScreen
+
+
+
+ JCE Avg Calculator
+
+
+
+
+
+ כניסה
+
+
+
+
+ שמור פרטים
+
+
+
+
+ שם משתמש
+
+
+
+
+ סיסמה
+
+
+
+
+ גליון ציונים
+
+
+
+
+ <html><head/><body><p><span style=" font-weight:600;">ציונים הצג</span></p></body></html>
+
+
+
+
+ הוסף
+
+
+
+
+ <html><head/><body><p><span style=" font-weight:600;">טבלה נקהe</span></p></body></html>
+
+
+
+
+ נקה
+
+
+
+
+ ממוצע:
+
+
+
+
+ הצג קורסים משמעותיים בלבד
+
+
+
+
+ <b>מסמסטר</b>
+
+
+
+
+
+ שנה:
+
+
+
+
+ סמסטר:
+
+
+
+
+ <b>עד סמסטר</b>
+
+
+
+
+ סמסטר
+
+
+
+
+ מערכת שעות
+
+
+
+
+ הצג מערכת
+
+
+
+
+ CSV ייצא אל קובץ
+
+
+
+
+ &קובץ
+
+
+
+
+ שפה
+
+
+
+
+ קרדיט
+
+
+
+
+ יציאה
+
+
+
+
+ עברית
+
+
+
+
+ English
+
+
+
+
+ ברירת מחדל
+
+
+
+
+ עזרה
+
+
+
+
+ מתחבר
+
+
+
+
+ מחובר
+
+
+
+
+ מנותק
+
+
+
+
+ &התחברות
+
+
+
+
+ &התנתקות
+
+
+
+
+
+
+ שגיאה
+
+
+
+
+
+ לא מחובר
+
+
+
+
+ שגיאה בהכנסת נתונים
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ פותח על ידי
+
+
+
+
+ לירן בן גידה
+
+
+
+
+ שגיא דיין
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ הגדרות
+
+
+
+
+
+
+ ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה
+
+
+
+ QObject
+
+
+
+ הייצוא הושלם!
+
+
+
+
+
+
+
+
+
+ קוד קורס
+
+
+
+
+ שם קורס
+
+
+
+
+ סוג
+
+
+
+
+ נק' זכות
+
+
+
+
+ שעות
+
+
+
+
+ ציון
+
+
+
+
+ תוספת
+
+
+
+
+ אנא בדוק את שם המשתמש והסיסמה שלך
+
+
+
+
+ נחסמת ע"י האתר, אנא נסה מאוחר יותר.
+
+
+
+
+ בדוק את החיבור שלך לאינטרנט.
+
+
+
+
+ בקשת קבלה נכשלה.
+
+
+
+
+ בקשת שליחה נכשלה.
+
+
+
+
+
+אם הודעה זו חוזרת על עצמה ללא סיבה. אנא פנה אל המפתח במייל liranbg@gmail.com
+
+
+
+
+ שגיאה
+
+
+
+
+ ראשון
+
+
+
+
+ שני
+
+
+
+
+ שלישי
+
+
+
+
+ רביעי
+
+
+
+
+ חמישי
+
+
+
+
+ שישי
+
diff --git a/main/CalendarTab/CalendarManager.cpp b/main/CalendarTab/CalendarManager.cpp
index 2fc9933..3d6e043 100644
--- a/main/CalendarTab/CalendarManager.cpp
+++ b/main/CalendarTab/CalendarManager.cpp
@@ -14,14 +14,14 @@ void CalendarManager::exportCalendarCSV(CalendarDialog *calDialog)
if(CSV_Exporter::exportCalendar(this->caliSchedPtr, calDialog))
{
QMessageBox msgBox;
- msgBox.setText("
Exported Successfuly!
HaazZaA!!");
+ msgBox.setText(QObject::tr("Exported Successfuly!"));
msgBox.exec();
}else
{
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Critical);
- msgBox.setText("Something went wrong...
Maybe: - You Canceled
- Unable to save the File - try again
"
- "In case of a serious problem, please file a bug report.
thank you. OpenJCE teem");
+ msgBox.setText(QObject::tr("Something went wrong...
Maybe: - You Canceled
- Unable to save the File - try again
"
+ "In case of a serious problem, please file a bug report.
thank you. OpenJCE teem"));
msgBox.exec();
}
diff --git a/main/LoginTab/loginhandler.cpp b/main/LoginTab/loginhandler.cpp
index b0b2334..57b172e 100644
--- a/main/LoginTab/loginhandler.cpp
+++ b/main/LoginTab/loginhandler.cpp
@@ -6,7 +6,6 @@ loginHandler::loginHandler(user *ptr): logggedInFlag(false)
}
void loginHandler::setPointers(QLabel *statusLabelPtr,QLineEdit *pswdEditPtr,QLineEdit *usrnmEditPtr)
{
-
this->statusLabelPtr = statusLabelPtr;
this->pswdEditPtr = pswdEditPtr;
this->usrnmEditPtr = usrnmEditPtr;
@@ -34,7 +33,7 @@ bool loginHandler::makeConnection()
}
case jceLogin::ERROR_ON_VALIDATION:
{
- popMessage("Please Check Your Username & Password",false);
+ popMessage(QObject::tr("Please Check Your Username & Password"),false);
usrnmEditPtr->setDisabled(false);
pswdEditPtr->setDisabled(false);
@@ -45,13 +44,13 @@ bool loginHandler::makeConnection()
}
case jceLogin::ERROR_ON_VALIDATION_USER_BLOCKED:
{
- popMessage("You have been blocked by JCE, please try in a couple of minutes.");
+ popMessage(QObject::tr("You have been blocked by JCE, please try in a couple of minutes."));
jceLog->closeAll();
return false;
}
case jceLogin::ERROR_ON_OPEN_SOCKET:
{
- popMessage("Please Check Your Internet Connection.");
+ popMessage(QObject::tr("Please Check Your Internet Connection."));
jceLog->closeAll();
return false;
}
@@ -65,14 +64,14 @@ bool loginHandler::makeConnection()
}
case jceLogin::ERROR_ON_GETTING_INFO:
{
- popMessage("Recieve Request Time Out.");
+ popMessage(QObject::tr("Receive Request Timeout."));
jceLog->closeAll();
return false;
break;
}
case jceLogin::ERROR_ON_SEND_REQUEST:
{
- popMessage("Send Request Time Out.");
+ popMessage(QObject::tr("Send Request Timeout."));
jceLog->closeAll();
return false;
break;
@@ -132,10 +131,10 @@ int loginHandler::makeCalendarRequest(int year, int semester)
void loginHandler::popMessage(QString message,bool addInfo)
{
if (addInfo)
- message.append("\nIf this message appear without reason, please contact me at liranbg@gmail.com");
+ message.append(QObject::tr("\nIf this message appear without reason, please contact me at liranbg@gmail.com"));
QMessageBox msgBox;
- msgBox.setWindowTitle("Error");
+ msgBox.setWindowTitle(QObject::tr("Error"));
msgBox.setText(message);
msgBox.exec();
msgBox.setFocus();
diff --git a/main/LoginTab/loginhandler.h b/main/LoginTab/loginhandler.h
index 5576883..b855dad 100644
--- a/main/LoginTab/loginhandler.h
+++ b/main/LoginTab/loginhandler.h
@@ -1,5 +1,6 @@
#ifndef LOGINHANDLER_H
#define LOGINHANDLER_H
+#include
#include
#include
#include
diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp
index bf15bf2..751e4b3 100644
--- a/main/mainscreen.cpp
+++ b/main/mainscreen.cpp
@@ -5,15 +5,18 @@
MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScreen)
{
ui->setupUi(this);
-
//this->setFixedSize(this->size()); //main not resizeable
-
//Login Tab
+ QPixmap iconPix;
+ 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);
//Status Bar
- ui->actionEnglish->setChecked(true);
ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };");
ButtomStatusLabel = new QLabel(this);
statusLabel = new QLabel(this);
@@ -28,10 +31,7 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr
ui->CoursesTab->setDisabled(true);
ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue));
-
-
//Pointer allocating
-
this->userLoginSetting = new user("","");
this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
this->loginHandel = new loginHandler(userLoginSetting);
@@ -39,7 +39,6 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr
this->data = new SaveData();
//check login File
- //SaveData::init(); --> No need. constructor dose everything.
if (data->isSaved())
{
ui->usrnmLineEdit->setText(data->getUsername());
@@ -48,61 +47,136 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr
}
//Local Check and ui setting.
- if(data->getLocal() == "en")
- {
- ui->actionHebrew->setChecked(false);
- ui->actionOS_Default->setChecked(false);
- ui->actionEnglish->setChecked(true);
- }else if(data->getLocal() == "he"){
- ui->actionHebrew->setChecked(true);
- ui->actionOS_Default->setChecked(false);
- ui->actionEnglish->setChecked(false);
- }else{
- ui->actionHebrew->setChecked(false);
- ui->actionOS_Default->setChecked(true);
- ui->actionEnglish->setChecked(false);
- }
+ checkLocale();
}
MainScreen::~MainScreen()
{
+ delete ButtomStatusLabel;
+ delete statusLabel;
+ delete calendar;
+ delete courseTableMgr;
delete userLoginSetting;
delete loginHandel;
delete ui;
-
- //Delete save data
delete data;
}
+//EVENTS ON STATUS BAR
+void MainScreen::setLabelConnectionStatus(jceLogin::jceStatus statusDescription)
+{
+ QPixmap iconPix;
+ switch (statusDescription)
+ {
+ case jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS:
+ iconPix.load(":/icons/blueStatusIcon.png");
+ statusLabel->setText(tr("Connecting"));
+ break;
+ case jceLogin::jceStatus::JCE_YOU_ARE_IN:
+ iconPix.load(":/icons/greenStatusIcon.png");
+ statusLabel->setText(tr("Connected"));
+ break;
+ default:
+ iconPix.load(":/icons/redStatusIcon.png");
+ statusLabel->setText(tr("Disconnected"));
+ break;
+ }
+ ButtomStatusLabel->setPixmap(iconPix);
+
+ this->repaint();
+}
+//EVENTS ON LOGIN TAB
void MainScreen::on_loginButton_clicked()
{
if (loginHandel->isLoggedInFlag())
uiSetDisconnectMode();
-
else
uiSetConnectMode();
-
}
-void MainScreen::on_getCalendarBtn_clicked()
+void MainScreen::on_keepLogin_clicked()
{
- int status = 0;
- if (loginHandel->isLoggedInFlag())
+ if (ui->keepLogin->isChecked())
{
- if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_GRADE_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().toStdString());
- }
+ data->setUsername(ui->usrnmLineEdit->text());
+ data->setPassword(ui->pswdLineEdit->text());
+ }
+ else
+ data->reset();
+}
+void MainScreen::on_usrnmLineEdit_editingFinished()
+{
+ ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
+}
+void MainScreen::uiSetDisconnectMode()
+{
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_NOT_CONNECTED);
+ ui->usrnmLineEdit->setText("");
+ ui->pswdLineEdit->setText("");
+ ui->usrnmLineEdit->setEnabled(true);
+ ui->pswdLineEdit->setEnabled(true);
- else if (status == jceLogin::JCE_NOT_CONNECTED)
+ loginHandel->makeDisconnectionRequest();
+ ui->loginButton->setText(tr("&Login"));
+ ui->getCalendarBtn->setDisabled(true);
+ ui->exportToCVSBtn->setDisabled(true);
+ ui->ratesButton->setDisabled(true);
+ return;
+}
+void MainScreen::uiSetConnectMode()
+{
+ string username;
+ string password;
+ if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
+ {
+ if (ui->usrnmLineEdit->text().isEmpty())
{
- QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ ui->labelUsrInputStatus->setVisible(true);
+ qDebug() << "error, username input is empty";
}
+ else
+ ui->labelUsrInputStatus->setVisible(false);
+ if (ui->pswdLineEdit->text().isEmpty())
+ {
+ ui->labelPswInputStatus->setVisible(true);
+ qDebug() << "error, password input is empty";
+ }
+ else
+ ui->labelPswInputStatus->setVisible(false);
+ return;
+ }
+ else
+ {
+ ui->labelUsrInputStatus->setVisible(false);
+ ui->labelPswInputStatus->setVisible(false);
+ }
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS);
+
+ username = ui->usrnmLineEdit->text().toStdString();
+ password = ui->pswdLineEdit->text().toStdString();
+
+ ui->usrnmLineEdit->setDisabled(true);
+ ui->pswdLineEdit->setDisabled(true);
+
+ userLoginSetting->setUsername(username);
+ userLoginSetting->setPassword(password);
+
+ this->loginHandel->setPointers(statusLabel,ui->pswdLineEdit,ui->usrnmLineEdit);
+ if (loginHandel->makeConnection() == true)
+ {
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_YOU_ARE_IN);
+ ui->loginButton->setText(tr("&Logout"));
+ ui->ratesButton->setEnabled(true);
+ ui->CoursesTab->setEnabled(true);
+ ui->exportToCVSBtn->setEnabled(true);
+ ui->getCalendarBtn->setEnabled(true);
+
+ }
+ else
+ {
+ uiSetDisconnectMode();
}
}
-
+//EVENTS ON GPA TAB
void MainScreen::on_ratesButton_clicked()
{
std::string pageString;
@@ -120,9 +194,6 @@ void MainScreen::on_ratesButton_clicked()
QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
}
}
-
-
-
}
void MainScreen::on_checkBoxCoursesInfluence_toggled(bool checked)
{
@@ -169,101 +240,45 @@ void MainScreen::on_spinBoxCoursesToSemester_editingFinished()
}
}
}
-
void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item)
{
if (this->courseTableMgr->changes(item->text(),item->row(),item->column()))
ui->avgLCD->display(courseTableMgr->getAvg());
else
- QMessageBox::critical(this,"Error","Missmatching data");
+ QMessageBox::critical(this,tr("Error"),tr("Missmatching data"));
}
-
-void MainScreen::on_usrnmLineEdit_editingFinished()
+void MainScreen::on_clearTableButton_clicked()
{
- ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
+ courseTableMgr->clearTable();
+ ui->avgLCD->display(courseTableMgr->getAvg());
}
-void MainScreen::uiSetDisconnectMode()
+//EVENTS ON CALENDAR TAB
+void MainScreen::on_getCalendarBtn_clicked()
{
- setLabelConnectionStatus(jceLogin::jceStatus::JCE_NOT_CONNECTED);
- ui->usrnmLineEdit->setText("");
- ui->pswdLineEdit->setText("");
- ui->usrnmLineEdit->setEnabled(true);
- ui->pswdLineEdit->setEnabled(true);
-
- loginHandel->makeDisconnectionRequest();
- ui->loginButton->setText("&Login");
- ui->getCalendarBtn->setDisabled(true);
- ui->exportToCVSBtn->setDisabled(true);
- ui->ratesButton->setDisabled(true);
- return;
-}
-
-void MainScreen::uiSetConnectMode() //fix before distrbute
-{
- string username;
- string password;
- if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
+ int status = 0;
+ if (loginHandel->isLoggedInFlag())
{
- //add icon near to username and password to mark it
- return;
- }
- setLabelConnectionStatus(jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS);
+ if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_GRADE_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().toStdString());
+ }
- username = ui->usrnmLineEdit->text().toStdString();
- password = ui->pswdLineEdit->text().toStdString();
-
- ui->usrnmLineEdit->setDisabled(true);
- ui->pswdLineEdit->setDisabled(true);
-
- userLoginSetting->setUsername(username);
- userLoginSetting->setPassword(password);
-
- this->loginHandel->setPointers(statusLabel,ui->pswdLineEdit,ui->usrnmLineEdit);
- if (loginHandel->makeConnection() == true)
- {
- setLabelConnectionStatus(jceLogin::jceStatus::JCE_YOU_ARE_IN);
- ui->loginButton->setText("&Logout");
- ui->ratesButton->setEnabled(true);
- ui->CoursesTab->setEnabled(true);
- ui->exportToCVSBtn->setEnabled(true);
- ui->getCalendarBtn->setEnabled(true);
-
- }
- else
- {
- uiSetDisconnectMode();
+ else if (status == jceLogin::JCE_NOT_CONNECTED)
+ {
+ QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ }
}
}
-void MainScreen::setLabelConnectionStatus(jceLogin::jceStatus statusDescription)
+void MainScreen::on_exportToCVSBtn_clicked()
{
- QPixmap iconPix;
- switch (statusDescription)
- {
-
- case jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS:
- iconPix.load(":/icons/blueStatusIcon.png");
- statusLabel->setText(tr("Connecting"));
- break;
- case jceLogin::jceStatus::JCE_YOU_ARE_IN:
- iconPix.load(":/icons/greenStatusIcon.png");
- statusLabel->setText(tr("Connected"));
- break;
- default:
- iconPix.load(":/icons/redStatusIcon.png");
- statusLabel->setText(tr("Disconnected"));
- break;
- }
- ButtomStatusLabel->setPixmap(iconPix);
-
- this->repaint();
+ if (loginHandel->isLoggedInFlag())
+ this->calendar->exportCalendarCSV();
}
-void MainScreen::showMSG(QString msg)
-{
- QMessageBox msgBox;
- msgBox.setText(msg);
- msgBox.exec();
-}
+//EVENTS ON MENU BAR
void MainScreen::on_actionCredits_triggered()
{
QMessageBox::about(this, "About", tr("CREDITS-ROOL-UP1") + " v1.0
"
@@ -277,31 +292,10 @@ void MainScreen::on_actionCredits_triggered()
""+tr("Sagi")+""
"");
}
-
-void MainScreen::on_clearTableButton_clicked()
-{
-
- courseTableMgr->clearTable();
- ui->avgLCD->display(courseTableMgr->getAvg());
-}
-
void MainScreen::on_actionExit_triggered()
{
exit(0);
}
-
-
-void MainScreen::on_keepLogin_clicked()
-{
- if (ui->keepLogin->isChecked())
- {
- data->setUsername(ui->usrnmLineEdit->text());
- data->setPassword(ui->pswdLineEdit->text());
- }
- else
- data->reset();
-}
-
void MainScreen::on_actionHow_To_triggered()
{
QMessageBox::information(this,"How To",
@@ -317,22 +311,6 @@ void MainScreen::on_actionHow_To_triggered()
}
-//void MainScreen::on_pushButton_2_clicked()
-//{
-// if(CSV_Exporter::exportCalendar(this->calendar->getSch()))
-// {
-// QMessageBox msgBox;
-// msgBox.setText("Exported Successfuly!
HaazZaA!!");
-// msgBox.exec();
-// }else
-// {
-// QMessageBox msgBox;
-// msgBox.setIcon(QMessageBox::Critical);
-// msgBox.setText("Something went wrong...
Maybe: - You Canceled
- Unable to save the File - try again
"
-// "In case of a serious problem, please file a bug report.
thank you. OpenJCE teem");
-// msgBox.exec();
-// }
-//}
void MainScreen::on_exportToCVSBtn_clicked()
{
@@ -358,7 +336,7 @@ void MainScreen::on_actionHebrew_triggered()
ui->actionOS_Default->setChecked(false);
qDebug() << "Changed Language to hebrew";
data->setLocal("he");
- showMSG("ההגדרות שלך יכנסו לתוקף בהפעלה הבאה של התוכנית");
+ QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
}
else
ui->actionHebrew->setChecked(true);
@@ -372,7 +350,7 @@ void MainScreen::on_actionEnglish_triggered()
ui->actionOS_Default->setChecked(false);
qDebug() << "Changed Language to English";
data->setLocal("en");
- showMSG("Your settings will take effect next time you start the program");
+ QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
}
else
ui->actionEnglish->setChecked(true);
@@ -387,8 +365,25 @@ void MainScreen::on_actionOS_Default_triggered()
ui->actionEnglish->setChecked(false);
qDebug() << "Changed Language to OS Default";
data->setLocal("default");
- showMSG("Your settings will take effect next time you start the program");
+ QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
}
else
ui->actionOS_Default->setChecked(true);
}
+void MainScreen::checkLocale()
+{
+ if(data->getLocal() == "en")
+ {
+ ui->actionHebrew->setChecked(false);
+ ui->actionOS_Default->setChecked(false);
+ ui->actionEnglish->setChecked(true);
+ }else if(data->getLocal() == "he"){
+ ui->actionHebrew->setChecked(true);
+ ui->actionOS_Default->setChecked(false);
+ ui->actionEnglish->setChecked(false);
+ }else{
+ ui->actionHebrew->setChecked(false);
+ ui->actionOS_Default->setChecked(true);
+ ui->actionEnglish->setChecked(false);
+ }
+}
diff --git a/main/mainscreen.cpp~ b/main/mainscreen.cpp~
new file mode 100644
index 0000000..a18834a
--- /dev/null
+++ b/main/mainscreen.cpp~
@@ -0,0 +1,408 @@
+#include "mainscreen.h"
+#include "ui_mainscreen.h"
+
+
+MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScreen)
+{
+ ui->setupUi(this);
+ //this->setFixedSize(this->size()); //main not resizeable
+
+ //Login Tab
+ QPixmap iconPix;
+ 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);
+
+ //Status Bar
+ ui->statusBar->setStyleSheet("QStatusBar::item { border: 0px solid black };");
+ ButtomStatusLabel = new QLabel(this);
+ statusLabel = new QLabel(this);
+ ui->statusBar->setMaximumSize(this->geometry().width(),StatusIconHeight);
+ ui->statusBar->addPermanentWidget(ButtomStatusLabel,0);
+ ui->statusBar->addPermanentWidget(statusLabel,1);
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_NOT_CONNECTED);
+
+ //Course, Setting, Calendar Tab
+ calendarSchedule * calendarSchedulePtr = new calendarSchedule();
+ ui->calendarGridLayoutMain->addWidget(calendarSchedulePtr);
+ ui->CoursesTab->setDisabled(true);
+ ui->avgLCD->setPalette(QPalette(QPalette::WindowText,Qt::blue));
+
+ //Pointer allocating
+ this->userLoginSetting = new user("","");
+ this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
+ this->loginHandel = new loginHandler(userLoginSetting);
+ this->calendar = new CalendarManager(calendarSchedulePtr);
+ this->data = new SaveData();
+
+ //check login File
+ if (data->isSaved())
+ {
+ ui->usrnmLineEdit->setText(data->getUsername());
+ ui->pswdLineEdit->setText(data->getPassword());
+ ui->keepLogin->setChecked(true);
+ }
+
+ //Local Check and ui setting.
+ checkLocale();
+
+}
+
+MainScreen::~MainScreen()
+{
+ delete ButtomStatusLabel;
+ delete statusLabel;
+ delete calendar;
+ delete courseTableMgr;
+ delete userLoginSetting;
+ delete loginHandel;
+ delete ui;
+ delete data;
+}
+//EVENTS ON STATUS BAR
+void MainScreen::setLabelConnectionStatus(jceLogin::jceStatus statusDescription)
+{
+ QPixmap iconPix;
+ switch (statusDescription)
+ {
+ case jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS:
+ iconPix.load(":/icons/blueStatusIcon.png");
+ statusLabel->setText(tr("Connecting"));
+ break;
+ case jceLogin::jceStatus::JCE_YOU_ARE_IN:
+ iconPix.load(":/icons/greenStatusIcon.png");
+ statusLabel->setText(tr("Connected"));
+ break;
+ default:
+ iconPix.load(":/icons/redStatusIcon.png");
+ statusLabel->setText(tr("Disconnected"));
+ break;
+ }
+ ButtomStatusLabel->setPixmap(iconPix);
+
+ this->repaint();
+}
+//EVENTS ON LOGIN TAB
+void MainScreen::on_loginButton_clicked()
+{
+ if (loginHandel->isLoggedInFlag())
+ uiSetDisconnectMode();
+ else
+ uiSetConnectMode();
+}
+void MainScreen::on_keepLogin_clicked()
+{
+ if (ui->keepLogin->isChecked())
+ {
+ data->setUsername(ui->usrnmLineEdit->text());
+ data->setPassword(ui->pswdLineEdit->text());
+ }
+ else
+ data->reset();
+}
+void MainScreen::on_usrnmLineEdit_editingFinished()
+{
+ ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
+}
+void MainScreen::uiSetDisconnectMode()
+{
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_NOT_CONNECTED);
+ ui->usrnmLineEdit->setText("");
+ ui->pswdLineEdit->setText("");
+ ui->usrnmLineEdit->setEnabled(true);
+ ui->pswdLineEdit->setEnabled(true);
+
+ loginHandel->makeDisconnectionRequest();
+ ui->loginButton->setText(tr("&Login"));
+ ui->getCalendarBtn->setDisabled(true);
+ ui->exportToCVSBtn->setDisabled(true);
+ ui->ratesButton->setDisabled(true);
+ return;
+}
+void MainScreen::uiSetConnectMode()
+{
+ string username;
+ string password;
+ if ((ui->usrnmLineEdit->text().isEmpty()) || (ui->pswdLineEdit->text().isEmpty()))
+ {
+ if (ui->usrnmLineEdit->text().isEmpty())
+ {
+ ui->labelUsrInputStatus->setVisible(true);
+ qDebug() << "error, username input is empty";
+ }
+ else
+ ui->labelUsrInputStatus->setVisible(false);
+ if (ui->pswdLineEdit->text().isEmpty())
+ {
+ ui->labelPswInputStatus->setVisible(true);
+ qDebug() << "error, password input is empty";
+ }
+ else
+ ui->labelPswInputStatus->setVisible(false);
+ return;
+ }
+ else
+ {
+ ui->labelUsrInputStatus->setVisible(false);
+ ui->labelPswInputStatus->setVisible(false);
+ }
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_START_VALIDATING_PROGRESS);
+
+ username = ui->usrnmLineEdit->text().toStdString();
+ password = ui->pswdLineEdit->text().toStdString();
+
+ ui->usrnmLineEdit->setDisabled(true);
+ ui->pswdLineEdit->setDisabled(true);
+
+ userLoginSetting->setUsername(username);
+ userLoginSetting->setPassword(password);
+
+ this->loginHandel->setPointers(statusLabel,ui->pswdLineEdit,ui->usrnmLineEdit);
+ if (loginHandel->makeConnection() == true)
+ {
+ setLabelConnectionStatus(jceLogin::jceStatus::JCE_YOU_ARE_IN);
+ ui->loginButton->setText(tr("&Logout"));
+ ui->ratesButton->setEnabled(true);
+ ui->CoursesTab->setEnabled(true);
+ ui->exportToCVSBtn->setEnabled(true);
+ ui->getCalendarBtn->setEnabled(true);
+
+ }
+ else
+ {
+ uiSetDisconnectMode();
+ }
+}
+//EVENTS ON GPA TAB
+void MainScreen::on_ratesButton_clicked()
+{
+ std::string pageString;
+ int status = 0;
+ if (loginHandel->isLoggedInFlag())
+ {
+ if ((status = loginHandel->makeGradeRequest(ui->spinBoxCoursesFromYear->value(),ui->spinBoxCoursesToYear->value(),ui->spinBoxCoursesFromSemester->value(),ui->spinBoxCoursesToSemester->value())) == jceLogin::JCE_GRADE_PAGE_PASSED)
+ {
+ pageString = loginHandel->getCurrentPageContect().toStdString();
+ courseTableMgr->setCoursesList(pageString);
+ courseTableMgr->insertJceCoursesIntoTable();
+ }
+ else if (status == jceLogin::JCE_NOT_CONNECTED)
+ {
+ QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ }
+ }
+}
+void MainScreen::on_checkBoxCoursesInfluence_toggled(bool checked)
+{
+ this->userLoginSetting->setInfluenceCourseOnly(checked);
+ this->courseTableMgr->influnceCourseChanged(checked);
+}
+void MainScreen::on_spinBoxCoursesFromYear_editingFinished()
+{
+ if (ui->spinBoxCoursesFromYear->value() > ui->spinBoxCoursesToYear->value())
+ {
+ ui->spinBoxCoursesFromYear->setValue(ui->spinBoxCoursesToYear->value());
+ ui->spinBoxCoursesFromYear->setFocus();
+ }
+
+}
+void MainScreen::on_spinBoxCoursesToYear_editingFinished()
+{
+ if (ui->spinBoxCoursesFromYear->value() > ui->spinBoxCoursesToYear->value())
+ {
+ ui->spinBoxCoursesToYear->setValue(ui->spinBoxCoursesFromYear->value());
+ ui->spinBoxCoursesToYear->setFocus();
+
+ }
+}
+void MainScreen::on_spinBoxCoursesFromSemester_editingFinished()
+{
+ if (ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value())
+ {
+ if (ui->spinBoxCoursesFromSemester->value() > ui->spinBoxCoursesToSemester->value())
+ {
+ ui->spinBoxCoursesFromSemester->setValue(ui->spinBoxCoursesToSemester->value());
+ ui->spinBoxCoursesFromSemester->setFocus();
+ }
+ }
+}
+void MainScreen::on_spinBoxCoursesToSemester_editingFinished()
+{
+ if (ui->spinBoxCoursesFromYear->value() == ui->spinBoxCoursesToYear->value())
+ {
+ if (ui->spinBoxCoursesFromSemester->value() > ui->spinBoxCoursesToSemester->value())
+ {
+ ui->spinBoxCoursesToSemester->setValue(ui->spinBoxCoursesFromSemester->value());
+ ui->spinBoxCoursesToSemester->setFocus();
+ }
+ }
+}
+void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item)
+{
+ if (this->courseTableMgr->changes(item->text(),item->row(),item->column()))
+ ui->avgLCD->display(courseTableMgr->getAvg());
+ else
+ QMessageBox::critical(this,tr("Error"),tr("Missmatching data"));
+}
+void MainScreen::on_clearTableButton_clicked()
+{
+ courseTableMgr->clearTable();
+ ui->avgLCD->display(courseTableMgr->getAvg());
+}
+//EVENTS ON CALENDAR TAB
+void MainScreen::on_getCalendarBtn_clicked()
+{
+ int status = 0;
+ if (loginHandel->isLoggedInFlag())
+ {
+ if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_GRADE_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().toStdString());
+ }
+
+ else if (status == jceLogin::JCE_NOT_CONNECTED)
+ {
+ QMessageBox::critical(this,tr("Error"),tr("Not Connected"));
+ }
+ }
+}
+void MainScreen::on_exportToCVSBtn_clicked()
+{
+ if (loginHandel->isLoggedInFlag())
+ this->calendar->exportCalendarCSV();
+}
+
+//EVENTS ON MENU BAR
+void MainScreen::on_actionCredits_triggered()
+{
+ QMessageBox::about(this, "About", tr("CREDITS-ROOL-UP1") + " v1.0
"
+ + tr("CREDITS-ROOL-UP2")+"
GNU LESSER GENERAL PUBLIC LICENSE V2
"
+ + tr("CREDITS-ROOL-UP3")+"
"
+ "jceAverageCalculator Repository"
+ "
"+tr("CREDITS-ROOL-UP4")+" Jce Connection
"
+ +tr("DevBy")+":"
+ "");
+}
+void MainScreen::on_actionExit_triggered()
+{
+ exit(0);
+}
+void MainScreen::on_actionHow_To_triggered()
+{
+ QMessageBox::information(this,"How To",
+ "How To.."
+ ""
+ "
- "+tr("HELP1")+"
"
+ "
- "+tr("HELP2")+"
"
+ "
- "+tr("HELP3")+"
"
+ "
- "+tr("HELP4")+"
"
+ "
- "+tr("HELP5")+"
"
+ "
"+tr("HELP6")+
+ "
");
+
+}
+
+<<<<<<< HEAD
+//void MainScreen::on_pushButton_2_clicked()
+//{
+// if(CSV_Exporter::exportCalendar(this->calendar->getSch()))
+// {
+// QMessageBox msgBox;
+// msgBox.setText("Exported Successfuly!
HaazZaA!!");
+// msgBox.exec();
+// }else
+// {
+// QMessageBox msgBox;
+// msgBox.setIcon(QMessageBox::Critical);
+// msgBox.setText("Something went wrong...
Maybe: - You Canceled
- Unable to save the File - try again
"
+// "In case of a serious problem, please file a bug report.
thank you. OpenJCE teem");
+// msgBox.exec();
+// }
+//}
+
+void MainScreen::on_exportToCVSBtn_clicked()
+{
+ if (loginHandel->isLoggedInFlag())
+ {
+ CalendarDialog calDialog;
+ int buttonClicked = calDialog.exec();
+ if(buttonClicked == 0)
+ return;
+//calDialog.getStartDate(),calDialog.getEndDate()
+ if(calDialog.ok())
+ this->calendar->exportCalendarCSV(&calDialog);
+ else
+ showMSG("Somthig was not right with the dates you have chosen... try again");
+ }
+}
+
+=======
+>>>>>>> 834ee3469ee46960c2484d38ba86a00793de84cc
+void MainScreen::on_actionHebrew_triggered()
+{
+ if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked())
+ {
+ ui->actionEnglish->setChecked(false);
+ ui->actionOS_Default->setChecked(false);
+ qDebug() << "Changed Language to hebrew";
+ data->setLocal("he");
+ QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
+ }
+ else
+ ui->actionHebrew->setChecked(true);
+}
+
+void MainScreen::on_actionEnglish_triggered()
+{
+ if (ui->actionHebrew->isChecked() || ui->actionOS_Default->isChecked())
+ {
+ ui->actionHebrew->setChecked(false);
+ ui->actionOS_Default->setChecked(false);
+ qDebug() << "Changed Language to English";
+ data->setLocal("en");
+ QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
+ }
+ else
+ ui->actionEnglish->setChecked(true);
+}
+
+
+void MainScreen::on_actionOS_Default_triggered()
+{
+ if (ui->actionHebrew->isChecked() || ui->actionEnglish->isChecked())
+ {
+ ui->actionHebrew->setChecked(false);
+ ui->actionEnglish->setChecked(false);
+ qDebug() << "Changed Language to OS Default";
+ data->setLocal("default");
+ QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
+ }
+ else
+ ui->actionOS_Default->setChecked(true);
+}
+void MainScreen::checkLocale()
+{
+ if(data->getLocal() == "en")
+ {
+ ui->actionHebrew->setChecked(false);
+ ui->actionOS_Default->setChecked(false);
+ ui->actionEnglish->setChecked(true);
+ }else if(data->getLocal() == "he"){
+ ui->actionHebrew->setChecked(true);
+ ui->actionOS_Default->setChecked(false);
+ ui->actionEnglish->setChecked(false);
+ }else{
+ ui->actionHebrew->setChecked(false);
+ ui->actionOS_Default->setChecked(true);
+ ui->actionEnglish->setChecked(false);
+ }
+}
diff --git a/main/mainscreen.h b/main/mainscreen.h
index b17ceaa..7460c8f 100644
--- a/main/mainscreen.h
+++ b/main/mainscreen.h
@@ -73,20 +73,19 @@ private:
void uiSetDisconnectMode();
void uiSetConnectMode();
void setLabelConnectionStatus(jceLogin::jceStatus statusDescription);
+ void checkLocale();
Ui::MainScreen *ui;
+ QLabel *ButtomStatusLabel;
+ QLabel *statusLabel;
+
user *userLoginSetting;
SaveData *data;
CalendarManager * calendar;
coursesTableManager *courseTableMgr;
loginHandler *loginHandel;
- QLabel *ButtomStatusLabel;
- QLabel *statusLabel;
-
- void showMSG(QString msg);
-
};
#endif // MAINSCREEN_H
diff --git a/main/mainscreen.ui b/main/mainscreen.ui
index 837858b..201f57c 100644
--- a/main/mainscreen.ui
+++ b/main/mainscreen.ui
@@ -45,7 +45,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r
-
+
-
@@ -61,7 +61,7 @@ background: qlineargradient(spread:pad, x1:0.496, y1:0, x2:0.508, y2:1, stop:0 r
QTabWidget::Rounded
- 0
+ 2
false
@@ -153,23 +153,8 @@ font-size: 15px;
QFrame::Raised
-
-
- QLayout::SetDefaultConstraint
-
-
- 20
-
-
- 15
-
-
- 20
-
-
- 15
-
-
-
+
+
-
-
@@ -197,94 +182,117 @@ font-size: 15px;
-
-
-
- 0
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Qt::ImhLatinOnly|Qt::ImhNoPredictiveText
-
-
- 20
-
-
- true
-
-
-
+
+ -
+
-
-
-
-
- 0
- 0
-
-
-
- Username
-
-
- Qt::RichText
-
-
-
-
-
- -
-
-
- 0
-
-
- 0
-
-
-
-
-
-
- 0
- 0
-
-
-
- Password
-
-
- Qt::RichText
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Qt::ImhHiddenText|Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhSensitiveData
-
-
- 20
-
-
- QLineEdit::Password
-
-
- true
-
-
+
+
-
+
+
+
+ 20
+ 20
+
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ImhHiddenText|Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhSensitiveData
+
+
+ 20
+
+
+ QLineEdit::Password
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 81
+ 0
+
+
+
+ Username
+
+
+ Qt::RichText
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::ImhLatinOnly|Qt::ImhNoPredictiveText
+
+
+ 20
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 81
+ 0
+
+
+
+ Password
+
+
+ Qt::RichText
+
+
+
+ -
+
+
+
+
+
+
+
@@ -626,12 +634,12 @@ font-size: 15px;
0
0
855
- 29
+ 21
@@ -695,15 +704,31 @@ font-size: 15px;
OS Default
+
+
+ How To
+
+
usrnmLineEdit
pswdLineEdit
+ keepLogin
loginButton
+ tabWidget
+ checkBoxCoursesInfluence
+ spinBoxCoursesFromYear
+ spinBoxCoursesFromSemester
+ spinBoxCoursesToYear
+ spinBoxCoursesToSemester
ratesButton
- clearTableButton
coursesTable
+ spinBoxYear
+ spinBoxSemester
+ getCalendarBtn
+ clearTableButton
+ exportToCVSBtn
diff --git a/resources/connectionstatus.qrc b/resources/connectionstatus.qrc
index f2b3bdf..895a2c8 100644
--- a/resources/connectionstatus.qrc
+++ b/resources/connectionstatus.qrc
@@ -4,5 +4,6 @@
greenStatusIcon.png
redStatusIcon.png
icon.ico
+ iconX.png
diff --git a/resources/iconX.png b/resources/iconX.png
new file mode 100644
index 0000000..cffc748
Binary files /dev/null and b/resources/iconX.png differ
diff --git a/src/jceData/page.cpp b/src/jceData/page.cpp
index 22eb533..2827500 100644
--- a/src/jceData/page.cpp
+++ b/src/jceData/page.cpp
@@ -27,26 +27,6 @@ int Page::runToActualText(std::string& from, int index)
}
index++;
}
-// while(index < (int)from.length())
-// {
-// if(from[index] == '<')
-// {
-// index++;
-// if(from[index] == '!')
-// {
-// //!--FileName
-// std::string bodyTag = from.substr(index, 11); //!--FileName
-
-// if(bodyTag == "!--FileName") //check if the tag is body tag
-// {
-// while(from[index] != '>')
-// index++;
-// return index;
-// }
-// }
-// }
-// index++;
-//}
return -1;
}