From fc477a3239badf6ed8818d71604dd473d92c02d4 Mon Sep 17 00:00:00 2001 From: Liran BN Date: Tue, 9 Sep 2014 11:20:58 +0300 Subject: [PATCH 1/2] error icon on empty string input --- main/mainscreen.cpp | 320 ++++++++++++++++----------------- main/mainscreen.h | 9 +- main/mainscreen.ui | 228 ++++++++++++----------- resources/connectionstatus.qrc | 1 + resources/iconX.png | Bin 0 -> 379 bytes 5 files changed, 279 insertions(+), 279 deletions(-) create mode 100644 resources/iconX.png diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index a7c0ec7..d3bead1 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("&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("&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,7 +240,6 @@ void MainScreen::on_spinBoxCoursesToSemester_editingFinished() } } } - void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item) { if (this->courseTableMgr->changes(item->text(),item->row(),item->column())) @@ -177,93 +247,38 @@ void MainScreen::on_coursesTable_itemChanged(QTableWidgetItem *item) else QMessageBox::critical(this,"Error","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,29 +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() -{ - if (loginHandel->isLoggedInFlag()) - this->calendar->exportCalendarCSV(); -} - void MainScreen::on_actionHebrew_triggered() { if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked()) @@ -348,7 +319,7 @@ void MainScreen::on_actionHebrew_triggered() ui->actionOS_Default->setChecked(false); qDebug() << "Changed Language to hebrew"; data->setLocal("he"); - showMSG("ההגדרות שלך יכנסו לתוקף בהפעלה הבאה של התוכנית"); + QMessageBox::information(this,"Settings","will be valid next time you will run the application",QMessageBox::Ok); } else ui->actionHebrew->setChecked(true); @@ -362,7 +333,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","Your settings will take effect next time you start the program",QMessageBox::Ok); } else ui->actionEnglish->setChecked(true); @@ -377,8 +348,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,"Settings","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..4c846fd 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 - + @@ -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,7 +634,7 @@ font-size: 15px; 0 0 855 - 29 + 21 @@ -642,6 +650,7 @@ font-size: 15px; + @@ -695,11 +704,14 @@ font-size: 15px; OS Default + + + How To + + - usrnmLineEdit - pswdLineEdit loginButton ratesButton clearTableButton 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 0000000000000000000000000000000000000000..cffc748f0809cb1536f56507d2ff0bf1e2b9de7e GIT binary patch literal 379 zcmV->0fhdEP)00009a7bBm000id z000id0mpBsWB>pGElET{R4C77lA%vRQ5eO~a|VNfh?|9t;ER%EGqDkTn?Y?j!`o|; zoQ%IfEk>m=8#am#f*TaKhlwbS3hfoQd&0MUh6|5(dAHrW-`PFC`&~~};jWJ7Ww%Wi z*v+Fs7*PyJ2q?6NY0OJ+=y+ZbMgX!jNf=`Uv!990>}>TZy>$=5D5d?o`|5WLGENCq zRn=Eu9!9@6jbuDh)#Pgw*K5gepsI_H!Qja6mrD&mRW}Z{$>OC0L7`srg@v^!@jR$JJ*;TSJ?j=dZMQ1I;>G1LIk{~bp(Aa*ihO002ovPDHLkV1nsgruF~; literal 0 HcmV?d00001 From 834ee3469ee46960c2484d38ba86a00793de84cc Mon Sep 17 00:00:00 2001 From: liranbg Date: Thu, 11 Sep 2014 06:24:52 +0300 Subject: [PATCH 2/2] translation fixes --- jceGrade.pro | 4 +- jce_en.qm | Bin 4085 -> 5213 bytes jce_en.ts | 480 ++++++++++++-------- jce_he.qm | Bin 3933 -> 4977 bytes jce_he.ts | 635 ++++++++++++++++----------- main/CalendarTab/CalendarManager.cpp | 6 +- main/LoginTab/loginhandler.cpp | 15 +- main/LoginTab/loginhandler.h | 1 + main/mainscreen.cpp | 12 +- main/mainscreen.ui | 19 +- src/jceData/page.cpp | 20 - 11 files changed, 721 insertions(+), 471 deletions(-) diff --git a/jceGrade.pro b/jceGrade.pro index b047781..bcf8eb9 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -9,8 +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 += \ main/mainscreen.ui diff --git a/jce_en.qm b/jce_en.qm index fed56a9ec7bdfff0d5b164502dc13c1e14b3cabd..78fec6eb5b14c4a39a625152cf1033490b6de20c 100644 GIT binary patch literal 5213 zcmcgweQXgdZh8~3NOWxyiFOj5XEkxYn=j&YqmxE=wqM(~obTMb za}py25(vQrtVmNeHcgw5R{q$K28=(3=tf}@qt(zD;*V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mkowP-)G^@rszWG43xa?ic9r{cQJS zR>Y;(kTu|8*PsPNfm1Qem^$8kJWcjf<`5?``z?^z0pb?tjy66zsjkPjX%bSL*iJ$> zS0typj{0Ps+$L($dKo)59?n>nXs`Qt<04_aIz52`!KlIG0`(58uw1Bz+f7+w9RjWJavg0QV||KK^s@kll_Q(|S?9CvPao-BHM zB?4t7U!@s|mt(KX0^(M}miU{aPzG(EQizZvRZmE@am(3(y*OIxQ{eu`-f`Udl#>>l za-DZLsycXFSm%Zo_7#@on73_)2$R!XW{0w!oRQIHUwHDwI=Fj<&67KLydDn<#>uf~ zTAb%-JBT)C|jdVm}u0s*$wd_-o{p=AT>bmV#Ek}i6 zGg_O4qT^KJ(ZQpZn~jCSFd`+|q~#e(`E1-86Wps=dkAUAWydM4L$X1q@o=ie0n?@o z(^ynt%_SR2WGy{qEGXv%8*^o*@Bnx4ggp*59|^CUas$2SI*zCWLU||MNz;%Fvw^c| z4(|;arm(hIchqSjy}i?p-O?>*&Ta^&B4A?G!QX>cxnf8~N-{Hs?>Ajfi7N*&SLSz+ zxFvVZxR#^7ENr9_>~L~~<=w(pJWSFhqiU&w-UBgC3hvyp55(|FVnO(UP+k~VjL$V1 zH%YM|u$-#0hBn9>ASdJe{YeogMtatnR|=(96kLb8*fL;h@f|4wlAdkVm5I|s$K|Ms mE) 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 e0f821f56227cb3248bae53d12e3b7320e4a30de..952a5caae80d7bbfb4454724d26491572079d124 100644 GIT binary patch literal 4977 zcmcgweQXpFR5RpPt`E)bvLp@e)zn`$T(Q zAZq>-(byo?&QRdR7m32pP~c1e@3&B(bQt$cd1zuIc7Wu-p0Nrelj=C))5-)APUX!|unM{ys2={T^@LwgkMP?&hN-QKH~qn@_Sn z^)=6!ujBnY&827m09>!NoPO^Fa6TP)O}QDk-VQ9h{{-xA54`iuQ;-`8{N)(@59R}Z z>)V8Tn;6;4-~T{7umn3TC&i>V3Hxp0`@Ftkxpg%13*h{1XzMuSTgF4hBu!7DE8~ri8emk0*eauid9h* zGve(KUMYx==pE5BvX#Hxr|Cv4VM%E;v2+)t=fqVp5BW7{UG;Q=y<=udH*Tb~1VuJg zQ)*=;Gw=9my-X2GlS5g`P}F^vq*0Rk-M2WIcrLilIrnN)4&NK3k`1i_v?Sd}J$Rph ztbw&{G=(*tQtrOn=^h%u-wwz`#R42!6m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c}mG-p=%J{j&D>MTfMWl_}!e#C%E)T;U>oHUbN$pkZ>Ak`EF1WHvAHjC#KnnF^ zd+>m%8|A6DL4&((m0>|=70=b*k8iqxLdSZLwj7iRsZUDvpnNP3-d7KSLeN+11JP5r zCx^QPjwt^sUBBy1G5nbL_ggB+(lj7pB=i6UV|m|tQDBY+-Pa+{Q2S$$UsGM$Pw53-)|+Nde_~$G|sOttC>O^RrO^jcQ@ntma-4u{SMEmEM%uF zOo=&>CchXHDKR0^j?&@4u|$8gIdII-L$%F;UMrMr4h%F0;sd(rk0+8*(w3;z$?9wXsTT7xlvIHre;_mcgc!xW zd6-P$en~DJ8?50)zwjRXn(!RNe`l6GhB*0vMhYfNayh@B^GcsUT_Il z008pIb2<5J6xVqPgNwKTP$=$-5Volxw7~)MqG)hGStm@f%NW|3RAJ<# zaG@5&oO9Z@D-!R!UtTm&j7c<7TB_Dq%!;X9WM!+Bo_4pMj3`GhxBRsHjFpthy*p<0 zt89AhQ=Q$73UXIYBR%#wotHy24R`ZM0KV}ggHzLpjX`kT$00M2^YFx7 zUmUlht+hivA9}%-QSmFZ9L^LhPr?sR4D^h&xwJ_axOmJ@dR(5#BFh*&_Bch`uUS{tNEI>JZVPzcGS!pdLdxFP?os%*6$w&&ZMi%}geV6)E&W5+0 zsO{)@+Vf20$!CwG5_`C}e3>CqCu@bB;>?o8tl74fYcj$daL&j|rS93jQ#aZ4a#XNf2tP?do zmg?|YYNsHz0@^;($;2m22E`nRtJ{OE{+6MzKd49h2BUgHJ*n0JFEf_2mV6Qm^)_7%pmNDU4Z{+D#Uk=R!6c9X 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 4f41dbf..07b0501 100644 --- a/main/CalendarTab/CalendarManager.cpp +++ b/main/CalendarTab/CalendarManager.cpp @@ -14,14 +14,14 @@ void CalendarManager::exportCalendarCSV() if(CSV_Exporter::exportCalendar(this->caliSchedPtr)) { 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 d3bead1..8d9fb36 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -116,7 +116,7 @@ void MainScreen::uiSetDisconnectMode() ui->pswdLineEdit->setEnabled(true); loginHandel->makeDisconnectionRequest(); - ui->loginButton->setText("&Login"); + ui->loginButton->setText(tr("&Login")); ui->getCalendarBtn->setDisabled(true); ui->exportToCVSBtn->setDisabled(true); ui->ratesButton->setDisabled(true); @@ -164,7 +164,7 @@ void MainScreen::uiSetConnectMode() if (loginHandel->makeConnection() == true) { setLabelConnectionStatus(jceLogin::jceStatus::JCE_YOU_ARE_IN); - ui->loginButton->setText("&Logout"); + ui->loginButton->setText(tr("&Logout")); ui->ratesButton->setEnabled(true); ui->CoursesTab->setEnabled(true); ui->exportToCVSBtn->setEnabled(true); @@ -245,7 +245,7 @@ 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_clearTableButton_clicked() { @@ -319,7 +319,7 @@ void MainScreen::on_actionHebrew_triggered() ui->actionOS_Default->setChecked(false); qDebug() << "Changed Language to hebrew"; data->setLocal("he"); - QMessageBox::information(this,"Settings","will be valid next time you will run the application",QMessageBox::Ok); + QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); } else ui->actionHebrew->setChecked(true); @@ -333,7 +333,7 @@ void MainScreen::on_actionEnglish_triggered() ui->actionOS_Default->setChecked(false); qDebug() << "Changed Language to English"; data->setLocal("en"); - QMessageBox::information(this,"Settings","Your settings will take effect next time you start the program",QMessageBox::Ok); + QMessageBox::information(this,"Settings",tr("Your settings will take effect next time you start the program"),QMessageBox::Ok); } else ui->actionEnglish->setChecked(true); @@ -348,7 +348,7 @@ void MainScreen::on_actionOS_Default_triggered() ui->actionEnglish->setChecked(false); qDebug() << "Changed Language to OS Default"; data->setLocal("default"); - QMessageBox::information(this,"Settings","Your settings will take effect next time you start the program",QMessageBox::Ok); + 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); diff --git a/main/mainscreen.ui b/main/mainscreen.ui index 4c846fd..201f57c 100644 --- a/main/mainscreen.ui +++ b/main/mainscreen.ui @@ -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 @@ -639,7 +639,7 @@ font-size: 15px; - &About + &File @@ -712,10 +712,23 @@ font-size: 15px; + usrnmLineEdit + pswdLineEdit + keepLogin loginButton + tabWidget + checkBoxCoursesInfluence + spinBoxCoursesFromYear + spinBoxCoursesFromSemester + spinBoxCoursesToYear + spinBoxCoursesToSemester ratesButton - clearTableButton coursesTable + spinBoxYear + spinBoxSemester + getCalendarBtn + clearTableButton + exportToCVSBtn 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; }