jce-manager/main/CalendarTab/CalendarManager.cpp

31 lines
914 B
C++
Raw Normal View History

2014-09-08 15:54:52 +00:00
#include "CalendarManager.h"
CalendarManager::CalendarManager(calendarSchedule *ptr)
{
this->caliSchedPtr = ptr;
}
void CalendarManager::setCalendar(std::string html)
{
caliSchedPtr->setPage(html);
}
2014-09-09 18:24:53 +00:00
void CalendarManager::exportCalendarCSV(CalendarDialog *calDialog)
2014-09-08 15:54:52 +00:00
{
if(CSV_Exporter::exportCalendar(this->caliSchedPtr, calDialog))
2014-09-08 15:54:52 +00:00
{
QMessageBox msgBox;
2014-09-11 03:24:52 +00:00
msgBox.setText(QObject::tr("Exported Successfuly!"));
2014-09-08 15:54:52 +00:00
msgBox.exec();
}else
{
QMessageBox msgBox;
msgBox.setIcon(QMessageBox::Critical);
2014-09-11 03:24:52 +00:00
msgBox.setText(QObject::tr("<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"));
2014-09-08 15:54:52 +00:00
msgBox.exec();
}
}