From 47e37635f50c09b4f9a9ee7699e3120bab3e4088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 10 Apr 2016 04:29:29 +0200 Subject: NOISSUE split GUI stuff from logic library --- libraries/logic/pathmatcher/MultiMatcher.h | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 libraries/logic/pathmatcher/MultiMatcher.h (limited to 'libraries/logic/pathmatcher/MultiMatcher.h') diff --git a/libraries/logic/pathmatcher/MultiMatcher.h b/libraries/logic/pathmatcher/MultiMatcher.h new file mode 100644 index 00000000..91f70aa4 --- /dev/null +++ b/libraries/logic/pathmatcher/MultiMatcher.h @@ -0,0 +1,31 @@ +#include "IPathMatcher.h" +#include +#include + +class MultiMatcher : public IPathMatcher +{ +public: + virtual ~MultiMatcher() {}; + MultiMatcher() + { + } + MultiMatcher &add(Ptr add) + { + m_matchers.append(add); + return *this; + } + + virtual bool matches(const QString &string) const override + { + for(auto iter: m_matchers) + { + if(iter->matches(string)) + { + return true; + } + } + return false; + } + + QList m_matchers; +}; -- cgit v1.2.3