Definition at line 55 of file SelectionCollection.h. References Impala::Application::MediaTable::TableDataView::GetFilteredRows(), Impala::Application::MediaTable::TableDataView::GetMarkedRowsMap(), Impala::Application::MediaTable::TableDataView::GetTotalRows(), Impala::Application::MediaTable::TableDataView::GetUnfilteredRowsMap(), ILOG_DEBUG, mItems, and mSource. Referenced by LoadCollectionEvent(), and UpdateSelectionEvent(). 00056 { 00057 ILOG_DEBUG("UpdateItemCounts"); 00058 std::map<int, int> marks = mSource->GetMarkedRowsMap(); 00059 std::map<int, bool> visible = mSource->GetUnfilteredRowsMap(); 00060 std::map<int, int> markcounts; 00061 std::map<int, int> markviscounts; 00062 00063 for (int x = 0; x < 9; x++) 00064 { 00065 markcounts[x] = 0; 00066 markviscounts[x] = 0; 00067 } 00068 00069 for (int x = 0; x < mSource->GetTotalRows(); x++) 00070 { 00071 if(marks.find(x) != marks.end()) 00072 { 00073 int mark = marks[x]; 00074 00075 if (mark & 1) markcounts[1] += 1; 00076 if (mark & 2) markcounts[2] += 1; 00077 if (mark & 4) markcounts[3] += 1; 00078 if (mark & 8) markcounts[4] += 1; 00079 if (mark & 16) markcounts[5] += 1; 00080 if (mark & 32) markcounts[6] += 1; 00081 if (mark & 64) markcounts[7] += 1; 00082 if (mark & 128) markcounts[8] += 1; 00083 if (visible[x]) 00084 { 00085 if (mark & 1) markviscounts[1] += 1; 00086 if (mark & 2) markviscounts[2] += 1; 00087 if (mark & 4) markviscounts[3] += 1; 00088 if (mark & 8) markviscounts[4] += 1; 00089 if (mark & 16) markviscounts[5] += 1; 00090 if (mark & 32) markviscounts[6] += 1; 00091 if (mark & 64) markviscounts[7] += 1; 00092 if (mark & 128) markviscounts[8] += 1; 00093 } 00094 } 00095 else 00096 { 00097 markcounts[0] += 1; 00098 if (visible[x]) 00099 markviscounts[0] += 1; 00100 } 00101 } 00102 00103 for (int x=0; x < 9; x++) 00104 mItems[x + 1]->SetItemCounts(markcounts[x], markviscounts[x]); 00105 00106 mItems[0]->SetItemCounts(mSource->GetTotalRows(), 00107 mSource->GetFilteredRows()); 00108 ILOG_DEBUG("UpdateItemCounts done"); 00109 }
Here is the call graph for this function:
|