From: kirilma Date: Fri, 23 Apr 2010 06:04:08 +0000 (+0000) Subject: restore viewing of conference map X-Git-Tag: 0.5.0~84 X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/commitdiff_plain/cb7b9997a05a8f529781935e570e25b99c9a1242 restore viewing of conference map --- diff --git a/src/gui/conferenceeditor.cpp b/src/gui/conferenceeditor.cpp index 8e89d36..7d65484 100644 --- a/src/gui/conferenceeditor.cpp +++ b/src/gui/conferenceeditor.cpp @@ -20,6 +20,7 @@ #include "conferencemodel.h" #include "urlinputdialog.h" +#include "mapwindow.h" #include #include @@ -47,6 +48,7 @@ ConferenceEditor::ConferenceEditor(ConferenceModel* model, QWidget* parent) connect(removeBtn, SIGNAL(clicked()), SLOT(removeClicked())); connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked())); connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked())); + connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked())); // it's OK to emit selection signals here // because they are not yet connected to anybody @@ -206,3 +208,16 @@ void ConferenceEditor::importFinished(const QString& title) } itemSelected(QModelIndex(), QModelIndex()); } + +void ConferenceEditor::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(); +} diff --git a/src/gui/conferenceeditor.h b/src/gui/conferenceeditor.h index 336375b..de83d47 100644 --- a/src/gui/conferenceeditor.h +++ b/src/gui/conferenceeditor.h @@ -63,6 +63,7 @@ private slots: void removeClicked(); void changeUrlClicked(); void refreshClicked(); + void conferenceMapClicked(); private: ConferenceModel* model; diff --git a/src/gui/conferenceeditor.ui b/src/gui/conferenceeditor.ui index 8a632be..2f3a9ed 100644 --- a/src/gui/conferenceeditor.ui +++ b/src/gui/conferenceeditor.ui @@ -216,7 +216,7 @@ - + MAP diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 5f38fcc..2cee85c 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -38,7 +38,6 @@ #include "ui_about.h" #include #include "daynavigatorwidget.h" -#include "mapwindow.h" #include "settingsdialog.h" #include "conferenceeditor.h" #include "schedulexmlparser.h" @@ -138,19 +137,6 @@ void MainWindow::aboutApp() dialog.exec(); } -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::eventHasChanged(int aEventId, bool aReloadModel) { dayTabContainer->updateTreeViewModel(aEventId); @@ -271,9 +257,6 @@ void MainWindow::showConferences() connect(this, SIGNAL(conferenceRemoved()), &dialog, SLOT(conferenceRemoved())); - // TODO: propagate press of showMapButton here - // connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked())); - dialog.exec(); // optimization, see useConference() code diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 1d1c4a8..c21d7d8 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -41,7 +41,6 @@ signals: void conferenceRemoved(); private slots: void aboutApp(); - void conferenceMapClicked(); void eventHasChanged(int aEventId, bool aReloadModel); void setup(); // TODO: remove