Changeset ec67a0b


Ignore:
Timestamp:
01/19/10 10:58:48 (13 years ago)
Author:
fortefr <fortefr@…>
Branches:
master, qt5
Children:
e868b2d
Parents:
c5324ca
Message:

Update tabs 2

-This line, and those below, will be ignored--

M src/gui/mainwindow.cpp
M src/gui/mainwindow.h

Location:
src/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    rc5324ca rec67a0b  
    151151}
    152152
    153 void MainWindow::updateDayView(const QDate aDate)
     153void MainWindow::updateDayView(const QDate &aDate)
    154154{
    155155    int confId = 1;
    156     static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId);
     156    static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,confId);
    157157    dayTreeView->reset();
    158158    dayNavigator->show();
    159159}
    160160
    161 void MainWindow::updateTab(const int n)
     161void MainWindow::updateTab(const int aIndex)
    162162{
    163163    int confId = 1;
    164     if(n) //index 1 of tabWidget: favouriteTab
    165     {
    166         static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
    167         favTreeView->reset();
    168     }
    169     else //index 0 of tabWidget: dayViewTab
    170     {
    171         static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId);
    172         dayTreeView->reset();
    173     }
    174     //TODO: update of activitiesTab needed?
     164    switch(aIndex)
     165    {
     166    case 0://index 0 of tabWidget: dayViewTab
     167        {
     168            static_cast<EventModel*>(dayTreeView->model())->loadEvents(Conference::getById(confId).start(),confId);
     169            dayTreeView->reset();
     170        }
     171        break;
     172    case 1: //index 1 of tabWidget: favouritesTab
     173        {
     174                static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
     175                favTreeView->reset();
     176        }
     177        break;
     178    default:
     179        {
     180            //TODO: update of activitiesTab needed?
     181        }
     182    };
     183
    175184    dayNavigator->show();
    176185}
  • src/gui/mainwindow.h

    rc5324ca rec67a0b  
    1919    void showParsingProgress(int aStatus);
    2020    void aboutApp();
    21     void updateDayView(const QDate aDate);
     21    void updateDayView(const QDate &aDate);
    2222    void updateTab(const int n);
    2323    /*void updateFavViewComplete();*/
Note: See TracChangeset for help on using the changeset viewer.