Ignore:
Timestamp:
01/25/10 13:52:01 (12 years ago)
Author:
korrco <korrco@…>
Branches:
master, qt5
Children:
c7b58d4
Parents:
7b70507
Message:

room view added - need to test it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r7b70507 r7620de0  
    5454    connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesView(const QDate &)));
    5555    connect(searchDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateSearchView(const QDate &)));
     56    connect(roomDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateRoomView(const QDate &)));
    5657
    5758    // DAY EVENTS View
     
    9596        nowTreeView->setItemDelegate(new Delegate(nowTreeView));
    9697
     98    // ROOMS View
     99    roomTreeView->setHeaderHidden(true);
     100    roomTreeView->setRootIsDecorated(false);
     101    roomTreeView->setIndentation(0);
     102    roomTreeView->setAnimated(true);
     103    roomTreeView->setModel(new EventModel());
     104    roomTreeView->setItemDelegate(new Delegate(roomTreeView));
     105
    97106    // event details have changed
    98107    connect(dayTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int)));
     
    101110    connect(searchTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int)));
    102111    connect(nowTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int)));
     112    connect(roomTreeView, SIGNAL(eventHasChanged(int)), SLOT(eventHasChanged(int)));
    103113
    104114    // event clicked
     
    108118    connect(searchTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    109119    connect(nowTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     120    connect(roomTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    110121    // request for map to be displayed
    111122    connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     
    114125    connect(searchTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    115126    connect(nowTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     127    connect(roomTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    116128    // request for warning to be displayed
    117129    connect(dayTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     
    120132    connect(searchTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
    121133    connect(nowTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
     134    connect(roomTreeView, SIGNAL(requestForWarning(const QModelIndex &)), SLOT(displayWarning(const QModelIndex &)));
    122135    // event search button clicked
    123136    connect(searchButton, SIGNAL(clicked()), SLOT(searchClicked()));
     
    132145        dayNavigator->hide(); // hide DayNavigatorWidget
    133146        trackDayNavigator->hide();
     147        roomDayNavigator->hide();
    134148    }
    135149    else
     
    141155        favouriteDayNavigator->setDates(aStartDate, aEndDate);
    142156        searchDayNavigator->setDates(aStartDate, aEndDate);
     157        roomDayNavigator->setDates(aStartDate, aEndDate);
    143158        //
    144159        conferenceTitle->setText(Conference::getById(AppSettings::confId()).title());
     
    232247void MainWindow::updateSearchView(const QDate &aDate)
    233248{
     249/*
    234250    searchTreeView->reset();
    235251    int eventsCount = static_cast<EventModel*>(searchTreeView->model())->loadSearchResultEvents(aDate,AppSettings::confId());
     
    245261        searchHead->show();
    246262    }
     263*/
    247264}
    248265
     
    253270    nowTreeView->reset();
    254271    nowTreeView->setAllExpanded(true);
     272}
     273
     274void MainWindow::updateRoomView(const QDate &aDate)
     275{
     276    static_cast<EventModel*>(roomTreeView->model())->loadEventsByRoom(aDate, AppSettings::confId());
     277    roomTreeView->reset();
     278    roomDayNavigator->show();
    255279}
    256280
Note: See TracChangeset for help on using the changeset viewer.