From 500e1f9892dd41419663e9f72cf47bab5b2aca0b Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 23 Sep 2024 00:33:33 -0500 Subject: Saving work. --- src/bookmouse.hpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/bookmouse.hpp (limited to 'src/bookmouse.hpp') diff --git a/src/bookmouse.hpp b/src/bookmouse.hpp new file mode 100644 index 0000000..b2a3a5a --- /dev/null +++ b/src/bookmouse.hpp @@ -0,0 +1,51 @@ +#ifndef BOOKMOUSE_HPP +#define BOOKMOUSE_HPP + +#include "archive.hpp" + +#include +#include +#include + +namespace bookmouse { + +enum class PageLayout : uint8_t { + Single, + Dual, + Manga +}; + +class Bookmouse : public QWidget { + Q_OBJECT + + public: + friend class BookmouseApp; + Bookmouse(); + + public slots: + void setArchive(Archive* archive); + void next(); + void back(); + + private: + void setPages(); + void setPagesNormal(); + void setPagesDual(); + void setPagesManga(); + void setPages(QLabel& label1, QLabel& label2); + + QLayout* m_layout{nullptr}; + + Archive* m_archive{nullptr}; + + PageLayout m_pageLayout{PageLayout::Single}; + + QLabel m_pageLeft{}; + QLabel m_pageRight{}; + + size_t m_pageNumber{0}; +}; + +} // namespace bookmouse + +#endif -- cgit v1.2.3