#ifndef SIGDB_QT_HPP #define SIGDB_QT_HPP #include #include #include #include #include #include #include "signature_db.hpp" namespace fs = std::filesystem; class SignatureDB : public QObject { Q_OBJECT private: signature_db *sdb; std::unordered_map fmap; std::unordered_map frmap; std::map, double> distmap; std::vector> groups; public: SignatureDB(); SignatureDB(const fs::path& dbpath); ~SignatureDB(); void scan_files(const std::vector &files, int njobs); size_t num_groups(); std::vector get_group(size_t gid); std::map, double> group_distances(size_t gid); fs::path get_image_path(size_t id); size_t get_path_id(const fs::path& p); Q_SIGNALS: void image_scanned(size_t n); }; #endif