Index: sources/model/MListModel.cpp =================================================================== diff -u -rf433eeefae34530e7cc3dc4e5576e43729b236f2 -r63d974e3d2d03c93e0398de17bd6ca2d2e039982 --- sources/model/MListModel.cpp (.../MListModel.cpp) (revision f433eeefae34530e7cc3dc4e5576e43729b236f2) +++ sources/model/MListModel.cpp (.../MListModel.cpp) (revision 63d974e3d2d03c93e0398de17bd6ca2d2e039982) @@ -107,6 +107,20 @@ } /*! + * \brief Return a list of roles from each row of model + * \param[in] vRole Role of model to populate list + */ +QStringList View::MListModel::getAllByRole( int vRole ) const +{ + QStringList result; + + for (int row = 0; row < rowCount(); ++row) { + result.append(data(index(row), vRole).toString()); + } + return result; +} + +/*! * \brief Clear any data contained in this list model. */ void View::MListModel::clear() {