Definition at line 636 of file TableDataView.h. References GetColumn(), GetDoubleDataByID(), GetIntDataByID(), GetNormalizedDataByID(), GetTextDataByID(), mFilterByMark, mFilters, mFiltersActive, mMarkedRows, Impala::Application::MediaTable::TableDataSource::TYPE_DOUBLE, Impala::Application::MediaTable::TableDataSource::TYPE_INT, and Impala::Application::MediaTable::TableDataSource::TYPE_NORMALIZEDVALUE. Referenced by SortAndFilterFloat(), SortAndFilterInt(), and SortAndFilterText(). 00637 { 00638 // filter by marked state: 00639 if (mFilterByMark > -1) 00640 { 00641 if (mMarkedRows.find(id) != mMarkedRows.end()) 00642 { 00643 if (!(mMarkedRows[id] & mFilterByMark)) 00644 return true; 00645 } 00646 else if (mFilterByMark != 0) 00647 return true; 00648 } 00649 00650 // filter by columns: 00651 if (!mFiltersActive) 00652 return false; 00653 00654 std::list<TableFilter*>::iterator it; 00655 for (it=mFilters.begin(); it!=mFilters.end(); it++) 00656 { 00657 00658 /* BUG: the types below DO NOT CORRESPOND with TableDataSource types 00659 this needs to be verified and fixed. -Ork 00660 */ 00661 00662 if ((*it)->GetType() == 1) 00663 { 00664 String txt = GetTextDataByID((*it)->GetColumn(), id); 00665 if ((*it)->IsFilteredByText(txt)) 00666 return true; 00667 } 00668 else if ((*it)->GetType() == 2) 00669 { 00670 switch(GetColumn((*it)->GetColumn())->GetType()) 00671 { 00672 double dVal; 00673 case TableDataSource::TYPE_NORMALIZEDVALUE: 00674 dVal = GetNormalizedDataByID((*it)->GetColumn(),id); 00675 if ((*it)->IsFilteredByValue(dVal)) 00676 return true; 00677 break; 00678 case TableDataSource::TYPE_DOUBLE: 00679 dVal = GetDoubleDataByID((*it)->GetColumn(),id); 00680 if ((*it)->IsFilteredByValue(dVal)) 00681 return true; 00682 break; 00683 case TableDataSource::TYPE_INT: 00684 int iVal = GetIntDataByID((*it)->GetColumn(),id); 00685 // DO: Converts to double automatically? Is this right? 00686 if ((*it)->IsFilteredByValue(iVal)) 00687 return true; 00688 break; 00689 } 00690 } 00691 } 00692 return false; 00693 }
Here is the call graph for this function:
|