#pragma once #include #include #include #include #include "../toolinterface.h" #include "HalconCpp.h" using namespace HalconCpp; // 筛选参数 typedef struct Screening { int nIndex; QString strName; int nMin; int nMax; Screening() { nIndex = 0; nMin = 0; nMax = 999999; } }SCREENING; namespace Ui { class BlobSelectShape; } class BlobSelectShape : public ToolInterface { Q_OBJECT public: explicit BlobSelectShape(QWidget *parent = 0, ToolDialogImpl* p = nullptr); ~BlobSelectShape(); virtual bool Serialized(QDataStream& ar, bool bIsOut); virtual QString ShowParameter(); virtual int Execute(); void AddTool(QString strName, int nMin, int nMax); private slots: void ActionSlot(); void on_comboBox_currentIndexChanged(int index); void on_tableWidget_cellChanged(int row, int column); void on_BTN_Del_clicked(); void on_comboBox_index_currentIndexChanged(int index); private: Ui::BlobSelectShape *ui; QVector m_AllScreening;// 所有的拆选参数 QMap m_NamesMap; HTuple m_Key; HTuple m_MinValue; HTuple m_MaxValue; };