Add filtering of numerical cols to collection

CollectionFilterWidget: Updated the tooltip, to reflect the changes.
CollectionQuery: Add parsing for SQL operators and insert right SQL
"where" searches.
Song: Add list of numerical columns
playlistfilterparser.cpp/FilterParser: move time and rating parsing
functions to new file:
searchparserutils.cpp: Contains common code used to parse search terms
in playlist and collection filters.
This commit is contained in:
Dakes
2023-07-31 13:44:08 +02:00
committed by Jonas Kvinge
parent 82a8a890de
commit 7aa7cdf6f3
12 changed files with 266 additions and 99 deletions

View File

@@ -123,7 +123,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
QObject::connect(ui_->playlist, &PlaylistView::FocusOnFilterSignal, this, &PlaylistContainer::FocusOnFilter);
ui_->search_field->installEventFilter(this);
QString available_fields = PlaylistFilter().column_names_.keys().join(", ");
QString available_fields = PlaylistFilter().column_names().keys().join(", ");
ui_->search_field->setToolTip(
QString("<html><head/><body><p>") +
tr("Prefix a search term with a field name to limit the search to that field, e.g.:") +
@@ -131,7 +131,7 @@ PlaylistContainer::PlaylistContainer(QWidget *parent)
QString("<span style=\"font-weight:600;\">") +
tr("artist") +
QString(":</span><span style=\"font-style:italic;\">Strawbs</span> ") +
tr("searches the collection for all artists that contain the word %1. ").arg("Strawbs") +
tr("searches the playlist for all artists that contain the word %1. ").arg("Strawbs") +
QString("</p><p>") +
tr("Search terms for numerical fields can be prefixed with %1 or %2 to refine the search, e.g.: ")