Changeset e6ab8a2 for src/gui


Ignore:
Timestamp:
07/04/11 23:42:02 (12 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.

Location:
src/gui
Files:
3 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • src/gui/conferenceeditor.cpp

    r8dd3dd2 re6ab8a2  
    2222#include "conferencemodel.h"
    2323#include "urlinputdialog.h"
    24 #include "mapwindow.h"
    2524#include "errormessage.h"
    2625
     
    5150    connect(changeUrl, SIGNAL(clicked()), SLOT(changeUrlClicked()));
    5251    connect(refreshBtn, SIGNAL(clicked()), SLOT(refreshClicked()));
    53     connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
    5452    connect(buttonBox, SIGNAL(rejected()), SLOT(close()));
    5553
     
    9795                + ", " +
    9896                conf.end().toString("dd-MM-yyyy"));
    99 
    100         QString map = conf.map();
    101         if (map.isEmpty()) {
    102             showMapButton->hide();
    103         } else {
    104             showMapButton->show();
    105         }
    106 
    10797        conferenceInfo->setCurrentIndex(0);
    10898        removeBtn->show();
     
    220210}
    221211
    222 void ConferenceEditor::conferenceMapClicked()
    223 {
    224     Conference conf = Conference::getById(selected_id);
    225     QString mapPath = conf.map();
    226     if(mapPath.isEmpty() or !QFile::exists(mapPath)) {
    227         error_message("Map is not available");
    228         return;
    229     }
    230 
    231     QString roomName;
    232 
    233     QPixmap map(mapPath);
    234     MapWindow window(map,roomName,this);
    235     window.exec();
    236 }
  • src/gui/conferenceeditor.h

    r8dd3dd2 re6ab8a2  
    6565    void changeUrlClicked();
    6666    void refreshClicked();
    67     void conferenceMapClicked();
    6867
    6968private:
  • src/gui/conferenceeditor.ui

    r8dd3dd2 re6ab8a2  
    217217            </item>
    218218            <item row="1" column="3">
    219              <widget class="QPushButton" name="showMapButton">
    220               <property name="text">
    221                <string>MAP</string>
    222               </property>
    223               <property name="icon">
    224                <iconset resource="../icons.qrc">
    225                 <normaloff>:/icons/applications-internet.png</normaloff>:/icons/applications-internet.png</iconset>
    226               </property>
    227               <property name="flat">
    228                <bool>true</bool>
    229               </property>
    230              </widget>
    231             </item>
    232             <item row="1" column="4">
    233219             <spacer name="horizontalSpacer_4">
    234220              <property name="orientation">
  • src/gui/gui.pro

    r8dd3dd2 re6ab8a2  
    4444    conflictsdialog.ui \
    4545    tabcontainer.ui \
    46     mapwindow.ui \
    4746    settingsdialog.ui \
    4847    conferenceeditor.ui \
     
    6261    eventdialog.h \
    6362    tabcontainer.h \
    64     mapwindow.h \
    6563    settingsdialog.h \
    6664    conferenceeditor.h \
     
    8078    eventdialog.cpp \
    8179    tabcontainer.cpp \
    82     mapwindow.cpp \
    8380    settingsdialog.cpp \
    8481    conferenceeditor.cpp \
  • 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
  • src/gui/tabcontainer.h

    r8dd3dd2 re6ab8a2  
    5151    virtual void updateTreeView(const QDate &aDate);
    5252    void itemClicked(const QModelIndex &aIndex);
    53     void displayMap(const QModelIndex &aIndex);
    5453    void displayConflicts(const QModelIndex &aIndex);
    5554};
Note: See TracChangeset for help on using the changeset viewer.