diff options
author | 2022-09-22 23:45:09 -0400 | |
---|---|---|
committer | 2022-09-22 23:45:09 -0400 | |
commit | babdd53be8b304e2c4a8786774fea7186e8d979f (patch) | |
tree | 5e05f24775a86cca69866d9ce79ecdf34add0947 /qdeduper/imageitem.hpp | |
parent | 8ece6d3ec1b0105047c192c0aa044e4257118e01 (diff) | |
download | deduper-babdd53be8b304e2c4a8786774fea7186e8d979f.tar.xz |
Add single image view.
Diffstat (limited to 'qdeduper/imageitem.hpp')
-rw-r--r-- | qdeduper/imageitem.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
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 <QStandardItem> #include <QAbstractItemDelegate> +#include <QAbstractItemModel> #include <QStyleOptionViewItem> #include <QModelIndex> @@ -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); }; |