Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

11 řádky
293 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. return nullptr;
  9. }