- Timestamp:
- 01/28/10 12:25:26 (13 years ago)
- Branches:
- master, qt5
- Children:
- 412cef6
- Parents:
- f5d27c7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mvc/treeview.cpp
rf5d27c7 r438699c 4 4 #include "delegate.h" 5 5 #include "event.h" 6 #include "conference.h" 6 7 #include "eventmodel.h" 7 8 … … 48 49 // handle Favourite Control clicked 49 50 Event event = Event::getById(aIndex.data().toInt(),1); 51 52 QList<Event> conflicts = Event::conflictEvents(event.id(),Conference::activeConference()); 50 53 if(event.isFavourite()) 51 54 event.setFavourite(false); … … 53 56 event.setFavourite(true); 54 57 event.update("favourite"); 58 55 59 qDebug() << " FAVOURITE [" << qVariantValue<QString>(aIndex.data()) << "] -> " << event.isFavourite(); 56 60 // update EVENT_CONFLICT table 57 61 event.updateConflicts(); 62 if(event.isFavourite()) 63 { 64 // event has became 'favourite' and so 'conflicts' list may have changed 65 conflicts = Event::conflictEvents(event.id(),Conference::activeConference()); 66 } 67 58 68 // since the Favourite icon has changed, update TreeViews accordingly 59 69 // all TreeViews have to listen on this signal 60 70 emit(eventHasChanged(event.id())); 71 72 // have to emit 'eventHasChanged' signal on all events in conflict 73 for(int i=0; i<conflicts.count(); i++) 74 emit(eventHasChanged(conflicts[i].id())); 75 61 76 handled = true; 62 77 }
Note: See TracChangeset
for help on using the changeset viewer.