diff --git a/jceGrade.pro b/jceGrade.pro
index 43f07ed..85eecfd 100644
--- a/jceGrade.pro
+++ b/jceGrade.pro
@@ -87,3 +87,4 @@ SOURCES += \
src/jceData/Calendar/coursesSchedule/calendarPageCourse.cpp \
src/jceData/Calendar/coursesSchedule/calendarSchedule.cpp \
main/jceWidgets/jcestatusbar.cpp
+
diff --git a/main/main.cpp b/main/main.cpp
index 3af9c9e..e1f2b01 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -20,16 +20,14 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
QTranslator translator;
- QString loco;
SaveData data;
- loco = data.getLocal();
//Loading Local (From Settings file (SaveData.cpp)
- if(loco == "en")
+ if(data.getLocale() == "en")
{
- translator.load("jce_" + loco , a.applicationDirPath());
+ translator.load("jce_" + data.getLocale() , a.applicationDirPath());
qDebug() << Q_FUNC_INFO << "Locale : English Local Loaded";
- }else if(loco == "he"){
- translator.load("jce_" + loco , a.applicationDirPath());
+ }else if(data.getLocale() == "he"){
+ translator.load("jce_" + data.getLocale() , a.applicationDirPath());
qDebug() << Q_FUNC_INFO << "Local : Hebrew Local Loaded";
}else{
translator.load("jce_en" , a.applicationDirPath());
diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp
index 6a98d5b..884d9b5 100644
--- a/main/mainscreen.cpp
+++ b/main/mainscreen.cpp
@@ -45,6 +45,7 @@ MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainSc
}
MainScreen::~MainScreen()
{
+ delete statusBar;
delete calendar;
delete courseTableMgr;
delete userLoginSetting;
@@ -122,7 +123,6 @@ void MainScreen::on_keepLogin_clicked()
}
void MainScreen::on_usrnmLineEdit_editingFinished()
{
- qDebug() << Q_FUNC_INFO << "in: " << ui->tabWidget->currentWidget()->objectName();
ui->usrnmLineEdit->setText(ui->usrnmLineEdit->text().toLower());
}
@@ -244,7 +244,6 @@ void MainScreen::on_revertBtn_clicked()
}
}
-
//EVENTS ON CALENDAR TAB
void MainScreen::on_examsBtn_clicked()
{
@@ -314,104 +313,48 @@ void MainScreen::on_exportToCVSBtn_clicked()
}
}
//EVENTS ON MENU BAR
-void MainScreen::on_actionCredits_triggered()
-{
- qDebug() << Q_FUNC_INFO;
- QMessageBox::about(this, "About",
- "Jce Manager v1.0.0
"
- +tr("License:")+
- "
GNU LESSER GENERAL PUBLIC LICENSE V2.1
"
- +"
"+
- "JceManager Repository"+
- "
"
- +tr("Powered By: ")+
- " Jce Connection
"
- +tr("Developed By")+
- ":
"
- );
-}
-void MainScreen::on_actionExit_triggered()
-{
- qDebug() << Q_FUNC_INFO;
- exit(0);
-}
-void MainScreen::on_actionHow_To_triggered()
-{
- qDebug() << Q_FUNC_INFO;
- QMessageBox::information(this,"How To",
- ""
- +tr("Help Guide")+
- ""
- +tr("
- Login:
- Type your username and password and click Login.
- Once you are connected, you will see a green ball in the right buttom panel.
")
- +tr("
- Getting GPA sheet
- Click on GPA Tab
- Select your dates and click on Add
")
- +tr("
- Average Changing
- Change one of your grade and see the average in the buttom panel changing.
")
- +tr("
- Getting Calendar
- Click on Calendar Tab
- Select your dates and click on Get Calendar
")
- +tr("
- For exporting your calendar to a .CSV file:
- Do previous step and continue to next step
- Click on Export to CSV
- Select your dates and click OK
- Once you're Done, go on your calendar and import your csv file
")+
- "
"
- +tr("For more information, please visit us at: Jce Manager site"));
-}
-void MainScreen::on_actionHebrew_triggered()
-{
- qDebug() << Q_FUNC_INFO;
- if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked())
- {
- ui->actionEnglish->setChecked(false);
- ui->actionOS_Default->setChecked(false);
- qDebug() << Q_FUNC_INFO << "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()
-{
- qDebug() << Q_FUNC_INFO;
- if (ui->actionHebrew->isChecked() || ui->actionOS_Default->isChecked())
- {
- ui->actionHebrew->setChecked(false);
- ui->actionOS_Default->setChecked(false);
- qDebug() << Q_FUNC_INFO << "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()
-{
- qDebug() << Q_FUNC_INFO;
- if (ui->actionHebrew->isChecked() || ui->actionEnglish->isChecked())
- {
- ui->actionHebrew->setChecked(false);
- ui->actionEnglish->setChecked(false);
- qDebug() << Q_FUNC_INFO << "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);
- }
-}
-
+//void MainScreen::on_actionHebrew_triggered()
+//{
+// qDebug() << Q_FUNC_INFO;
+// if (ui->actionEnglish->isChecked() || ui->actionOS_Default->isChecked())
+// {
+// ui->actionEnglish->setChecked(false);
+// ui->actionOS_Default->setChecked(false);
+// qDebug() << Q_FUNC_INFO << "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()
+//{
+// qDebug() << Q_FUNC_INFO;
+// if (ui->actionHebrew->isChecked() || ui->actionOS_Default->isChecked())
+// {
+// ui->actionHebrew->setChecked(false);
+// ui->actionOS_Default->setChecked(false);
+// qDebug() << Q_FUNC_INFO << "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()
+//{
+// qDebug() << Q_FUNC_INFO;
+// if (ui->actionHebrew->isChecked() || ui->actionEnglish->isChecked())
+// {
+// ui->actionHebrew->setChecked(false);
+// ui->actionEnglish->setChecked(false);
+// qDebug() << Q_FUNC_INFO << "Changed Language to OS Default";
+// data->setLocal("default");
+//
+// }
+// else
+// ui->actionOS_Default->setChecked(true);
+//}
//MAIN SCREEN
void MainScreen::on_labelMadeBy_linkActivated(const QString &link)
{
@@ -436,3 +379,78 @@ bool MainScreen::isBusy()
return this->isBlocked;
}
+
+void MainScreen::on_langButton_clicked()
+{
+ qDebug() << Q_FUNC_INFO;
+ if (data->getLocale() == "en")
+ {
+ qDebug() << Q_FUNC_INFO << "Changed lang to he";
+ data->setLocale("he");
+
+ }else if(data->getLocale() == "he"){
+ qDebug() << Q_FUNC_INFO << "Changed lang to en";
+ data->setLocale("en");
+ }else{
+ qCritical() << Q_FUNC_INFO << "currupted data. reset to en";
+ data->reset();
+ data->setLocale("en");
+ }
+ checkLocale();
+
+
+ QMessageBox::information(this,tr("Settings"),tr("Your settings will take effect next time you start the program"),QMessageBox::Ok);
+
+}
+
+void MainScreen::on_creditButton_clicked()
+{
+ qDebug() << Q_FUNC_INFO;
+ QMessageBox::about(this, "About",
+ "Jce Manager v1.0.0
"
+ +tr("License:")+
+ "
GNU LESSER GENERAL PUBLIC LICENSE V2.1
"
+ +"
"+
+ "JceManager Repository"+
+ "
"
+ +tr("Powered By: ")+
+ " Jce Connection
"
+ +tr("Developed By")+
+ ":"
+ );
+}
+
+void MainScreen::on_howtoButton_clicked()
+{
+ qDebug() << Q_FUNC_INFO;
+ QMessageBox::information(this,"How To",
+ ""
+ +tr("Help Guide")+
+ ""
+ +tr("
- Login:
- Type your username and password and click Login.
- Once you are connected, you will see a green ball in the right buttom panel.
")
+ +tr("
- Getting GPA sheet
- Click on GPA Tab
- Select your dates and click on Add
")
+ +tr("
- Average Changing
- Change one of your grade and see the average in the buttom panel changing.
")
+ +tr("
- Getting Calendar
- Click on Calendar Tab
- Select your dates and click on Get Calendar
")
+ +tr("
- For exporting your calendar to a .CSV file:
- Do previous step and continue to next step
- Click on Export to CSV
- Select your dates and click OK
- Once you're Done, go on your calendar and import your csv file
")+
+ "
"
+ +tr("For more information, please visit us at: Jce Manager site"));
+}
+
+void MainScreen::checkLocale()
+{
+ qDebug() << Q_FUNC_INFO;
+ if (data->getLocale() == "en")
+ {
+ ui->langButton->setIcon(QIcon(":/icons/us.png"));
+
+ }else if(data->getLocale() == "he"){
+ ui->langButton->setIcon(QIcon(":/icons/il.png"));
+ }else{
+ qCritical() << Q_FUNC_INFO << "currupted data. reset eng";
+ data->reset();
+ ui->langButton->setIcon(QIcon(":/icons/us.png"));
+
+ }
+}
diff --git a/main/mainscreen.h b/main/mainscreen.h
index b01f990..49d5f70 100644
--- a/main/mainscreen.h
+++ b/main/mainscreen.h
@@ -36,6 +36,7 @@ private slots:
//GPA Tab slots
void on_ratesButton_clicked();
void on_graphButton_clicked();
+ void on_revertBtn_clicked();
void on_clearTableButton_clicked();
void on_coursesTable_itemChanged(QTableWidgetItem *item);
void on_checkBoxCoursesInfluence_toggled(bool checked);
@@ -45,26 +46,21 @@ private slots:
void on_examsBtn_clicked();
void on_exportToCVSBtn_clicked();
- //Menubar slots
- void on_actionCredits_triggered();
- void on_actionExit_triggered();
- void on_actionHow_To_triggered();
- void on_actionHebrew_triggered();
- void on_actionEnglish_triggered();
- void on_actionOS_Default_triggered();
-
//Main screen general slots
void on_spinBoxCoursesFromSemester_valueChanged(int arg1);
void on_spinBoxCoursesFromYear_valueChanged(int arg1);
void on_spinBoxCoursesToYear_valueChanged(int arg1);
void on_spinBoxCoursesToSemester_valueChanged(int arg1);
void on_labelMadeBy_linkActivated(const QString &link);
-// void on_progressBar_valueChanged(int value);
- void on_revertBtn_clicked();
+ //Setting dock
+ void on_langButton_clicked();
+
+ void on_creditButton_clicked();
+
+ void on_howtoButton_clicked();
private:
-
void checkLocale();
bool checkIfValidDates();
diff --git a/main/mainscreen.ui b/main/mainscreen.ui
index ace596d..c323a3f 100644
--- a/main/mainscreen.ui
+++ b/main/mainscreen.ui
@@ -6,7 +6,7 @@
0
0
- 1133
+ 1137
623
@@ -924,33 +924,346 @@ font-size: 15px;
-