From 532ea00ea6ec0e20898ef009e432ea1f55dc8db1 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Tue, 6 Sep 2022 01:13:42 -0400 Subject: Transitioning to using ListView to show images. The old widgets are not yet removed. A LOT of old sh*t needs rewriting for removing them. (Note to self) Other TODOs: - Convert all keyevents to qactions. - Convert main window to an actual main window. - Move file loading logic out of main.cpp (or not, doesn't even matter). - Move subsliced signatures into library. --- mingui/mingui.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mingui/mingui.hpp') diff --git a/mingui/mingui.hpp b/mingui/mingui.hpp index 755b6ad..aa71596 100644 --- a/mingui/mingui.hpp +++ b/mingui/mingui.hpp @@ -13,6 +13,9 @@ class QLabel; class QStatusBar; class QScrollArea; class QTextEdit; +class QListView; +class QStandardItemModel; +class ImageItemDelegate; namespace fs = std::filesystem; @@ -26,6 +29,9 @@ private: QWidget *imgcontainer; QStatusBar *sb; QScrollArea *sa; + QListView *lw; + QStandardItemModel *im = nullptr; + ImageItemDelegate *id = nullptr; std::size_t ngroups, curgroup; bool nohotkeywarn; void mark_toggle(std::size_t x); @@ -41,6 +47,7 @@ private: protected: void keyPressEvent(QKeyEvent *e) override; void keyReleaseEvent(QKeyEvent *e) override; + void resizeEvent(QResizeEvent *e) override; void closeEvent(QCloseEvent *e) override; public: MinGuiWidget(); -- cgit v1.2.3