From 78f01f5d041ba291aca05f768bb71eba71ebb58e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 16 Apr 2021 23:36:37 +0200 Subject: Add a combined manga search page, highlight urls ending with ? --- plugins/MangaCombined.hpp | 27 +++++++++++++++++++++++++++ plugins/Manganelo.hpp | 1 - 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 plugins/MangaCombined.hpp (limited to 'plugins') diff --git a/plugins/MangaCombined.hpp b/plugins/MangaCombined.hpp new file mode 100644 index 0000000..b9627fe --- /dev/null +++ b/plugins/MangaCombined.hpp @@ -0,0 +1,27 @@ +#pragma once + +#include "Manga.hpp" +#include +#include + +namespace QuickMedia { + struct MangaPlugin { + std::unique_ptr page; + std::string title; + std::string service_name; + std::string logo_path; + }; + + class MangaCombinedSearchPage : public Page { + public: + MangaCombinedSearchPage(Program *program, std::vector search_pages); + const char* get_title() const override { return "All"; } + bool search_is_filter() override { return false; } + SearchResult search(const std::string &str, BodyItems &result_items) override; + PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override; + PluginResult submit(const std::string &title, const std::string &url, std::vector &result_tabs) override; + sf::Vector2i get_thumbnail_max_size() override { return sf::Vector2i(101, 141); }; + private: + std::vector search_pages; + }; +} \ No newline at end of file diff --git a/plugins/Manganelo.hpp b/plugins/Manganelo.hpp index 530a1f2..ca44e05 100644 --- a/plugins/Manganelo.hpp +++ b/plugins/Manganelo.hpp @@ -1,7 +1,6 @@ #pragma once #include "Manga.hpp" -#include namespace QuickMedia { class ManganeloSearchPage : public Page { -- cgit v1.2.3