COPASI API  4.16.103
Public Member Functions | Protected Slots | Private Attributes | List of all members
CQEFMListWidget Class Reference

#include <CQEFMListWidget.h>

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

Public Member Functions

 CQEFMListWidget (QWidget *parent=0, const char *name=0)
 
bool loadResult (const CEFMTask *pTask)
 
virtual ~CQEFMListWidget ()
 

Protected Slots

virtual void slotFilterChanged ()
 

Private Attributes

CQFluxModeDMmpFluxModeDM
 
CQSortFilterProxyModelmpProxyModel
 
const CEFMTaskmpTask
 

Detailed Description

Definition at line 30 of file CQEFMListWidget.h.

Constructor & Destructor Documentation

CQEFMListWidget::CQEFMListWidget ( QWidget *  parent = 0,
const char *  name = 0 
)

Definition at line 15 of file CQEFMListWidget.cpp.

References COL_ROW_NUMBER, mpFluxModeDM, mpProxyModel, and slotFilterChanged().

15  :
16  QWidget(parent),
17  mpTask(NULL),
18  mpProxyModel(NULL),
19  mpFluxModeDM(NULL)
20 {
21  setObjectName(QString::fromUtf8(name));
22  setupUi(this);
23 
24  mpEFMTable->verticalHeader()->hide();
25  mpEFMTable->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
26  mpEFMTable->sortByColumn(COL_ROW_NUMBER, Qt::AscendingOrder);
27 
28  //Create Source Data Model.
29  mpFluxModeDM = new CQFluxModeDM(this);
30 
31  //Create the Proxy Model for sorting/filtering and set its properties.
33  mpProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
34  mpProxyModel->setFilterKeyColumn(-1);
35 
36  mpProxyModel->setSourceModel(mpFluxModeDM);
37 
38  //Set Model for the TableView
39  mpEFMTable->setModel(NULL);
40  mpEFMTable->setModel(mpProxyModel);
41  mpEFMTable->resizeColumnsToContents();
42 
43  connect(mpEditFilter, SIGNAL(textChanged(const QString &)), this, SLOT(slotFilterChanged()));
44 }
CQFluxModeDM * mpFluxModeDM
const CEFMTask * mpTask
virtual void slotFilterChanged()
CQSortFilterProxyModel * mpProxyModel
#define COL_ROW_NUMBER
CQEFMListWidget::~CQEFMListWidget ( )
virtual

Definition at line 46 of file CQEFMListWidget.cpp.

References mpProxyModel, and pdelete.

47 {
48  // TODO Auto-generated destructor stub
50 }
#define pdelete(p)
Definition: copasi.h:215
CQSortFilterProxyModel * mpProxyModel

Member Function Documentation

bool CQEFMListWidget::loadResult ( const CEFMTask pTask)

Definition at line 52 of file CQEFMListWidget.cpp.

References mpFluxModeDM, mpProxyModel, mpTask, pTask, and CQFluxModeDM::setTask().

53 {
54  mpTask = pTask;
55 
57 
58  mpProxyModel->setSourceModel(mpFluxModeDM);
59 
60  //Set Model for the TableView
61  mpEFMTable->setModel(NULL);
62  mpEFMTable->setModel(mpProxyModel);
63  mpEFMTable->resizeColumnsToContents();
64 
65  return true;
66 }
void setTask(const CEFMTask *pTask)
CQFluxModeDM * mpFluxModeDM
CTSSATask * pTask
const CEFMTask * mpTask
CQSortFilterProxyModel * mpProxyModel
void CQEFMListWidget::slotFilterChanged ( )
protectedvirtualslot

Definition at line 68 of file CQEFMListWidget.cpp.

References mpProxyModel.

Referenced by CQEFMListWidget().

69 {
70  QRegExp regExp(mpEditFilter->text() , Qt::CaseInsensitive, QRegExp::RegExp);
71  mpProxyModel->setFilterRegExp(regExp);
72 }
CQSortFilterProxyModel * mpProxyModel

Member Data Documentation

CQFluxModeDM* CQEFMListWidget::mpFluxModeDM
private

Definition at line 46 of file CQEFMListWidget.h.

Referenced by CQEFMListWidget(), and loadResult().

CQSortFilterProxyModel* CQEFMListWidget::mpProxyModel
private

Definition at line 45 of file CQEFMListWidget.h.

Referenced by CQEFMListWidget(), loadResult(), slotFilterChanged(), and ~CQEFMListWidget().

const CEFMTask* CQEFMListWidget::mpTask
private

Definition at line 44 of file CQEFMListWidget.h.

Referenced by loadResult().


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