Ignore:
Timestamp:
01/20/10 22:02:30 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
8fe9bd2
Parents:
926f106
Message:

changed 'Activity' -> 'Track'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    r926f106 r4693fa6  
    77#include <schedulexmlparser.h>
    88
    9 #include <activity.h>
     9#include <track.h>
    1010#include <eventmodel.h>
    1111#include <delegate.h>
     
    4040    statusBar()->showMessage(tr("Ready"));
    4141
    42     //update activity map
    43     Activity::updateActivityMap();
     42    //update track map
     43    Track::updateTrackMap();
    4444
    4545    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
    46     connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &)));
    47     connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesDayView(const QDate &)));
     46    connect(trackDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTracksView(const QDate &)));
     47    connect(favouriteDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateFavouritesView(const QDate &)));
    4848
    4949    // DAY EVENTS View
     
    6464
    6565    //ACTIVITIES View
    66     actTreeView->setHeaderHidden(true);
    67     actTreeView->setRootIsDecorated(false);
    68     actTreeView->setIndentation(0);
    69     actTreeView->setAnimated(true);
    70     actTreeView->setModel(new EventModel());
    71     actTreeView->setItemDelegate(new Delegate(actTreeView));
     66    trackTreeView->setHeaderHidden(true);
     67    trackTreeView->setRootIsDecorated(false);
     68    trackTreeView->setIndentation(0);
     69    trackTreeView->setAnimated(true);
     70    trackTreeView->setModel(new EventModel());
     71    trackTreeView->setItemDelegate(new Delegate(trackTreeView));
    7272
    7373    // DAY EVENTS View
     
    8383    connect(dayTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    8484    connect(favTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    85     connect(actTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
     85    connect(trackTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    8686    connect(searchTreeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    8787    // request for map to be displayed
    8888    connect(dayTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    8989    connect(favTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    90     connect(actTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
     90    connect(trackTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    9191    connect(searchTreeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &)));
    9292    // event search button clicked
     
    103103    {
    104104        dayNavigator->hide(); // hide DayNavigatorWidget
    105         activityDayNavigator->hide();
     105        trackDayNavigator->hide();
    106106    }
    107107    else
     
    110110        QDate aEndDate = Conference::getById(confId).end();
    111111        dayNavigator->setDates(aStartDate, aEndDate);
    112         activityDayNavigator->setDates(aStartDate, aEndDate);
     112        trackDayNavigator->setDates(aStartDate, aEndDate);
    113113        favouriteDayNavigator->setDates(aStartDate, aEndDate);
    114114    }
     
    162162        QDate aEndDate = Conference::getById(confId).end();
    163163        dayNavigator->setDates(aStartDate, aEndDate);
    164         activityDayNavigator->setDates(aStartDate, aEndDate);
    165     }
    166     //update activity map
    167     Activity::updateActivityMap();
     164        trackDayNavigator->setDates(aStartDate, aEndDate);
     165    }
     166    //update track map
     167    Track::updateTrackMap();
    168168}
    169169
     
    207207        }
    208208        break;
    209     case 2: //index 2 of tabWidget: activitiesTab
    210         {
    211             static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(Conference::getById(confId).start(), confId);
    212             actTreeView->reset();
    213             activityDayNavigator->show();
     209    case 2: //index 2 of tabWidget: trackTab
     210        {
     211            static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(Conference::getById(confId).start(), confId);
     212            trackTreeView->reset();
     213            trackDayNavigator->show();
    214214        }
    215215        break;
     
    221221}
    222222
    223 void MainWindow::updateActivitiesDayView(const QDate &aDate)
    224 {
    225     static_cast<EventModel*>(actTreeView->model())->loadEventsByActivities(aDate, confId);
    226     actTreeView->reset();
    227     activityDayNavigator->show();
    228 }
    229 
    230 void MainWindow::updateFavouritesDayView(const QDate &aDate)
     223void MainWindow::updateTracksView(const QDate &aDate)
     224{
     225    static_cast<EventModel*>(trackTreeView->model())->loadEventsByTrack(aDate, confId);
     226    trackTreeView->reset();
     227    trackDayNavigator->show();
     228}
     229
     230void MainWindow::updateFavouritesView(const QDate &aDate)
    231231{
    232232    static_cast<EventModel*>(favTreeView->model())->loadFavEvents(aDate,confId);
Note: See TracChangeset for help on using the changeset viewer.