restore viewing of conference map
authorkirilma <kirilma@localhost>
Fri, 23 Apr 2010 06:04:08 +0000 (06:04 +0000)
committerkirilma <kirilma@localhost>
Fri, 23 Apr 2010 06:04:08 +0000 (06:04 +0000)
src/gui/conferenceeditor.cpp
src/gui/conferenceeditor.h
src/gui/conferenceeditor.ui
src/gui/mainwindow.cpp
src/gui/mainwindow.h

index 8e89d36..7d65484 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "conferencemodel.h"
 #include "urlinputdialog.h"
+#include "mapwindow.h"
 
 #include <QInputDialog>
 #include <QItemSelectionModel>
@@ -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();
+}
index 336375b..de83d47 100644 (file)
@@ -63,6 +63,7 @@ private slots:
     void removeClicked();
     void changeUrlClicked();
     void refreshClicked();
+    void conferenceMapClicked();
 
 private:
     ConferenceModel* model;
index 8a632be..2f3a9ed 100644 (file)
              </widget>
             </item>
             <item row="1" column="3">
-             <widget class="QPushButton" name="showMapButton_2">
+             <widget class="QPushButton" name="showMapButton">
               <property name="text">
                <string>MAP</string>
               </property>
index 5f38fcc..2cee85c 100644 (file)
@@ -38,7 +38,6 @@
 #include "ui_about.h"
 #include <eventdialog.h>
 #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
index 1d1c4a8..c21d7d8 100644 (file)
@@ -41,7 +41,6 @@ signals:
     void conferenceRemoved();
 private slots:
     void aboutApp();
-    void conferenceMapClicked();
     void eventHasChanged(int aEventId, bool aReloadModel);
     void setup();
     // TODO: remove