conferenceModel = new ConferenceModel(this);
mXmlParser = new ScheduleXmlParser(sqlEngine, this);
mNetworkAccessManager = new QNetworkAccessManager(this);
+ systemTrayIcon = new QSystemTrayIcon(qApp->windowIcon(), this);
+ alarmTimer = new QTimer(this);
+ alarmTimer->setInterval(60000);
+ alarmTimer->start();
saved_title = windowTitle();
#ifdef N810
// search result has changed
connect(searchTabContainer, SIGNAL(searchResultChanged()), SLOT(onSearchResultChanged()));
+ // systm tray icon
+ connect(systemTrayIcon, SIGNAL(messageClicked()), SLOT(onSystemTrayMessageClicked()));
+
+ // timer
+ connect(alarmTimer, SIGNAL(timeout()), SLOT(onAlarmTimerTimeout()));
useConference(Conference::activeConference());
// optimization, see useConference() code
connect(mXmlParser, SIGNAL(parsingScheduleEnd(int)), conferenceModel, SLOT(newConferenceEnd(int)));
}
+
void MainWindow::on_aboutAction_triggered()
{
QDialog dialog(this);
}
+void MainWindow::onSystemTrayMessageClicked() {
+ // TODO: Hide icon
+}
+
+
+void MainWindow::onAlarmTimerTimeout() {
+ // TODO: Show Message if an alarm is set on an event that's starting soon and delete the corresponding alarm.
+ /* Example:
+ systemTrayIcon->show();
+ systemTrayIcon->showMessage("title", "message", QSystemTrayIcon::Information, 1000);
+ QApplication::alert(this);
+ QApplication::beep();
+ */
+}
+
+
void MainWindow::useConference(int conferenceId)
{
if (conferenceId == -1) // in case no conference is active