-
Notifications
You must be signed in to change notification settings - Fork 0
/
fileexplorer.h
51 lines (41 loc) · 1.1 KB
/
fileexplorer.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
46
47
48
49
50
51
#ifndef FILEEXPLORER_H
#define FILEEXPLORER_H
#include <QtDebug>
#include <QWidget>
#include <QFileSystemModel>
#include <QShortcut>
#include <QCompleter>
#include <QDirModel>
#include "rankdelegate.h"
#include "fsfilterproxymodel.h"
#include "filetagswidget.h"
namespace Ui {
class FileExplorer;
}
class FileExplorer : public QWidget
{
Q_OBJECT
public:
explicit FileExplorer(QFileSystemModel* filesmodel,
QWidget *parent = 0);
~FileExplorer();
QString currentPath() const;
public slots:
void setPath(QString path);
signals:
void sigPath(QString path);
void sigFilePath(QString fpath);
void sigFileNameSelected(bool select = true);
private slots:
void onCurrentDirChanged(QModelIndex current, QModelIndex previous);
void onCurrentFileChanged(QModelIndex current, QModelIndex previous);
void on_pathEdit_editingFinished();
private:
Ui::FileExplorer *ui;
QFileInfo finfo_;
QFileSystemModel *dir_model_;
FSfilterProxyModel *dir_proxy_model_;
QFileSystemModel *files_model_;
QShortcut *sc_editpath_;
};
#endif // FILEEXPLORER_H