#ifndef INPUTMAPPING_H #define INPUTMAPPING_H #include #include #include #include #include #include #include class InputMapping : public QObject { Q_OBJECT public: explicit InputMapping(QObject *parent = nullptr); bool loadMappings(); QVariantList mapToAction(const QString& source, const QString& keycode); private Q_SLOTS: void dirChange(); signals: void mappingChanged(); private: bool loadMappingFile(const QString &path, QPair &mappingPair); bool loadMappingDirectory(const QString& path, bool copy); QFileSystemWatcher* m_watcher; QHash m_inputMatcher; CachedRegexMatcher m_sourceMatcher; }; #endif // INPUTMAPPING_H