Brief description of class still missing. More...
#include <StudentTestCurveModel.h>
Public Member Functions | |
| virtual int | columnCount (const QModelIndex &) const |
| virtual QVariant | data (const QModelIndex &index, int role) const |
| virtual Qt::ItemFlags | flags (const QModelIndex &) const |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent) const |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| virtual int | rowCount (const QModelIndex &parent) const |
| void | setWindowList (const QList< WinResults * > &l) |
| AbstractStation * | station (const QModelIndex &index) const |
| StationResults * | stationResults (const QModelIndex &index) const |
| StudentTestCurveModel (QObject *parent=0) | |
| WinResults * | winResults (const QModelIndex &index) const |
| ~StudentTestCurveModel () | |
Brief description of class still missing.
Full description of class still missing
| MonoStation::StudentTestCurveModel::StudentTestCurveModel | ( | QObject * | parent = 0 | ) |
| int MonoStation::StudentTestCurveModel::columnCount | ( | const QModelIndex & | ) | const [virtual] |
| QVariant MonoStation::StudentTestCurveModel::data | ( | const QModelIndex & | index, |
| int | role | ||
| ) | const [virtual] |
References MonoStation::AbstractStation::name(), station(), TRACE, w, and winResults().
| Qt::ItemFlags MonoStation::StudentTestCurveModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
References MonoStation::AbstractStation::graphCount(), station(), TRACE, w, and winResults().
{
TRACE;
WinResults * w=winResults(index);
if(w) {
return Qt::ItemIsEnabled;
} else {
AbstractStation * s=station(index);
if(s) {
if(s->graphCount()==1) {
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
} else {
return Qt::ItemIsEnabled;
}
} else {
return Qt::ItemIsSelectable | Qt::ItemIsEnabled;
}
}
}
| QModelIndex MonoStation::StudentTestCurveModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent | ||
| ) | const [virtual] |
References MonoStation::AbstractStation::results(), station(), MonoStation::WinResults::station(), TRACE, w, and winResults().
{
TRACE;
if(!parent.isValid()) {
return createIndex(row, column, _winList.at(row));
} else {
WinResults * w=winResults(parent);
if(w) {
return createIndex(row, column, w->station(row));
} else {
AbstractStation * s=station(parent);
if(s) {
return createIndex(row, column, s->results(row));
} else {
return QModelIndex();
}
}
}
}
| QModelIndex MonoStation::StudentTestCurveModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
References MonoStation::AbstractStation::indexOf(), MonoStation::WinResults::indexOf(), MonoStation::StationResults::parent(), MonoStation::AbstractStation::parent(), station(), stationResults(), TRACE, w, and winResults().
{
TRACE;
if(!index.isValid()) {
return QModelIndex();
} else {
WinResults * w=winResults(index);
if(w) {
return QModelIndex();
} else {
AbstractStation * s=station(index);
if(s) {
return createIndex(s->parent()->indexOf(s), 0, s->parent());
} else {
StationResults * r=stationResults(index);
return createIndex(r->parent()->indexOf(r), 0, r->parent());
}
}
}
}
| int MonoStation::StudentTestCurveModel::rowCount | ( | const QModelIndex & | parent | ) | const [virtual] |
| void MonoStation::StudentTestCurveModel::setWindowList | ( | const QList< WinResults * > & | l | ) |
References MonoStation::AbstractStation::graphCount(), MonoStation::AbstractStation::results(), MonoStation::StationResults::setParent(), MonoStation::AbstractStation::setParent(), MonoStation::WinResults::station(), MonoStation::WinResults::stationCount(), TRACE, and w.
Referenced by MonoStation::StudentTest::init().
{
TRACE;
_winList=l;
// Make sure parents are properly setup
for(QList<WinResults *>::iterator it=_winList.begin(); it!=_winList.end(); it++) {
WinResults * w=*it;
int nStations=w->stationCount();
for(int iStation=0; iStation<nStations; iStation++) {
AbstractStation * s=w->station(iStation);
s->setParent(w);
int nResults=s->graphCount();
for(int iResult=0; iResult<nResults; iResult++) {
StationResults * r=s->results(iResult);
r->setParent(s);
}
}
}
}
| AbstractStation * MonoStation::StudentTestCurveModel::station | ( | const QModelIndex & | index | ) | const |
References TRACE.
Referenced by data(), MonoStation::StudentTest::firstCurve(), flags(), index(), parent(), rowCount(), and MonoStation::StudentTest::secondCurve().
| StationResults * MonoStation::StudentTestCurveModel::stationResults | ( | const QModelIndex & | index | ) | const |
References TRACE.
Referenced by MonoStation::StudentTest::firstCurve(), parent(), and MonoStation::StudentTest::secondCurve().
| WinResults * MonoStation::StudentTestCurveModel::winResults | ( | const QModelIndex & | index | ) | const |