-
Notifications
You must be signed in to change notification settings - Fork 0
/
Fileviewwidget.h
40 lines (32 loc) · 907 Bytes
/
Fileviewwidget.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
#ifndef FILEVIEWWIDGET_H
#define FILEVIEWWIDGET_H
#include <QObject>
#include <QWidget>
#include <QTreeWidget>
#include "assetmanager.h"
#include "textedittabwidget.h"
#include "treefileitem.h"
class FileViewWidget : public QTreeWidget
{
Q_OBJECT
public:
FileViewWidget(QWidget *parent = 0);
bool isProjectLoaded();
void loadFolder(const QString &);
void load(AssetManager *, TextEditTabWidget *);
int numOfItems = 0;
void attachDir(QTreeWidgetItem * parent, const QString &);
void clearTree();
QStringList getMainParentFolders();
private:
bool projectLoaded;
AssetManager * assetManager;
TextEditTabWidget * tabWidget;
QVector<TreeFileItem*> fileItems;
QStringList mainParentFolders;
private slots:
void loadToEditor(const QModelIndex&);
protected:
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
};
#endif // FILEVIEWWIDGET_H