QVariant MLModel::headerData( int section, Qt::Orientation orientation, int role ) const { if (orientation == Qt::Horizontal && role == Qt::DisplayRole) return QVariant( psz_column_title( columnToMeta( section ) ) ); else return QVariant(); }
QVariant VLCModel::headerData( int section, Qt::Orientation orientation, int role ) const { if (orientation != Qt::Horizontal || role != Qt::DisplayRole) return QVariant(); int meta_col = columnToMeta( section ); if( meta_col == COLUMN_END ) return QVariant(); return QVariant( qfu( psz_column_title( meta_col ) ) ); }
/** * @brief This returns the type of data shown in the specified column * @param column must be valid * @return The type, or ML_END in case of error */ ml_select_e MLModel::columnType( int logicalindex ) const { if( logicalindex < 0 || logicalindex >= columnCount() ) return ML_END; return meta_to_mlmeta( columnToMeta( logicalindex ) ); }