mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-02 11:40:03 +01:00
REmove unused method : levelCellCount
This commit is contained in:
@@ -327,40 +327,6 @@ QVector<QPair<RealTerminalData, RealTerminalData>> TerminalStripModel::modifiedR
|
|||||||
return returned_vector;
|
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
|
* @brief TerminalStripModel::terminalsForIndex
|
||||||
* @param index_list
|
* @param index_list
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ class TerminalStripModel : public QAbstractTableModel
|
|||||||
virtual Qt::ItemFlags flags (const QModelIndex &index) const override;
|
virtual Qt::ItemFlags flags (const QModelIndex &index) const override;
|
||||||
QVector<QPair<RealTerminalData, RealTerminalData>> modifiedRealTerminalData() const;
|
QVector<QPair<RealTerminalData, RealTerminalData>> modifiedRealTerminalData() const;
|
||||||
|
|
||||||
QVector<int> levelCellCount(const QModelIndexList &index_list) const;
|
|
||||||
QVector<PhysicalTerminalData> physicalTerminalDataForIndex(QModelIndexList index_list) const;
|
QVector<PhysicalTerminalData> physicalTerminalDataForIndex(QModelIndexList index_list) const;
|
||||||
QVector<RealTerminalData> realTerminalDataForIndex(QModelIndexList index_list) const;
|
QVector<RealTerminalData> realTerminalDataForIndex(QModelIndexList index_list) const;
|
||||||
RealTerminalData realTerminalDataForIndex(const QModelIndex &index) const;
|
RealTerminalData realTerminalDataForIndex(const QModelIndex &index) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user