diff --git a/jceGrade.pro b/jceGrade.pro index a2c9e16..3a9950b 100644 --- a/jceGrade.pro +++ b/jceGrade.pro @@ -36,7 +36,9 @@ HEADERS += \ src/jceSettings/jceLoginHtmlScripts.h \ src/jceSettings/user.h \ src/jceData/Calendar/calendarCourse.h \ - src/jceData/Calendar/calendarSchedule.h + src/jceData/Calendar/calendarSchedule.h \ + src/jceData/CSV/csv_exporter.h \ + src/appDatabase/simplecrypt.h SOURCES += \ main/CalendarTab/CalendarManager.cpp \ @@ -53,5 +55,7 @@ SOURCES += \ src/jceSettings/jcelogin.cpp \ src/jceSettings/user.cpp \ src/jceData/Calendar/calendarCourse.cpp \ - src/jceData/Calendar/calendarSchedule.cpp + src/jceData/Calendar/calendarSchedule.cpp \ + src/jceData/CSV/csv_exporter.cpp \ + src/appDatabase/simplecrypt.cpp diff --git a/main/CalendarTab/CalendarManager.cpp b/main/CalendarTab/CalendarManager.cpp index ebb9899..addeaac 100644 --- a/main/CalendarTab/CalendarManager.cpp +++ b/main/CalendarTab/CalendarManager.cpp @@ -9,3 +9,8 @@ void CalendarManager::setCalendar(std::string html) { caliSchedPtr->setPage(html); } + +calendarSchedule *CalendarManager::getSch() +{ + return this->caliSchedPtr; +} diff --git a/main/CalendarTab/CalendarManager.h b/main/CalendarTab/CalendarManager.h index 042e831..e7a9737 100644 --- a/main/CalendarTab/CalendarManager.h +++ b/main/CalendarTab/CalendarManager.h @@ -16,6 +16,7 @@ public: void setCalendar(std::string html); void resetTable() { if (caliSchedPtr != NULL) caliSchedPtr->clearTableItems(); } + calendarSchedule* getSch(); private: calendarSchedule * caliSchedPtr; }; diff --git a/main/mainscreen.cpp b/main/mainscreen.cpp index bb26fc3..b7f4d6b 100644 --- a/main/mainscreen.cpp +++ b/main/mainscreen.cpp @@ -291,3 +291,20 @@ void MainScreen::on_actionHow_To_triggered() ""); } + +void MainScreen::on_pushButton_2_clicked() +{ + if(CSV_Exporter::exportCalendar(this->calendar->getSch())) + { + QMessageBox msgBox; + msgBox.setText("