| 592 | } |
| 593 | |
| 594 | QVariant ModList::headerData(int section, Qt::Orientation orientation, int role) const |
| 595 | { |
| 596 | if (orientation == Qt::Horizontal) { |
| 597 | if (role == Qt::DisplayRole) { |
| 598 | return getColumnName(section); |
| 599 | } else if (role == Qt::ToolTipRole) { |
| 600 | return getColumnToolTip(section); |
| 601 | } else if (role == Qt::TextAlignmentRole) { |
| 602 | return QVariant(Qt::AlignCenter); |
| 603 | } else if (role == MOBase::EnabledColumnRole) { |
| 604 | if (section == COL_CONTENT) { |
| 605 | return !m_Organizer->modDataContents().empty(); |
| 606 | } else { |
| 607 | return true; |
| 608 | } |
| 609 | } |
| 610 | } |
| 611 | return QAbstractItemModel::headerData(section, orientation, role); |
| 612 | } |
| 613 | |
| 614 | Qt::ItemFlags ModList::flags(const QModelIndex& modelIndex) const |
| 615 | { |
no test coverage detected