您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
733 B

  1. #ifndef COMPARATOR_H
  2. #define COMPARATOR_H
  3. #include "item.h"
  4. class Comparator : public Item
  5. {
  6. public:
  7. Comparator(const QString &type);
  8. QRectF boundingRect() const override;
  9. void paint(QPainter *painter,
  10. const QStyleOptionGraphicsItem *option,
  11. QWidget *) override;
  12. void setRegisterId(const QString &id) override;
  13. void setRegisterValue(const QString &registerId, quint16 value) override;
  14. void addMenuActions(QMenu *menu) override;
  15. void handleMenuAction(QAction *action) override;
  16. void setCompare(QString) override;
  17. bool state() const override;
  18. private:
  19. QString registerId2_;
  20. quint16 registerValue2_ = 0;
  21. QString compare_ = "CP";
  22. };
  23. #endif // COMPARATOR_H