MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / data

Method data

TaskFlow/Editor/FlowsModel.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23QVariant FlowsModel::data(const QModelIndex &index, int role) const
24{
25 if (!index.isValid() || !m_flowManager || index.row() >= m_flowManager->flows().size())
26 return QVariant();
27
28 const auto flows = m_flowManager->flows().values();
29
30 switch (role) {
31 case FlowRoles::FlowIdRole:
32 return flows.at(index.row())->flowId();
33 case FlowRoles::FlowDataRole:
34 return QVariant::fromValue(flows.at(index.row()));
35 default:
36 return QVariant();
37 }
38}
39
40QHash<int, QByteArray> FlowsModel::roleNames() const
41{

Callers

nothing calls this directly

Calls 4

sizeMethod · 0.80
flowsMethod · 0.80
isValidMethod · 0.45
flowIdMethod · 0.45

Tested by

no test coverage detected