blobselectshape.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #pragma once
  2. #include <QDialog>
  3. #include <QDebug>
  4. #include <QListView>
  5. #include <QMenu>
  6. #include "../toolinterface.h"
  7. #include "HalconCpp.h"
  8. using namespace HalconCpp;
  9. // 筛选参数
  10. typedef struct Screening
  11. {
  12. int nIndex;
  13. QString strName;
  14. int nMin;
  15. int nMax;
  16. Screening()
  17. {
  18. nIndex = 0;
  19. nMin = 0;
  20. nMax = 999999;
  21. }
  22. }SCREENING;
  23. namespace Ui {
  24. class BlobSelectShape;
  25. }
  26. class BlobSelectShape : public ToolInterface
  27. {
  28. Q_OBJECT
  29. public:
  30. explicit BlobSelectShape(QWidget *parent = 0, ToolDialogImpl* p = nullptr);
  31. ~BlobSelectShape();
  32. virtual bool Serialized(QDataStream& ar, bool bIsOut);
  33. virtual QString ShowParameter();
  34. virtual int Execute();
  35. void AddTool(QString strName, int nMin, int nMax);
  36. private slots:
  37. void ActionSlot();
  38. void on_comboBox_currentIndexChanged(int index);
  39. void on_tableWidget_cellChanged(int row, int column);
  40. void on_BTN_Del_clicked();
  41. void on_comboBox_index_currentIndexChanged(int index);
  42. private:
  43. Ui::BlobSelectShape *ui;
  44. QVector<Screening> m_AllScreening;// 所有的拆选参数
  45. QMap<QString, QString> m_NamesMap;
  46. HTuple m_Key;
  47. HTuple m_MinValue;
  48. HTuple m_MaxValue;
  49. };