implemented some error handling
[toast/confclerk.git] / src / gui / mapwindow.cpp
1 #include "mapwindow.h"
2
3 MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent)
4     : QDialog(aParent)
5 {
6     setupUi(this);
7     setMouseTracking(true); // to receive mouse events
8     setWindowTitle(aName);
9     map->setPixmap(aImage);
10 }
11
12 // it is enough to handle mouseReleaseEvent, instead of
13 // getting/creating mouseClikEvent, since the whole window
14 // is occupied by only-one widget/label (image/map)
15 void MapWindow::mouseReleaseEvent(QMouseEvent *event)
16 {
17     Q_UNUSED(event);
18     close();
19 }
20