 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
10 #include <QFileSystemModel>
24 explicit ProjectView(QWidget *parent =
nullptr) : QTreeView(parent)
26 m_fileSystemModel =
new QFileSystemModel;
27 QTreeView::setModel(m_fileSystemModel);
30 setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
32 for (
int i{1}; i <
size().width(); ++i)
37 &QTreeView::customContextMenuRequested,
44 m_fileSystemModel->setRootPath(
path);
45 setRootIndex(m_fileSystemModel->index(
path));
50 return m_fileSystemModel->filePath(index);
55 return m_fileSystemModel->rootDirectory().filePath(
relativePathAt(index));
59 QFileSystemModel *m_fileSystemModel;
Definition: ProjectView.h:17
int size
Definition: FileIOFactory.cpp:130
ProjectView(QWidget *parent=nullptr)
Definition: ProjectView.h:24
static const std::string path
Definition: PointCloud.cpp:59
friend class ProjectViewContextMenu
Definition: ProjectView.h:21
void setRootPath(const QString &path)
Definition: ProjectView.h:42
QString relativePathAt(const QModelIndex &index) const
Definition: ProjectView.h:48
QString absolutePathAt(const QModelIndex &index) const
Definition: ProjectView.h:53