Lines Matching refs:m_targets

35     m_targets.clear();  in clear()
40 if (rootRow < 0 || rootRow >= m_targets.size()) { in setDefaultCmd()
45 for (int i = 0; i < m_targets[rootRow].commands.size(); i++) { in setDefaultCmd()
46 if (defCmd == m_targets[rootRow].commands[i].first) { in setDefaultCmd()
47 m_targets[rootRow].defaultCmd = defCmd; in setDefaultCmd()
55 if (rootRow < 0 || rootRow >= m_targets.size()) { in getDefaultCmdIndex()
60 auto defCmd = m_targets[rootRow].defaultCmd; in getDefaultCmdIndex()
61 for (int i = 0; i < m_targets[rootRow].commands.size(); i++) { in getDefaultCmdIndex()
62 if (defCmd == m_targets[rootRow].commands[i].first) { in getDefaultCmdIndex()
74 for (int i = 0; i < m_targets.count(); i++) { in addTargetSet()
75 if (m_targets[i].name == newName) { in addTargetSet()
81 beginInsertRows(QModelIndex(), m_targets.count(), m_targets.count()); in addTargetSet()
83 m_targets << targetSet; in addTargetSet()
85 return m_targets.count() - 1; in addTargetSet()
90 if (rootRow < 0 || rootRow >= m_targets.size()) { in addCommand()
97 for (int i = 0; i < m_targets[rootRow].commands.count(); i++) { in addCommand()
98 if (m_targets[rootRow].commands[i].first == newName) { in addCommand()
105 …beginInsertRows(rootIndex, m_targets[rootRow].commands.count(), m_targets[rootRow].commands.count(… in addCommand()
106 m_targets[rootRow].commands << QPair<QString, QString>(newName, command); in addCommand()
108 return createIndex(m_targets[rootRow].commands.size() - 1, 0, rootRow); in addCommand()
120 if (m_targets.count() <= static_cast<int>(rootRow)) { in copyTargetOrSet()
124 beginInsertRows(QModelIndex(), m_targets.count(), m_targets.count()); in copyTargetOrSet()
126 QString newName = m_targets[rootRow].name + QStringLiteral(" 2"); in copyTargetOrSet()
127 for (int i = 0; i < m_targets.count(); i++) { in copyTargetOrSet()
128 if (m_targets[i].name == newName) { in copyTargetOrSet()
133 m_targets << m_targets[rootRow]; in copyTargetOrSet()
134 m_targets.last().name = newName; in copyTargetOrSet()
137 return createIndex(m_targets.count() - 1, 0, InvalidIndex); in copyTargetOrSet()
141 if (m_targets.count() <= static_cast<int>(rootRow)) { in copyTargetOrSet()
147 if (index.row() >= m_targets[rootRow].commands.count()) { in copyTargetOrSet()
152 …beginInsertRows(rootIndex, m_targets[rootRow].commands.count(), m_targets[rootRow].commands.count(… in copyTargetOrSet()
154 QString newName = m_targets[rootRow].commands[index.row()].first + QStringLiteral(" 2"); in copyTargetOrSet()
155 for (int i = 0; i < m_targets[rootRow].commands.count(); i++) { in copyTargetOrSet()
156 if (m_targets[rootRow].commands[i].first == newName) { in copyTargetOrSet()
161m_targets[rootRow].commands << QPair<QString, QString>(newName, m_targets[rootRow].commands[index.… in copyTargetOrSet()
164 return createIndex(m_targets[rootRow].commands.count() - 1, 0, rootRow); in copyTargetOrSet()
180 m_targets.removeAt(index.row()); in deleteItem()
182 …} else if (index.internalId() < static_cast<quint64>(m_targets.size()) && m_targets[static_cast<in… in deleteItem()
184 m_targets[static_cast<int>(index.internalId())].commands.removeAt(index.row()); in deleteItem()
191 for (int i = 0; i < m_targets.count(); i++) { in deleteTargetSet()
192 if (m_targets[i].name == targetSet) { in deleteTargetSet()
194 m_targets.removeAt(i); in deleteTargetSet()
213 if (static_cast<int>(rRow) >= m_targets.count()) { in command()
217 if (cRow < 0 || cRow >= m_targets[static_cast<int>(rRow)].commands.count()) { in command()
221 return m_targets[rRow].commands[cRow].second; in command()
236 if (static_cast<int>(rRow) >= m_targets.count()) { in cmdName()
240 if (cRow < 0 || cRow >= m_targets[static_cast<int>(rRow)].commands.count()) { in cmdName()
244 return m_targets[static_cast<int>(rRow)].commands[cRow].first; in cmdName()
259 if (static_cast<int>(rRow) >= m_targets.count()) { in workDir()
263 return m_targets[static_cast<int>(rRow)].workDir; in workDir()
278 if (static_cast<int>(rRow) >= m_targets.count()) { in targetName()
282 return m_targets[static_cast<int>(rRow)].name; in targetName()
308 if (row < 0 || row >= m_targets.size() || role == Qt::CheckStateRole) { in data()
313 return m_targets[row].name; in data()
315 return m_targets[row].workDir; in data()
319 if (rootIndex < 0 || rootIndex >= m_targets.size()) { in data()
322 if (row < 0 || row >= m_targets[rootIndex].commands.size()) { in data()
330 …return m_targets[rootIndex].commands[row].first == m_targets[rootIndex].defaultCmd ? Qt::Checked :… in data()
334 return m_targets[rootIndex].commands[row].first; in data()
336 return m_targets[rootIndex].commands[row].second; in data()
378 if (row < 0 || row >= m_targets.size()) { in setData()
383 m_targets[row].name = value.toString(); in setData()
386 m_targets[row].workDir = value.toString(); in setData()
391 if (rootIndex < 0 || rootIndex >= m_targets.size()) { in setData()
394 if (row < 0 || row >= m_targets[rootIndex].commands.size()) { in setData()
400 m_targets[rootIndex].defaultCmd = m_targets[rootIndex].commands[row].first; in setData()
401 …Q_EMIT dataChanged(createIndex(0, 0, rootIndex), createIndex(m_targets[rootIndex].commands.size() … in setData()
406 m_targets[rootIndex].commands[row].first = value.toString(); in setData()
409 m_targets[rootIndex].commands[row].second = value.toString(); in setData()
433 return m_targets.size(); in rowCount()
441 if (row < 0 || row >= m_targets.size()) { in rowCount()
445 return m_targets[row].commands.size(); in rowCount()