Changeset c718a77 for src/mvc/eventmodel.cpp
- Timestamp:
- 01/21/10 23:03:07 (13 years ago)
- Branches:
- master, qt5
- Children:
- d336730
- Parents:
- 1735f55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mvc/eventmodel.cpp
r1735f55 rc718a77 1 1 #include "eventmodel.h" 2 #include <appsettings.h> 2 3 #include <conference.h> 3 4 #include <track.h> … … 220 221 } 221 222 222 void EventModel::emitDataChangedSignal(const QModelIndex &aTopLeft, const QModelIndex &aBottomRight) 223 { 224 emit(dataChanged(aTopLeft,aBottomRight)); 225 } 226 223 void EventModel::updateModel(int aEventId) 224 { 225 for(int i=0; i<mEvents.count(); i++) 226 { 227 if(mEvents[i].id() == aEventId) 228 mEvents[i] = Event::getById(aEventId,AppSettings::confId()); 229 } 230 231 // find the ModelIndex for given aEventId 232 for(int i=0; i<mGroups.count(); i++) 233 { 234 QModelIndex groupIndex = index(i,0,QModelIndex()); 235 for(int j=0; j<mGroups[i].mChildCount; j++) 236 { 237 QModelIndex eventIndex = index(j,0,groupIndex); 238 if(static_cast<Event*>(eventIndex.internalPointer())->id() == aEventId) 239 { 240 emit(dataChanged(eventIndex,eventIndex)); 241 } 242 } 243 } 244 } 245
Note: See TracChangeset
for help on using the changeset viewer.