diff --git a/jceGrade.pro b/jceGrade.pro
index a2c9e16..139040f 100644
--- a/jceGrade.pro
+++ b/jceGrade.pro
@@ -36,7 +36,8 @@ 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
SOURCES += \
main/CalendarTab/CalendarManager.cpp \
@@ -53,5 +54,6 @@ 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
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..8e4bca3 100644
--- a/main/mainscreen.cpp
+++ b/main/mainscreen.cpp
@@ -291,3 +291,8 @@ void MainScreen::on_actionHow_To_triggered()
"");
}
+
+void MainScreen::on_pushButton_2_clicked()
+{
+ CSV_Exporter::exportCalendar(this->calendar->getSch());
+}
diff --git a/main/mainscreen.h b/main/mainscreen.h
index 2ea31d2..0c68e4b 100644
--- a/main/mainscreen.h
+++ b/main/mainscreen.h
@@ -13,6 +13,7 @@
#include "./CourseTab/coursestablemanager.h"
#include "./LoginTab/loginhandler.h"
#include "./CalendarTab/CalendarManager.h"
+#include "../src/jceData/CSV/csv_exporter.h"
#define StatusIconHeight 35
namespace Ui {
@@ -59,6 +60,8 @@ private slots:
void on_checkBoxCoursesInfluence_toggled(bool checked);
+ void on_pushButton_2_clicked();
+
private:
void uiSetDisconnectMode();
diff --git a/main/mainscreen.ui b/main/mainscreen.ui
index df3cece..a9c42a5 100644
--- a/main/mainscreen.ui
+++ b/main/mainscreen.ui
@@ -588,6 +588,13 @@ font-size: 15px;
+ -
+
+
+ Export to CSV
+
+
+
-
@@ -619,7 +626,7 @@ font-size: 15px;
0
0
855
- 21
+ 29