toolinterface.h 934 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include "ui_toolinterface.h"
  3. #include <QDialog>
  4. #include "HalconCpp.h"
  5. using namespace HalconCpp;
  6. // namespace Ui {
  7. // Q_OBJECT
  8. // class ToolInterface;
  9. // }
  10. class ToolInterface : public QDialog
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit ToolInterface(QWidget *parent = 0);
  15. virtual ~ToolInterface();
  16. virtual bool Serialized(QDataStream& ar, bool bIsOut);
  17. virtual bool setValue(HObject);
  18. virtual HObject GetResult();
  19. virtual QString ShowParameter();
  20. virtual int Execute();
  21. signals:
  22. void updateParameter(QString);
  23. private:
  24. Ui::ToolInterface ui;
  25. public:
  26. HObject m_InImage;
  27. HObject m_OutImage;
  28. };
  29. typedef struct LinkCtrl
  30. {
  31. int ToolID;
  32. int nUi;
  33. bool isrun;
  34. QString ToolName;
  35. ToolInterface *p_dlg;
  36. LinkCtrl()
  37. {
  38. isrun = true;
  39. ToolID = -1;
  40. nUi = -1;
  41. ToolName.isEmpty();
  42. p_dlg = nullptr;
  43. }
  44. }LINKCTRL;