matchshowsetting.hpp 968 Bytes
Newer Older
1 2 3 4 5 6 7
#ifndef CVVISUAL_MATCH_SHOW_SETTING
#define CVVISUAL_MATCH_SHOW_SETTING

#include <vector>

#include <QPushButton>

Maksim Shabunin's avatar
Maksim Shabunin committed
8
#include "opencv2/features2d.hpp"
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#include "matchsettings.hpp"
#include "cvvmatch.hpp"

namespace cvv{ namespace qtutil{
/**
 * @brief this class is a MatchSetting which hides a Match or not
 */
class MatchShowSetting:public MatchSettings{

	Q_OBJECT

public:
	/**
	 * @brief the constructor
	 * std::vector<cv::DMatch> this argument is for the MatchSettingSelector and will be ignored.
	 * @param parent
	 */
	MatchShowSetting(std::vector<cv::DMatch>,QWidget* parent=nullptr);

	/**
	 * @brief set the Settings of the given match
	 * @param match a cvvmatch
	 */
	virtual void setSettings(CVVMatch &match) override
		{match.setShow(button_->isChecked());}

	/*virtual void setUnSelectedSettings(CVVMatch &match) override
		{match.setShow(!(button_->isChecked()));}*/
public slots:

	void updateButton();
private:
	QPushButton *button_;
};

}}

#endif