2014-08-31 09:33:27 +00:00
|
|
|
#include "CalendarManager.h"
|
|
|
|
|
2014-09-01 22:19:24 +00:00
|
|
|
CalendarManager::CalendarManager(calendarSchedule *ptr)
|
2014-08-31 09:33:27 +00:00
|
|
|
{
|
2014-09-01 22:19:24 +00:00
|
|
|
this->caliSchedPtr = ptr;
|
2014-08-31 09:33:27 +00:00
|
|
|
}
|
|
|
|
|
2014-09-08 14:29:49 +00:00
|
|
|
void CalendarManager::exportCalendarCSV()
|
2014-08-31 09:33:27 +00:00
|
|
|
{
|
2014-09-08 14:29:49 +00:00
|
|
|
if(CSV_Exporter::exportCalendar(this->caliSchedPtr))
|
|
|
|
{
|
|
|
|
QMessageBox msgBox;
|
|
|
|
msgBox.setText("<center>Exported Successfuly!<br><b>HaazZaA!!");
|
|
|
|
msgBox.exec();
|
|
|
|
}else
|
|
|
|
{
|
|
|
|
QMessageBox msgBox;
|
|
|
|
msgBox.setIcon(QMessageBox::Critical);
|
|
|
|
msgBox.setText("<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");
|
|
|
|
msgBox.exec();
|
|
|
|
}
|
2014-08-31 09:33:27 +00:00
|
|
|
}
|
2014-09-07 19:57:01 +00:00
|
|
|
|
2014-09-08 14:29:49 +00:00
|
|
|
void CalendarManager::setCalendar(std::string html)
|
2014-09-07 19:57:01 +00:00
|
|
|
{
|
2014-09-08 14:29:49 +00:00
|
|
|
caliSchedPtr->setPage(html);
|
2014-09-07 19:57:01 +00:00
|
|
|
}
|