Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Application::VideoExcel::SelectionCollection::UpdateItemCounts (  )  [inline]

Definition at line 53 of file SelectionCollection.h.

References Impala::Application::VideoExcel::TableDataSource::GetFilteredRows(), Impala::Application::VideoExcel::TableDataSource::GetMarkedRowsMap(), Impala::Application::VideoExcel::TableDataSource::GetTotalRows(), Impala::Application::VideoExcel::TableDataSource::GetVisibleRowsMap(), ILOG_DEBUG, mItems, and mSource.

Referenced by UpdateSelectionEvent().

00054     {
00055         ILOG_DEBUG("UpdateItemCounts");
00056         std::map<int, int>  marks   = mSource->GetMarkedRowsMap();
00057         std::map<int, bool> visible = mSource->GetVisibleRowsMap();
00058         std::map<int, int>  markcounts;
00059         std::map<int, int>  markviscounts;
00060 
00061         for (int x = 0; x < 9; x++)
00062         {
00063             markcounts[x]    = 0;
00064             markviscounts[x] = 0;
00065         }
00066 
00067         for (int x = 0; x < mSource->GetTotalRows(); x++)
00068         {
00069             if(marks.find(x) != marks.end())
00070             {
00071                 int mark = marks[x];
00072 
00073                 if (mark & 1)   markcounts[1] += 1;
00074                 if (mark & 2)   markcounts[2] += 1;
00075                 if (mark & 4)   markcounts[3] += 1;
00076                 if (mark & 8)   markcounts[4] += 1;
00077                 if (mark & 16)  markcounts[5] += 1;
00078                 if (mark & 32)  markcounts[6] += 1;
00079                 if (mark & 64)  markcounts[7] += 1;
00080                 if (mark & 128) markcounts[8] += 1;
00081                 if (visible[x])
00082                 {
00083                     if (mark & 1)   markviscounts[1] += 1;
00084                     if (mark & 2)   markviscounts[2] += 1;
00085                     if (mark & 4)   markviscounts[3] += 1;
00086                     if (mark & 8)   markviscounts[4] += 1;
00087                     if (mark & 16)  markviscounts[5] += 1;
00088                     if (mark & 32)  markviscounts[6] += 1;
00089                     if (mark & 64)  markviscounts[7] += 1;
00090                     if (mark & 128) markviscounts[8] += 1;
00091                 }
00092             }
00093             else
00094             {
00095                 markcounts[0] += 1;
00096                 if (visible[x])
00097                     markviscounts[0] += 1;
00098             }
00099         }
00100 
00101         for (int x=0; x < 9; x++)
00102             mItems[x + 1]->SetItemCounts(markcounts[x], markviscounts[x]);
00103 
00104         mItems[0]->SetItemCounts(mSource->GetTotalRows(),
00105                                  mSource->GetFilteredRows());
00106         ILOG_DEBUG("UpdateItemCounts done");
00107     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:53:17 2010 for ImpalaSrc by  doxygen 1.5.1