Ignore:
Timestamp:
10/05/11 00:11:03 (11 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
dc66a91
Parents:
a9430aa
Message:

Removed the "Now" tab.
Removed the day navigator inside tabs.
Added a search button in the button bar.

Right now, at least the following does not work:

  • update of favorites
  • conflict editor
  • setting favorite in the event dialog
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/tabcontainer.cpp

    ra9430aa r264f5e7  
    4545    treeView->setItemDelegate(new Delegate(treeView));
    4646
    47     // connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &)));
    48 
    49     connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool)));
     47    connect(treeView, SIGNAL(eventChanged(int,bool)), SIGNAL(eventChanged(int,bool)));
    5048    connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &)));
    5149    connect(treeView, SIGNAL(requestForConflicts(const QModelIndex &)), SLOT(displayConflicts(const QModelIndex &)));
    52 
    53     // day navigator is hidden by default
    54     dayNavigator->hide();
    5550}
    5651
     
    5853{
    5954    int active_id = Conference::activeConference();
    60     dayNavigator->show();
    6155    if (active_id > 0) {
    6256        loadEvents(aDate, active_id);
     
    7670    dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
    7771#endif
    78     connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
     72    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
    7973    dialog.exec();
    80     disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
     74    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
    8175}
    8276
     
    8781    dialog.setFixedWidth(static_cast<QWidget*>(parent())->width());
    8882#endif
    89     connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
     83    connect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
    9084    dialog.exec();
    91     disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool)));
    92 }
    93 
    94 void TabContainer::updateTreeViewModel(int aEventId, bool aReloadModel)
    95 {
    96     if(aReloadModel)
    97     {
    98         // requires special handling
    99         // eg. in case of favourites - some favourites may have changed
    100         // and so we need to reload them
    101         int confId = Conference::activeConference();
    102         QDate startDate = Conference::getById(confId).start();
    103         QDate endDate = Conference::getById(confId).end();
    104         dayNavigator->setDates(startDate, endDate);
    105         updateTreeView(dayNavigator->curDate());
    106     }
    107     else
    108     {
    109         // just update event in the question
    110         static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
    111     }
     85    disconnect(&dialog, SIGNAL(eventChanged(int,bool)), this, SIGNAL(eventChanged(int,bool)));
    11286}
    11387
    11488
    115 void TabContainer::setCurDate(const QDate& curDate) {
     89void TabContainer::redisplayEvent(int aEventId, bool aReloadModel) {
     90    /* if (aReloadModel) updateTreeView(dayNavigator->curDate());
     91    else */ static_cast<EventModel*>(treeView->model())->updateModel(aEventId);
     92}
     93
     94
     95void TabContainer::redisplayDate(const QDate& curDate) {
    11696    updateTreeView(curDate);
    11797}
    11898
    119 
    120 void TabContainer::setDates(const QDate &aStart, const QDate &aEnd)
    121 {
    122     dayNavigator->setDates(aStart, aEnd);
    123 }
    12499
    125100void TabContainer::clearModel()
Note: See TracChangeset for help on using the changeset viewer.