From babdd53be8b304e2c4a8786774fea7186e8d979f Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Thu, 22 Sep 2022 23:45:09 -0400 Subject: Add single image view. --- qdeduper/imageitem.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'qdeduper/imageitem.hpp') diff --git a/qdeduper/imageitem.hpp b/qdeduper/imageitem.hpp index 43fb0c8..b6d775e 100644 --- a/qdeduper/imageitem.hpp +++ b/qdeduper/imageitem.hpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -30,11 +31,18 @@ private: const static int HKSHDS = 2; int vw = -1; int hh = -1; + bool singlemode = false; + QAbstractItemModel *im = nullptr; public: void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; - void resize(const QModelIndex &index); + void resize(); void setScrollbarMargins(int vw, int hh); + + void set_single_item_mode(bool enabled); + bool is_single_item_mode(); + + void set_model(QAbstractItemModel *m); Q_SIGNALS: void sizeHintChanged(const QModelIndex &index); }; -- cgit v1.2.3