summaryrefslogtreecommitdiff
path: root/src/bookmouse_old.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-09-24 20:00:16 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-09-24 20:00:16 -0500
commit348a1bfb244288b1c78d8ce3c8d8a8cb5c1bdebc (patch)
tree2f174aab662d753f2a9994fe6d0b7a1a06723156 /src/bookmouse_old.hpp
parent88864f8e3a4d87566d157ac176da3cb56257ca6d (diff)
Start app rendering.
Diffstat (limited to 'src/bookmouse_old.hpp')
-rw-r--r--src/bookmouse_old.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/bookmouse_old.hpp b/src/bookmouse_old.hpp
new file mode 100644
index 0000000..b2a3a5a
--- /dev/null
+++ b/src/bookmouse_old.hpp
@@ -0,0 +1,51 @@
+#ifndef BOOKMOUSE_HPP
+#define BOOKMOUSE_HPP
+
+#include "archive.hpp"
+
+#include <QtWidgets>
+#include <cstdint>
+#include <vector>
+
+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