connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
// event search button clicked
connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
+ // event conference map button clicked
+ connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
//
connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(tabHasChanged(int)));
updateSearchView( Conference::getById(AppSettings::confId()).start() );
}
+void MainWindow::conferenceMapClicked()
+{
+
+ QString mapPath = QString(":/maps/campus.png");
+ if(!QFile::exists(mapPath))
+ mapPath = QString(":/maps/rooms/not-available.png");
+
+ QString roomName;
+
+ QPixmap map(mapPath);
+ MapWindow window(map,roomName,this);
+ window.exec();
+}
+
void MainWindow::displayWarning(const QModelIndex &aIndex)
{
Q_UNUSED(aIndex);
void displayMap(const QModelIndex &aIndex);
void displayWarning(const QModelIndex &aIndex);
void searchClicked();
+ void conferenceMapClicked();
void tabHasChanged(int aIndex);
void eventHasChanged(int aEventId);
private:
</item>
</layout>
</widget>
- <widget class="QWidget" name="mapTab" >
- <attribute name="title" >
- <string>Map</string>
- </attribute>
- </widget>
- <widget class="QWidget" name="conferenceTab" >
- <attribute name="title" >
+ <widget class="QWidget" name="conferenceTab" >
+ <attribute name="title" >
<string>Conference</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5" >
{
return id;
}
- else
- {
- if ((mControls[id]->drawRect(static_cast<QTreeView*>(parent())->visualRect(aIndex)).contains(aPoint))
+ else if ((mControls[id]->drawRect(static_cast<QTreeView*>(parent())->visualRect(aIndex)).contains(aPoint))
&& (mControls[id]->hasConflict))
- {
+ {
+ qDebug() << "tengo conflicto";
return id;
- }
}
+
}
return ControlNone;