MCPcopy Create free account
hub / github.com/KDE/kid3 / headerData

Method headerData

src/core/model/commandstablemodel.cpp:154–177  ·  view source on GitHub ↗

* Get data for header section. * @param section column or row * @param orientation horizontal or vertical * @param role item data role * @return header data for role */

Source from the content-addressed store, hash-verified

152 * @return header data for role
153 */
154QVariant CommandsTableModel::headerData(
155 int section, Qt::Orientation orientation, int role) const
156{
157 if (role == Qt::ToolTipRole && orientation == Qt::Horizontal &&
158 section == CI_Command)
159 return CommandFormatReplacer::getToolTip();
160 if (role != Qt::DisplayRole)
161 return QVariant();
162 if (orientation == Qt::Horizontal) {
163 switch (section) {
164 case CI_Confirm:
165 return tr("Confirm");
166 case CI_Output:
167 return tr("Output");
168 case CI_Name:
169 return tr("Name");
170 case CI_Command:
171 return tr("Command");
172 default:
173 return section + 1;
174 }
175 }
176 return section + 1;
177}
178
179/**
180 * Get number of rows.

Callers

nothing calls this directly

Calls 2

getToolTipFunction · 0.85
QVariantClass · 0.70

Tested by

no test coverage detected