-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathibimagelistwidget.hpp
More file actions
55 lines (42 loc) · 1.51 KB
/
Copy pathibimagelistwidget.hpp
File metadata and controls
55 lines (42 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* Copyright (C) 2022 Martin Pietsch <@pmfoss>
SPDX-License-Identifier: BSD-3-Clause */
#ifndef H_IBIMAGELISTWIDGET
#define H_IBIMAGELISTWIDGET
#include <QItemSelection>
#include <QListView>
#include <QRect>
#include <QRegion>
#include <QResizeEvent>
#include <QScrollBar>
#include <QWidget>
#include "ibimagelistmodel.hpp"
#include "ibitemdelegate.hpp"
class IBImageListWidget : public QListView
{
Q_OBJECT
public:
IBImageListWidget(QWidget *parent = nullptr);
void setSectionType(IBImageListModel::IBListSectionType type);
IBImageListModel::IBListSectionType getSectionType();
void setSectionSortOrder(Qt::SortOrder order);
Qt::SortOrder getSectionSortOrder() const;
void setImageSortOrder(Qt::SortOrder order);
Qt::SortOrder getImageSortOrder() const;
void setImageSortField(IBImageListModel::IBImageSortField field);
IBImageListModel::IBImageSortField getImageSortField() const;
QString getImagePath() const;
signals:
void selectionChanged(const QModelIndex &index);
public slots:
void setImagePath(const QString &path);
void refresh();
protected:
void resizeEvent(QResizeEvent *event) override;
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override;
private:
/* contains the ItemDelegate object of the view */
IBItemDelegate *idDelegate;
/* contains the List Model of the view */
IBImageListModel *ifmImageModel;
};
#endif /*H_IBIMAGELISTWIDGET*/