keypointshowsetting.hpp 980 Bytes
Newer Older
1 2 3 4 5 6 7
#ifndef CVVISUAL_KEY_POINT_SHOW_SETTING
#define CVVISUAL_KEY_POINT_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 "keypointsettings.hpp"

namespace cvv{ namespace qtutil{

/**
 * @brief this class is a KeyPointSetting which hides a KeyPoint or not
 */
class KeyPointShowSetting:public KeyPointSettings{

	Q_OBJECT

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

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

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

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

}}

#endif