aboutsummaryrefslogtreecommitdiff
path: root/qdeduper/imageitem.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-22 23:45:09 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-22 23:45:09 -0400
commitbabdd53be8b304e2c4a8786774fea7186e8d979f (patch)
tree5e05f24775a86cca69866d9ce79ecdf34add0947 /qdeduper/imageitem.hpp
parent8ece6d3ec1b0105047c192c0aa044e4257118e01 (diff)
downloaddeduper-babdd53be8b304e2c4a8786774fea7186e8d979f.tar.xz
Add single image view.
Diffstat (limited to 'qdeduper/imageitem.hpp')
-rw-r--r--qdeduper/imageitem.hpp10
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);
};