-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilesview.h
39 lines (30 loc) · 825 Bytes
/
filesview.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
#ifndef FILESVIEW_H
#define FILESVIEW_H
#pragma once
#include <QWidget>
#include <QFileSystemModel>
#include <QListView>
#include <QPushButton>
#include <QLineEdit>
class FilesView : public QWidget
{
Q_OBJECT
public:
FilesView(QWidget* parent);
signals:
void fileSelected(const QFileInfo& info);
private slots:
void onFileClicked(const QModelIndex& index);
void onFileSelected(const QModelIndex& index);
void onBackClicked();
void onChangedDirectoryButton();
void onChangedDirectoryLineEdit();
private:
QFileSystemModel *filesystem_model{nullptr};
QListView *list_view{nullptr};
QPushButton *back_button{nullptr};
QPushButton *change_directory_button{nullptr};
QLineEdit *current_directory_line_edit{nullptr};
QModelIndex model_index;
};
#endif // FILESVIEW_H