Ignore:
Timestamp:
01/17/10 18:18:22 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
9f473ba
Parents:
c790268
Message:

started work on 'favourities'

  • created tavourities tree view in the MainWindow? 'Favourities' tab
  • listed some testing 'fav' events
  • TODO: list isn't updated dynamically, which means that the list isn't updated if the user adds/removes an event(s) to/from the 'favourities' list
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/mainwindow.cpp

    rc790268 r6f39595  
    3737    connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateDayView(const QDate &)));
    3838
    39     treeView->setHeaderHidden(true);
    40     treeView->setRootIsDecorated(false);
    41     treeView->setIndentation(0);
    42     treeView->setAnimated(true);
    43     treeView->setModel(new EventModel());
    44     treeView->setItemDelegate(new Delegate(treeView));
     39    // DAY EVENTS View
     40    dayTreeView->setHeaderHidden(true);
     41    dayTreeView->setRootIsDecorated(false);
     42    dayTreeView->setIndentation(0);
     43    dayTreeView->setAnimated(true);
     44    dayTreeView->setModel(new EventModel());
     45    dayTreeView->setItemDelegate(new Delegate(dayTreeView));
     46
     47    // FAVOURITIES View
     48    favTreeView->setHeaderHidden(true);
     49    favTreeView->setRootIsDecorated(false);
     50    favTreeView->setIndentation(0);
     51    favTreeView->setAnimated(true);
     52    favTreeView->setModel(new EventModel());
     53    favTreeView->setItemDelegate(new Delegate(favTreeView));
     54    // TESTING: load some 'fav' data
     55    if(Conference::getAll().count()) // no conference(s) in the DB
     56    {
     57        int confId = 1;
     58        static_cast<EventModel*>(favTreeView->model())->loadFavEvents(Conference::getById(confId).start(),confId);
     59        favTreeView->reset();
     60    }
    4561
    4662    if(!Conference::getAll().count()) // no conference(s) in the DB
     
    104120{
    105121    int confId = 1;
    106     static_cast<EventModel*>(treeView->model())->loadEvents(aDate,confId);
    107     treeView->reset();
     122    static_cast<EventModel*>(dayTreeView->model())->loadEvents(aDate,confId);
     123    dayTreeView->reset();
    108124    dayNavigator->show();
    109125}
Note: See TracChangeset for help on using the changeset viewer.