summaryrefslogtreecommitdiff
path: root/src/getsuyomi.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-09-18 21:59:54 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-09-18 21:59:54 -0500
commitfa4b4097d3283e1d6e6376c70910e245f0b1f6ec (patch)
tree74dff4ded82d3f4854b3f10d5dd2e5be1f69b95e /src/getsuyomi.hpp
parent04dbfdc97e94e6f477675b9d3135164752a7cfef (diff)
Save progress of qt6 implementation.
Diffstat (limited to 'src/getsuyomi.hpp')
-rw-r--r--src/getsuyomi.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/getsuyomi.hpp b/src/getsuyomi.hpp
new file mode 100644
index 0000000..3d3c092
--- /dev/null
+++ b/src/getsuyomi.hpp
@@ -0,0 +1,51 @@
+#ifndef GETSUYOMI_HPP
+#define GETSUYOMI_HPP
+
+#include "archive.hpp"
+
+#include <QtWidgets>
+#include <cstdint>
+#include <vector>
+
+namespace getsuyomi {
+
+enum class PageLayout : uint8_t {
+ Single,
+ Dual,
+ Manga
+};
+
+class Getsuyomi : public QWidget {
+ Q_OBJECT
+
+ public:
+ friend class GetsuyomiApp;
+ Getsuyomi();
+
+ 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 getsuyomi
+
+#endif