RequirementImportance.h 707 B

12345678910111213141516171819202122232425262728
  1. #ifndef REQUIREMENTIMPORTANCE_H
  2. #define REQUIREMENTIMPORTANCE_H
  3. #include <QVector>
  4. /**
  5. * @brief 单例,需求重要度
  6. */
  7. class RequirementImportance
  8. {
  9. public:
  10. static RequirementImportance *instance()
  11. {
  12. static RequirementImportance rinstance;
  13. return &rinstance;
  14. }
  15. RequirementImportance() { }
  16. QVector<qreal> importance() const { return m_importance; }
  17. void setImportance(const QVector<qreal> &importance) { m_importance = importance; }
  18. void appendImportance(const QVector<qreal> &importance) { m_importance.append(importance); }
  19. void clear() { m_importance.clear(); }
  20. private:
  21. QVector<qreal> m_importance;
  22. };
  23. #endif // REQUIREMENTIMPORTANCE_H