mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 11:47:41 -05:00
Add option to set enabled state for partial match regex config
This commit is contained in:
@@ -79,11 +79,12 @@ bool RegexConfig::Matches(const std::string &text,
|
||||
QString::fromStdString(expression));
|
||||
}
|
||||
|
||||
RegexConfig RegexConfig::PartialMatchRegexConfig()
|
||||
RegexConfig RegexConfig::PartialMatchRegexConfig(bool enabled)
|
||||
{
|
||||
RegexConfig conf;
|
||||
conf._partialMatch = true;
|
||||
return conf;
|
||||
RegexConfig regex;
|
||||
regex._partialMatch = true;
|
||||
regex._enable = enabled;
|
||||
return regex;
|
||||
}
|
||||
|
||||
RegexConfigWidget::RegexConfigWidget(QWidget *parent, bool showEnable)
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
EXPORT bool Matches(const std::string &text,
|
||||
const std::string &expression) const;
|
||||
|
||||
EXPORT static RegexConfig PartialMatchRegexConfig();
|
||||
EXPORT static RegexConfig PartialMatchRegexConfig(bool enabled = false);
|
||||
|
||||
private:
|
||||
bool _enable = false;
|
||||
|
||||
Reference in New Issue
Block a user