-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwidget.h
More file actions
40 lines (32 loc) · 778 Bytes
/
Copy pathwidget.h
File metadata and controls
40 lines (32 loc) · 778 Bytes
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
#ifndef WIDGET_H
#define WIDGET_H
#include <QListWidget>
#include <QWidget>
#include <QStatusBar>
QT_BEGIN_NAMESPACE
namespace Ui {
class Widget;
}
QT_END_NAMESPACE
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
private:
void addListItem(const QString& path);
void listSubDirs(const QString& dirPath);
void listFolders(const QString& dirPath, bool onlySelf = false);
bool beforeAddItems();
void clearListItems();
private:
Ui::Widget *ui;
QListWidget* lw = nullptr;
QStatusBar *statusBar = nullptr;
// QWidget interface
protected:
virtual void dragEnterEvent(QDragEnterEvent* event) override;
virtual void dropEvent(QDropEvent* event) override;
};
#endif // WIDGET_H