matchportionselector.cpp 719 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#include <QVBoxLayout>

#include "matchportionselector.hpp"

namespace cvv {namespace qtutil{

MatchPortionSelection::MatchPortionSelection(std::vector<cv::DMatch> , QWidget *parent):
	MatchSelection{parent}
{
	auto layout=util::make_unique<QVBoxLayout>();
	auto selector=util::make_unique<PortionSelector>();

	selector_=selector.get();

	connect(&(selector->signalSettingsChanged()),SIGNAL(signal()),this,SIGNAL(settingsChanged()));

	layout->addWidget(selector.release());

	setLayout(layout.release());
}

std::vector<cv::DMatch> MatchPortionSelection::select(const std::vector<cv::DMatch> &selection)
{
	return selector_->select(  selection ,
			[&](cv::DMatch arg1,cv::DMatch arg2)
			{return arg1<arg2;});
}

}}