Ignore:
Timestamp:
07/04/11 23:42:02 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
526128c
Parents:
8dd3dd2
Message:

Removed the ability to show "pictures" (maps) of rooms and maps of conferences.
The XML file does not contain picture/map/image information of conferences or rooms.
We left the room.picture definition in the database SQL because there is no "drop column"
in sqlite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/tabcontainer.cpp

    r8dd3dd2 re6ab8a2  
    2828
    2929#include "eventdialog.h"
    30 #include "mapwindow.h"
    3130#include "room.h"
    3231#include "errormessage.h"
     
    5049    connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
    5150    connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    52     connect(treeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    5351    connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
    5452
     
    8179    dialog.exec();
    8280    disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
    83 }
    84 
    85 void TabContainer::displayMap(const QModelIndex &aIndex)
    86 {
    87     Event *event = static_cast<Event*>(aIndex.internalPointer());
    88 
    89     QVariant mapPathV = event->room()->map();
    90     QString mapPath;
    91     if (!mapPathV.isValid()) {
    92         error_message("No map for this room");
    93         return;
    94     } else {
    95         mapPath = mapPathV.toString();
    96         if (!QFile::exists(mapPath)) {
    97             error_message("Map for this room not found: " + mapPath);
    98             return;
    99         }
    100     }
    101 
    102     QPixmap map(mapPath);
    103     MapWindow window(map, event->room()->name(),this);
    104     window.exec();
    10581}
    10682
Note: See TracChangeset for help on using the changeset viewer.