SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
componentSearchMatcher.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2026. Giulio Cocconi
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#pragma once
19
20
#include <vector>
21
22
#include <QString>
23
#include <QStringList>
24
25
26
namespace
SILICON::ui
{
27
28
namespace
componentSearchMatcher
{
29
30
struct
Match
{
31
int
index
;
32
int
rank
;
33
int
distance
;
34
bool
matches
;
35
};
36
37
std::vector<Match>
rank
(QStringList candidates,
const
QString& query,
38
bool
includeNonMatches);
39
40
}
// namespace componentSearchMatcher
41
42
}
// namespace SILICON::ui
SILICON::ui::componentSearchMatcher
Definition
componentSearchMatcher.cpp:69
SILICON::ui::componentSearchMatcher::rank
std::vector< Match > rank(QStringList candidates, const QString &query, const bool includeNonMatches)
Definition
componentSearchMatcher.cpp:71
SILICON::ui
Definition
actionGroups.hpp:14
SILICON::ui::componentSearchMatcher::Match
Definition
componentSearchMatcher.hpp:30
SILICON::ui::componentSearchMatcher::Match::rank
int rank
Definition
componentSearchMatcher.hpp:32
SILICON::ui::componentSearchMatcher::Match::index
int index
Definition
componentSearchMatcher.hpp:31
SILICON::ui::componentSearchMatcher::Match::matches
bool matches
Definition
componentSearchMatcher.hpp:34
SILICON::ui::componentSearchMatcher::Match::distance
int distance
Definition
componentSearchMatcher.hpp:33
src
ui
circuit
editor
componentSearchMatcher.hpp
Generated by
1.17.0