-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathimagesourcebrowser.h
45 lines (36 loc) · 949 Bytes
/
imagesourcebrowser.h
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
#ifndef IMAGESOURCEBROWSER_H
#define IMAGESOURCEBROWSER_H
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QGridLayout>
#include <QTreeWidget>
#include <QDirIterator>
#include <QPixmap>
#include <QTableWidget>
class ImageSourceBrowser : public QFrame
{
Q_OBJECT
public:
explicit ImageSourceBrowser(QWidget *parent = nullptr);
~ImageSourceBrowser();
private slots:
void handleCloseButton();
void onItemClicked(QTreeWidgetItem *item, int column);
public:
void initialize();
void refresh();
QString m_DataPath;
private:
void recursivelyGetDirectory(QString path, QTreeWidgetItem *parent);
void addImageToGrid(QString title, QString path);
QFrame *topBar;
QLabel *titleLabel;
QPushButton *closeButton;
QWidget *contentPanel;
QTreeWidget *directoryList;
QTableWidget *imagesGrid;
int m_lastCol = 0;
int m_lastRow = 0;
};
#endif // IMAGESOURCEBROWSER_H