X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/49c5ad320f16383aed85e16a273519844978e9c9..e7340e12904749e2625f25fb858f642d7bfce8f5:/src/gui/mainwindow.cpp diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 025593c..ec6fc0e 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -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);