Public Member Functions

TreePath Class Reference

Main widget for previewing sensor channel data. More...

#include <treeitem.h>

Inheritance diagram for TreePath:
Inheritance graph
[legend]
Collaboration diagram for TreePath:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TreePath ()
 TreePath (const TreePath &treePath)
bool operator< (const TreePath &other) const

Detailed Description

Main widget for previewing sensor channel data.

Becase sometimes prepending of data is necessary QList is used as base class instead of the conceptually more appropriate QVector.


Constructor & Destructor Documentation

TreePath::TreePath (  ) 

TreePath::TreePath ( const TreePath treePath  ) 

: QList<qint64>(treePath){};


Member Function Documentation

bool TreePath::operator< ( const TreePath other  )  const
Note:
This operator is required by QMap.

It is very important that this function is stable and works as expected because QMaps algorithms depend heavily on it.

                                                     {
    int sizeThis = this->count();
    int sizeOther = other.count();

    if (sizeThis != sizeOther)
        return sizeThis < sizeOther;

    Q_ASSERT(sizeThis == sizeOther);
    for(int i = 0; i < sizeThis; i++) {
        if ((*this)[i] == other[i])
            continue;
        else
            return (*this)[i] < other[i];
    }

    return false;
}


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