Changeset cb7b999


Ignore:
Timestamp:
04/23/10 08:04:08 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
3cdaf7d
Parents:
66428e7
Message:

restore viewing of conference map

Location:
src/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r66428e7 rcb7b999  
    2121#include "conferencemodel.h"
    2222#include "urlinputdialog.h"
     23#include "mapwindow.h"
    2324
    2425#include <QInputDialog>
     
    4849    connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked()));
    4950    connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked()));
     51    connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
    5052
    5153    // it's OK to emit selection signals here
     
    207209    itemSelected(QModelIndex(), QModelIndex());
    208210}
     211
     212void ConferenceEditor::conferenceMapClicked()
     213{
     214    QString mapPath = QString(":/maps/campus.png");
     215    if(!QFile::exists(mapPath))
     216        mapPath = QString(":/maps/rooms/not-available.png");
     217
     218    QString roomName;
     219
     220    QPixmap map(mapPath);
     221    MapWindow window(map,roomName,this);
     222    window.exec();
     223}
  • src/gui/conferenceeditor.h

    r66428e7 rcb7b999  
    6464    void changeUrlClicked();
    6565    void refreshClicked();
     66    void conferenceMapClicked();
    6667
    6768private:
  • src/gui/conferenceeditor.ui

    r66428e7 rcb7b999  
    217217            </item>
    218218            <item row="1" column="3">
    219              <widget class="QPushButton" name="showMapButton_2">
     219             <widget class="QPushButton" name="showMapButton">
    220220              <property name="text">
    221221               <string>MAP</string>
  • src/gui/mainwindow.cpp

    r66428e7 rcb7b999  
    3939#include <eventdialog.h>
    4040#include "daynavigatorwidget.h"
    41 #include "mapwindow.h"
    4241#include "settingsdialog.h"
    4342#include "conferenceeditor.h"
     
    139138}
    140139
    141 void MainWindow::conferenceMapClicked()
    142 {
    143     QString mapPath = QString(":/maps/campus.png");
    144     if(!QFile::exists(mapPath))
    145         mapPath = QString(":/maps/rooms/not-available.png");
    146 
    147     QString roomName;
    148 
    149     QPixmap map(mapPath);
    150     MapWindow window(map,roomName,this);
    151     window.exec();
    152 }
    153 
    154140void MainWindow::eventHasChanged(int aEventId, bool aReloadModel)
    155141{
     
    272258    connect(this, SIGNAL(conferenceRemoved()), &dialog, SLOT(conferenceRemoved()));
    273259
    274     // TODO: propagate press of showMapButton here
    275     // connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
    276 
    277260    dialog.exec();
    278261
  • src/gui/mainwindow.h

    r66428e7 rcb7b999  
    4242private slots:
    4343    void aboutApp();
    44     void conferenceMapClicked();
    4544    void eventHasChanged(int aEventId, bool aReloadModel);
    4645    void setup();
Note: See TracChangeset for help on using the changeset viewer.