REmove unused method : levelCellCount

This commit is contained in:
joshua
2021-12-02 18:55:56 +01:00
parent 6e68e6047a
commit 291e163ee2
2 changed files with 0 additions and 35 deletions

View File

@@ -327,40 +327,6 @@ QVector<QPair<RealTerminalData, RealTerminalData>> TerminalStripModel::modifiedR
return returned_vector;
}
/**
* @brief TerminalStripModel::levelCellCount
* Check for each index of @a index_list if the cell represented by the index
* is a level cell (level 0 to level 3) and if the corresponding real terminal is in the same level
*
* The returned vector contain how many index has matched
* the vector have 4 int,
* the first int is the number of matched level 0
* the second int is the number of matched level 1
* the third int is the number of matched level 2
* the fourth int is the number of matched level 4
* @param index_list
* @return
*/
QVector<int> TerminalStripModel::levelCellCount(const QModelIndexList &index_list) const
{
QVector<int> vector_(4,0);
for (const auto &index : index_list)
{
if(index.isValid())
{
const auto rtd_ = realDataAtIndex(index.row());
const auto level_ = rtd_.level_;
const auto index_column = index.column();
if (level_ + 2 == index_column) {
vector_.replace(level_, vector_.at(level_)+1);
}
}
}
return vector_;
}
/**
* @brief TerminalStripModel::terminalsForIndex
* @param index_list

View File

@@ -64,7 +64,6 @@ class TerminalStripModel : public QAbstractTableModel
virtual Qt::ItemFlags flags (const QModelIndex &index) const override;
QVector<QPair<RealTerminalData, RealTerminalData>> modifiedRealTerminalData() const;
QVector<int> levelCellCount(const QModelIndexList &index_list) const;
QVector<PhysicalTerminalData> physicalTerminalDataForIndex(QModelIndexList index_list) const;
QVector<RealTerminalData> realTerminalDataForIndex(QModelIndexList index_list) const;
RealTerminalData realTerminalDataForIndex(const QModelIndex &index) const;