Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

13 righe
397 B

  1. #include "creatitem.h"
  2. Item *creatItem(const QString &type)
  3. {
  4. if (type == "常开") return new Contact(type);
  5. if (type == "常闭") return new Contact(type);
  6. if (type == "线圈") return new Coil(type);
  7. if (type == "比较") return new Comparator(type);
  8. if (type == "按钮") return new Button(type);
  9. if (type == "指示灯") return new Light(type);
  10. return nullptr;
  11. }