Changeset 872aeaa for src/gui/tabcontainer.cpp
- Timestamp:
- 01/28/10 15:47:21 (13 years ago)
- Branches:
- master, qt5
- Children:
- 83020cd
- Parents:
- eb21333
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/tabcontainer.cpp
reb21333 r872aeaa 27 27 connect(dayNavigator, SIGNAL(dateChanged(const QDate &)), SLOT(updateTreeView(const QDate &))); 28 28 29 connect(treeView, SIGNAL(eventHasChanged(int )), SIGNAL(eventHasChanged(int)));29 connect(treeView, SIGNAL(eventHasChanged(int,bool)), SIGNAL(eventHasChanged(int,bool))); 30 30 connect(treeView, SIGNAL(clicked(const QModelIndex &)), SLOT(itemClicked(const QModelIndex &))); 31 31 connect(treeView, SIGNAL(requestForMap(const QModelIndex &)), SLOT(displayMap(const QModelIndex &))); … … 50 50 51 51 EventDialog dialog(static_cast<Event*>(aIndex.internalPointer())->id(),this); 52 connect(&dialog, SIGNAL(eventHasChanged(int )), this, SIGNAL(eventHasChanged(int)));52 connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool))); 53 53 dialog.exec(); 54 disconnect(&dialog, SIGNAL(eventHasChanged(int )), this, SIGNAL(eventHasChanged(int)));54 disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool))); 55 55 } 56 56 … … 79 79 { 80 80 ConflictsDialog dialog(static_cast<Event*>(aIndex.internalPointer())->id(),this); 81 connect(&dialog, SIGNAL(eventHasChanged(int )), this, SIGNAL(eventHasChanged(int)));81 connect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool))); 82 82 dialog.exec(); 83 disconnect(&dialog, SIGNAL(eventHasChanged(int )), this, SIGNAL(eventHasChanged(int)));83 disconnect(&dialog, SIGNAL(eventHasChanged(int,bool)), this, SIGNAL(eventHasChanged(int,bool))); 84 84 } 85 85 86 void TabContainer::updateTreeViewModel(int aEventId )86 void TabContainer::updateTreeViewModel(int aEventId, bool aReloadModel) 87 87 { 88 static_cast<EventModel*>(treeView->model())->updateModel(aEventId); 88 if(aReloadModel) 89 { 90 // requires special handling 91 // eg. in case of favourities - some favourities may have changed 92 // and so we need to reload them 93 int confId = Conference::activeConference(); 94 QDate startDate = Conference::getById(confId).start(); 95 QDate endDate = Conference::getById(confId).end(); 96 dayNavigator->setDates(startDate, endDate); 97 updateTreeView( Conference::getById(confId).start() ); 98 } 99 else 100 { 101 // just update event in the question 102 static_cast<EventModel*>(treeView->model())->updateModel(aEventId); 103 } 89 104 } 90 105
Note: See TracChangeset
for help on using the changeset viewer.