]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/mainwindow.cpp
Conference map
[toast/confclerk.git] / src / gui / mainwindow.cpp
index 025593c9cf961d8dc9af9f0d2f924c98a6d127f2..ec6fc0e88262013017e00ae5da5066049ffc1f10 100644 (file)
@@ -121,6 +121,8 @@ MainWindow::MainWindow(int aEventId, QWidget *aParent)
     connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     // event search button clicked
     connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
+    // event conference map button clicked
+    connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
     //
     connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(tabHasChanged(int)));
 
@@ -291,6 +293,20 @@ void MainWindow::searchClicked()
     updateSearchView( Conference::getById(AppSettings::confId()).start() );
 }
 
+void MainWindow::conferenceMapClicked()
+{
+
+    QString mapPath = QString(":/maps/campus.png");
+    if(!QFile::exists(mapPath))
+        mapPath = QString(":/maps/rooms/not-available.png");
+
+    QString roomName;
+
+    QPixmap map(mapPath);
+    MapWindow window(map,roomName,this);
+    window.exec();
+}
+
 void MainWindow::displayWarning(const QModelIndex &aIndex)
 {
     Q_UNUSED(aIndex);