Changeset 9afc0ee in confclerk_git for src/gui/mainwindow.cpp
- Timestamp:
- 01/19/10 10:09:41 (13 years ago)
- Branches:
- master, qt5
- Children:
- c5324ca
- Parents:
- b1fc17a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
rb1fc17a r9afc0ee 200 200 { 201 201 Event *event = static_cast<Event*>(aIndex.internalPointer()); 202 QString mapPath = QString(":/maps/rooms/%1.png").arg(event->room()); 202 203 // room names are stored in lower-case format 204 // room names are stored without dots in the name, eg. "aw.1124.png" -> "aw1124.png" 205 QString mapPath = QString(":/maps/rooms/%1.png").arg(event->room().toLower().remove(".")); 203 206 if(!QFile::exists(mapPath)) 204 207 mapPath = QString(":/maps/rooms/not-available.png"); 208 209 QString roomName; 210 if(mapPath.contains("not-available", Qt::CaseInsensitive)) 211 roomName = QString("Map is not available: %1").arg(event->room()); 212 else 213 roomName = event->room(); 214 205 215 QPixmap map(mapPath); 206 MapWindow window(map, this);216 MapWindow window(map,roomName,this); 207 217 window.exec(); 208 218 }
Note: See TracChangeset
for help on using the changeset viewer.