资 源 简 介
qt 实现的故障树 void FaultTree::calcPosition(){ int maxLayer = 0; //获取最大层数 for (int index = 0; index < m_list.size(); ++index) { if (m_list.at(index)->layer() > maxLayer) maxLayer = m_list.at(index)->layer(); } //计算最大宽度 int maxWidth = 0, count; for (int layer = 1; layer < maxLayer+1; ++layer) { count = 0; for (int index = 0; index < m_list.size(); ++index) { if (m_list.at(index)->layer() == layer) count++; } if (count > m