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 Avg Calculator - JCE Manager + JCE Avg Calculator - + Login Login - + Keep login Keep login - <color=#000000>Username - Usernameasdfasdg - - - - + Username Username - + Password Password - - Courses - Grade Table + + GPA + GPA - + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> - Get Your Grades + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> - + Add Add - + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> - Clear Table + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> - + Clear Clear - + Average: Average: - - Settings - Sattings + + Only Main Courses + Only Main Courses - - Semester - Senester - - - - Year - Year - - - + From - From + <b>From</b> - + + + Year: + Year: + + + + Semester: + Semester: + + + To - To + <b>To</b> - - Only influence Courses - Only influence Courses + + Semester + Semester - - &About - &About + + Calendar + Calendar - + + Get Calendar + Get Calendar + + + + Export to CSV + Export to .CSV + + + + &File + &File + + + + Language + Language + + + Credits Credits - + Exit Exit - - How-To - How-To + + Hebrew + עברית - + + English + English + + + + OS Default + OS Default + + + + How To + How To + + + + Connecting + Connecting + + + + Connected + Connected + + + + Disconnected + Disconnected + + + + &Login + &Login + + + + &Logout + Log&out + + + + + Error Error - + + Not Connected Not Connected - - -CREDITS-ROOL-UP1 -A tiny Application to calculate your grades average. - - - -CREDITS-ROOL-UP2 -This software is licensed under Qt5's - - - - -CREDITS-ROOL-UP3 -The source code is available at github: - - - - -CREDITS-ROOL-UP4 -This front end is Powered by - - - - -DevBy -Developed By - - - - -Liran -Liran Ben Gida - - - - -Sagi -Sagi Dayan - - - - -Nadav -Nadav Luzzato - - - - -Tnks -Thanks to - - - - - -Code -Code - - - -Name -Course - - - -Type -Type - - - -Points -Points - - - -Hours -Weekly Hours - - - -Grade -Grade - - - -Additions -Additions - - - - - -HELP1 -Insert your username and password correctly - - - -HELP2 -Login and wait for the ball in the status (buttom) bar to become Green - - - -HELP3 -Check the Settings to select your date Interval - - - -HELP4 -Press Courses tab and then press the Add button and wait until courses will be loaded into the table - - - -HELP5 -Change the once of the grade cell and see your average is changing. - - - -HELP6 -Tip: Need to change Date interval? in Courses tab click Clean, then change the date interval then hit the Add button again! :-) - - - + + Missmatching data + Missmatching Data + + + + CREDITS-ROOL-UP1 + + + + + CREDITS-ROOL-UP2 + + + + + CREDITS-ROOL-UP3 + + + + + CREDITS-ROOL-UP4 + + + + + DevBy + Developed By + + + + Liran + Liran Ben Gida + + + + Sagi + Sagi Dayan + + + + HELP1 + + + + + HELP2 + + + + + HELP3 + + + + + HELP4 + + + + + HELP5 + + + + + HELP6 + + + + + + Settings + Settings + + + + + + Your settings will take effect next time you start the program + Your settings will take effect next time you start the program + + + + QObject + + + Exported Successfuly! + Exported Successfuly! + + + + <center>Something went wrong...<br></center>Maybe: <ul><li>You Canceled</li><li>Unable to save the File - try again</li></ul><br><br><b><center>In case of a serious problem, please file a bug report.<br>thank you. OpenJCE teem + + + + + Code + Code + + + + Name + Name + + + + Type + Type + + + + Points + Points + + + + Hours + Hours + + + + Grade + Grade + + + + Additions + Additions + + + + Please Check Your Username & Password + Please Check Your Username & Password + + + + You have been blocked by JCE, please try in a couple of minutes. + You have been <b>blocked</b> by JCE, please try in a couple of minutes. + + + + Please Check Your Internet Connection. + Please Check Your Internet Connection. + + + + Receive Request Timeout. + Receive Request Timeout. + + + + Send Request Timeout. + Send Request Timeout. + + + + +If this message appear without reason, please contact me at liranbg@gmail.com + +If this message appear without reason, please contact me at liranbg@gmail.com + + + + Error + Error + + + + Sunday + Sunday + + + + Monday + Monday + + + + Tuesday + Thesday + + + + Wednesday + Wednesday + + + + Thursday + Thursday + + + + Friday + 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 Avg Calculator -JCE Manager - - - - -Login -התחבר - - - -Keep login -שמור פרטים - - - - -Username -שם משתמש - - - -Password -סיסמה - - - -Courses -גיליון ציונים - - - -<html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> -קבל את הציונים שלך - - - -Add -הוספה - - - -<html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> -נקה טבלה - - - -Clear -נקה - - - -Average: -ממוצע: - - - -Settings -הגדרות - - - -Semester -סמסטר - - - -Year -שנה - - - -From -מסמסטר - - - -To -לסמסטר - - - -Only influence Courses -רק קורסים בעלי השפעה - - - -&About -&אודות - - - -Credits -אודות - - - -Exit -יציאה - - - -How-To -עזרה - - - -Error -שגיאה - - - -Not Connected -לא התחבר - - - -Connecting -מנסה להתחבר - - - -Connected -מחובר - - - -Disconnected -מנותק - - - -CREDITS-ROOL-UP1 -אפליקציה קטנה לחישוב ציונים - - - -CREDITS-ROOL-UP2 -רישיון השימוש בתוכנה ובקוד הפתוח רשום תחת - - - - -CREDITS-ROOL-UP3 -כל קוד המקור של התוכנה נמצא בגיטהאב: - - - - -CREDITS-ROOL-UP4 -התוכנה פועלת בעזרת המנוע - - - - -DevBy -פותח ע"י - - - - -Liran -לירן בן גידה - - - - -Sagi -שגיא דיין - - - - -Nadav -נדב לוצטו - - - - -Tnks -תודה רבה ל - - - - - -Code -קוד קורס - - - -Name -קורס - - - -Type -סוג - - - -Points -נקודות זכות - - - -Hours -שעות שבועיות - - - -Grade -ציון - - - -Additions -הערות - - - - -HELP1 -הכנס את שם המשתמש והסיסמה כמו שצריך - - - -HELP2 -לחץ התחבר והמתן על שהתוכנה תתחבר, עיגול ירוק למטה - - - -HELP3 -הכנס להגדרות כדי לבחור את טווח הגיליון - - - -HELP4 -לחץ על העמוד של גיליון הציונים ולחץ הוספהת המתן עד שהציונים יופיעו בטבלה - - - -HELP5 -שנה ושחק עם הציונים כדי לראות את הממוצע משתנה - - - -HELP6 -טיפ: רוצה לשנות את תקופת הזמן? לחץ על נקה, ולאחר מכן שנה את תקופת הזמן ולחץ על הוספה שוב! :-) - - - - + MainScreen + + + JCE Avg Calculator + JCE Avg Calculator + + + + + Login + כניסה + + + + Keep login + שמור פרטים + + + + Username + שם משתמש + + + + Password + סיסמה + + + + GPA + גליון ציונים + + + + <html><head/><body><p><span style=" font-weight:600;">Get your grades</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">ציונים הצג</span></p></body></html> + + + + Add + הוסף + + + + <html><head/><body><p><span style=" font-weight:600;">Clear table</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">טבלה נקהe</span></p></body></html> + + + + Clear + נקה + + + + Average: + ממוצע: + + + + Only Main Courses + הצג קורסים משמעותיים בלבד + + + + From + <b>מסמסטר</b> + + + + + Year: + שנה: + + + + Semester: + סמסטר: + + + + To + <b>עד סמסטר</b> + + + + Semester + סמסטר + + + + Calendar + מערכת שעות + + + + Get Calendar + הצג מערכת + + + + Export to CSV + CSV ייצא אל קובץ + + + + &File + &קובץ + + + + Language + שפה + + + + Credits + קרדיט + + + + Exit + יציאה + + + + Hebrew + עברית + + + + English + English + + + + OS Default + ברירת מחדל + + + + How To + עזרה + + + + Connecting + מתחבר + + + + Connected + מחובר + + + + Disconnected + מנותק + + + + &Login + &התחברות + + + + &Logout + &התנתקות + + + + + + Error + שגיאה + + + + + Not Connected + לא מחובר + + + + Missmatching data + שגיאה בהכנסת נתונים + + + + CREDITS-ROOL-UP1 + + + + + CREDITS-ROOL-UP2 + + + + + CREDITS-ROOL-UP3 + + + + + CREDITS-ROOL-UP4 + + + + + DevBy + פותח על ידי + + + + Liran + לירן בן גידה + + + + Sagi + שגיא דיין + + + + HELP1 + + + + + HELP2 + + + + + HELP3 + + + + + HELP4 + + + + + HELP5 + + + + + HELP6 + + + + + + Settings + הגדרות + + + + + + Your settings will take effect next time you start the program + ההגדרות שלך ייכנסו לתוקפן בפעם הבאה שתפעיל את התוכנה + + + + QObject + + + Exported Successfuly! + הייצוא הושלם! + + + + <center>Something went wrong...<br></center>Maybe: <ul><li>You Canceled</li><li>Unable to save the File - try again</li></ul><br><br><b><center>In case of a serious problem, please file a bug report.<br>thank you. OpenJCE teem + + + + + Code + קוד קורס + + + + Name + שם קורס + + + + Type + סוג + + + + Points + נק' זכות + + + + Hours + שעות + + + + Grade + ציון + + + + Additions + תוספת + + + + Please Check Your Username & Password + אנא בדוק את שם המשתמש והסיסמה שלך + + + + You have been blocked 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 + +אם הודעה זו חוזרת על עצמה ללא סיבה. אנא פנה אל המפתח במייל liranbg@gmail.com + + + + Error + שגיאה + + + + Sunday + ראשון + + + + Monday + שני + + + + Tuesday + שלישי + + + + Wednesday + רביעי + + + + Thursday + חמישי + + + + Friday + שישי + 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 - &About + &File @@ -642,6 +650,7 @@ font-size: 15px; + @@ -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; }