Add filesystem widget
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef FILESYSTEMWIDGET_H
|
||||
#define FILESYSTEMWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QFileSystemModel>
|
||||
#include <QListView>
|
||||
|
||||
class FilesystemWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
QListView *m_listView;
|
||||
QAbstractItemModel *m_model;
|
||||
public:
|
||||
explicit FilesystemWidget(QAbstractItemModel *model, QWidget *parent = nullptr);
|
||||
void setDir(const QString &dir);
|
||||
private slots:
|
||||
void selectFile(int row);
|
||||
void fileClicked(const QModelIndex &index);
|
||||
signals:
|
||||
void fileSelected(int row);
|
||||
};
|
||||
|
||||
#endif // FILESYSTEMWIDGET_H
|
||||
Reference in New Issue
Block a user