MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / headerData

Method headerData

src/modlist.cpp:594–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594QVariant 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
614Qt::ItemFlags ModList::flags(const QModelIndex& modelIndex) const
615{

Callers 1

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected