Initial import from SVN

This commit is contained in:
emeric
2014-03-09 10:58:52 +01:00
commit b6abce0c2f
440 changed files with 30862 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#include <Wt/WLabel>
#include "SearchFilterWidget.hpp"
SearchFilterWidget::SearchFilterWidget(Wt::WContainerWidget* parent)
: FilterWidget( parent )
{
}
void
SearchFilterWidget::setText(const std::string& text)
{
if (text != _lastEmittedText) {
_lastEmittedText = text;
emitUpdate();
}
}
// Get constraints created by this filter
void
SearchFilterWidget::getConstraint(Constraint& constraint)
{
// No active search means no constaint!
if (!_lastEmittedText.empty()) {
const std::string bindText ("%%" + _lastEmittedText + "%%");
constraint.where.And( WhereClause("(track.name like ? or release.name like ? or artist.name like ?)").bind(bindText).bind(bindText).bind(bindText));
}
// else no constraint!
}