2022-07-11 18:30:09 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
//#include "../../MiscHelpers/Common/PanelView.h"
|
|
|
|
#include "../../MiscHelpers/Common/TreeviewEx.h"
|
|
|
|
#include "SbiePlusAPI.h"
|
|
|
|
#include <QFileSystemModel>
|
|
|
|
|
|
|
|
class CFileView : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CFileView(QWidget *parent = Q_NULLPTR);
|
|
|
|
~CFileView();
|
|
|
|
|
2022-10-07 11:53:45 +01:00
|
|
|
virtual void SaveState();
|
|
|
|
|
2022-07-11 18:30:09 +01:00
|
|
|
void SetBox(const CSandBoxPtr& pBox);
|
|
|
|
const CSandBoxPtr& GetBox() const { return m_pBox; }
|
2022-07-13 14:42:33 +01:00
|
|
|
|
|
|
|
virtual QTreeView* GetTree() { return m_pTreeView; }
|
2022-07-11 18:30:09 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void OnFileMenu(const QPoint &);
|
|
|
|
void OnFileDblClick(const QModelIndex &);
|
|
|
|
|
2023-01-29 16:10:11 +00:00
|
|
|
void OnAboutToBeModified();
|
2022-07-14 09:46:13 +01:00
|
|
|
|
2022-07-11 18:30:09 +01:00
|
|
|
protected:
|
|
|
|
CSandBoxPtr m_pBox;
|
|
|
|
|
|
|
|
private:
|
2022-11-05 13:42:23 +00:00
|
|
|
QGridLayout* m_pMainLayout;
|
2023-05-21 15:37:28 +01:00
|
|
|
QTreeViewEx* m_pTreeView;
|
2022-11-05 13:42:23 +00:00
|
|
|
QFileSystemModel* m_pFileModel;
|
2022-07-11 18:30:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// CFileBrowserWindow
|
|
|
|
|
|
|
|
class CFileBrowserWindow : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CFileBrowserWindow(const CSandBoxPtr& pBox, QWidget *parent = Q_NULLPTR);
|
|
|
|
~CFileBrowserWindow();
|
|
|
|
|
|
|
|
virtual void accept() {}
|
|
|
|
virtual void reject() { this->close(); }
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void Closed();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
QGridLayout* m_pMainLayout;
|
|
|
|
CFileView* m_FileView;
|
|
|
|
};
|