OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
RoiSort Class Reference

Simple comparator class for sorting ROIs in the Roi Manager. More...

+ Collaboration diagram for RoiSort:

Public Member Functions

 RoiSort (std::map< WROI::RefPtr, int > indexMap)
 COnstructor. More...
 
bool operator() (WROI::RefPtr a, WROI::RefPtr b)
 Operator to compare the order of two ROIs. More...
 

Private Attributes

std::map< WROI::RefPtr, int > m_indexMap
 Map needed to know the index in the GUI representation. More...
 

Detailed Description

Simple comparator class for sorting ROIs in the Roi Manager.

Definition at line 150 of file WQtBranchTreeItem.cpp.

Constructor & Destructor Documentation

◆ RoiSort()

RoiSort::RoiSort ( std::map< WROI::RefPtr, int >  indexMap)
inlineexplicit

COnstructor.

Parameters
indexMapthe map is used to compare each ROI with their Qt index.

Definition at line 158 of file WQtBranchTreeItem.cpp.

Member Function Documentation

◆ operator()()

bool RoiSort::operator() ( WROI::RefPtr  a,
WROI::RefPtr  b 
)
inline

Operator to compare the order of two ROIs.

Parameters
afirst ROI
bsecond ROI
Returns
true if first is in front of second

Definition at line 172 of file WQtBranchTreeItem.cpp.

References m_indexMap.

Member Data Documentation

◆ m_indexMap

std::map< WROI::RefPtr, int > RoiSort::m_indexMap
private

Map needed to know the index in the GUI representation.

Definition at line 180 of file WQtBranchTreeItem.cpp.

Referenced by operator()().


The documentation for this class was generated from the following file: