QVariant data (const QModelIndex &index, int role = Qt::DisplayRole) const { if (role != Qt::DisplayRole || !index.isValid () || !_effect || index.column () >= 2) { return QVariant (); } unsigned num = _effect->GetNumberOfPrograms (_stage); if (index.row () >= num) { return QVariant (); } if (index.column () == 0) { return QVariant (_effect->GetProgramName (_stage, index.row ())); } else if (index.column () == 1) { Program* prog = _effect->GetProgram (_stage, _effect->GetProgramName (_stage, index.row ())); if (prog) { return QVariant (prog->GetCategory().GetFullName()+"."+prog->GetFullname()); } return QVariant ("<undefined>"); } return QVariant (); }
const QString& GetPassName (unsigned row) { return _effect->GetProgramName (_stage, row); }