Ignore:
Timestamp:
01/18/10 16:25:57 (12 years ago)
Author:
korrco <korrco@…>
Branches:
master, qt5
Children:
28d9e28
Parents:
b6cd05c
Message:

activities tab implemented - not finished yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    rb6cd05c rf6300c7  
    3636
    3737    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
    38 
     38    connect(activityDayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateActivitiesDayView(const QDate &)));
     39    connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(updateView(int)));
    3940
    4041    // DAY EVENTS View
     
    105106        int confId = 1;
    106107        // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates
    107         dayNavigator->setDates(Conference::getById(confId).start(),Conference::getById(confId).end());
     108        dayNavigator->setDates(Conference::getById(confId).start(), Conference::getById(confId).end());
    108109    }
    109110}
     
    145146    updateDayView(Conference::getById(confId).start());
    146147}
     148
     149void MainWindow::updateActivitiesDayView(const QDate &aDate)
     150{
     151    int confId = 1;
     152    static_cast<EventModel*>(activityDayTreeView->model())->loadEventsByActivities(aDate,confId);
     153    activityDayTreeView->reset();
     154    activityDayNavigator->show();
     155}
     156
     157void MainWindow::updateView(int tabIndex)
     158{
     159    //TODO korinpa: skraslit ! aj pre ine taby
     160    qDebug() << "updateView index: " << tabIndex;
     161    if (tabIndex == 2)
     162    {
     163        QDate date = activityDayNavigator->getCurrentDate();
     164        updateActivitiesDayView(date);
     165    }
     166}
     167
Note: See TracChangeset for help on using the changeset viewer.