COPASI API  4.16.103
Public Member Functions | List of all members
CQSortFilterProxyModel Class Reference

#include <CQSortFilterProxyModel.h>

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

Public Member Functions

 CQSortFilterProxyModel ()
 
virtual bool lessThan (const QModelIndex &left, const QModelIndex &right) const
 
 ~CQSortFilterProxyModel ()
 

Detailed Description

Definition at line 16 of file CQSortFilterProxyModel.h.

Constructor & Destructor Documentation

CQSortFilterProxyModel::CQSortFilterProxyModel ( )

Definition at line 17 of file CQSortFilterProxyModel.cpp.

18  : QSortFilterProxyModel()
19 {
20 }
CQSortFilterProxyModel::~CQSortFilterProxyModel ( )

Definition at line 22 of file CQSortFilterProxyModel.cpp.

23 {
24 }

Member Function Documentation

bool CQSortFilterProxyModel::lessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const
virtual

Definition at line 26 of file CQSortFilterProxyModel.cpp.

References CQBaseDataModel::isDefaultRow().

27 {
28  if (dynamic_cast<CQBaseDataModel *>(sourceModel()))
29  {
30  CQBaseDataModel * m = dynamic_cast<CQBaseDataModel *>(sourceModel());
31 
32  if (m->isDefaultRow(left))
33  {
34  if (sortOrder() == Qt::AscendingOrder)
35  return false;
36  else
37  return true;
38  }
39  else if (m->isDefaultRow(right))
40  {
41  if (sortOrder() == Qt::AscendingOrder)
42  return true;
43  else
44  return false;
45  }
46  }
47 
48  return QSortFilterProxyModel::lessThan(left, right);
49 }
virtual bool isDefaultRow(const QModelIndex &i) const

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