MCPcopy Create free account
hub / github.com/c3d/tao3D / data

Method data

tao/commit_table_model.cpp:56–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56QVariant CommitTableModel::data(const QModelIndex &index, int role) const
57// ----------------------------------------------------------------------------
58// Return the model data for a given element of the table
59// ----------------------------------------------------------------------------
60{
61 if (!index.isValid() ||
62 index.row() >= commits.size() ||
63 index.row() < 0)
64 return QVariant();
65
66 if (role == Qt::DisplayRole)
67 {
68 Repository::Commit commit = commits.at(index.row());
69
70 switch (index.column())
71 {
72 case 0: return commit.id;
73 case 1: return commit.date;
74 case 2: return commit.author;
75 case 3: return commit.msg;
76 default: return QVariant();
77 }
78 }
79 return QVariant();
80}
81
82
83QVariant CommitTableModel::headerData(int section, Qt::Orientation orientation,

Callers 15

repositoryMethod · 0.45
actionTriggeredMethod · 0.45
IFTRACEFunction · 0.45
verifyMethod · 0.45
AddCommandsMethod · 0.45
receiveConnectionMethod · 0.45
updateInfoMethod · 0.45
openRecentFileMethod · 0.45
displayModeTriggeredMethod · 0.45
setPullUrlMethod · 0.45
fetchMethod · 0.45
pushMethod · 0.45

Calls 2

isValidMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected