SILICON
Loading...
Searching...
No Matches
ProjectTree Class Reference

Project document navigator used by the SILICON editor. More...

#include <projectTree.hpp>

Inheritance diagram for ProjectTree:
Collaboration diagram for ProjectTree:

Public Member Functions

 ProjectTree (QWidget *parent=nullptr)
void rebuild (const project::ProjectInfo &project, std::span< const project::Document > documents, std::string_view activeDocumentPath={})
void selectDocument (std::string_view path)
void clearDocumentSelection ()
QTreeWidgetItem * selectedProjectItem () const
std::optional< ProjectTreeDocumentSelection > selectedDocument () const

Static Public Member Functions

static ProjectTreeItemKind itemKind (const QTreeWidgetItem *item)
static std::optional< project::DocumentType > itemDocumentType (const QTreeWidgetItem *item)
static std::optional< project::DocumentCategory > itemDocumentCategory (const QTreeWidgetItem *item)
static std::string documentPath (const QTreeWidgetItem *item)
static std::string architectureName (const QTreeWidgetItem *item)

Private Member Functions

void addSection (QTreeWidgetItem *projectItem, project::DocumentCategory category, std::span< const project::Document > documents)
void addDocument (QTreeWidgetItem *parent, const project::Document &document)

Detailed Description

Project document navigator used by the SILICON editor.

Definition at line 40 of file projectTree.hpp.

Constructor & Destructor Documentation

◆ ProjectTree()

ProjectTree ( QWidget * parent = nullptr)
explicit

Definition at line 89 of file projectTree.cpp.

Member Function Documentation

◆ addDocument()

void addDocument ( QTreeWidgetItem * parent,
const project::Document & document )
private

Definition at line 262 of file projectTree.cpp.

◆ addSection()

void addSection ( QTreeWidgetItem * projectItem,
project::DocumentCategory category,
std::span< const project::Document > documents )
private

Definition at line 217 of file projectTree.cpp.

◆ architectureName()

std::string architectureName ( const QTreeWidgetItem * item)
staticnodiscard

Definition at line 210 of file projectTree.cpp.

◆ clearDocumentSelection()

void clearDocumentSelection ( )

Definition at line 153 of file projectTree.cpp.

◆ documentPath()

std::string documentPath ( const QTreeWidgetItem * item)
staticnodiscard

Definition at line 205 of file projectTree.cpp.

◆ itemDocumentCategory()

std::optional< project::DocumentCategory > itemDocumentCategory ( const QTreeWidgetItem * item)
staticnodiscard

Definition at line 197 of file projectTree.cpp.

◆ itemDocumentType()

std::optional< project::DocumentType > itemDocumentType ( const QTreeWidgetItem * item)
staticnodiscard

Definition at line 188 of file projectTree.cpp.

◆ itemKind()

ProjectTreeItemKind itemKind ( const QTreeWidgetItem * item)
staticnodiscard

Definition at line 182 of file projectTree.cpp.

◆ rebuild()

void rebuild ( const project::ProjectInfo & project,
std::span< const project::Document > documents,
std::string_view activeDocumentPath = {} )

Definition at line 97 of file projectTree.cpp.

◆ selectDocument()

void selectDocument ( std::string_view path)

Definition at line 121 of file projectTree.cpp.

◆ selectedDocument()

std::optional< ProjectTreeDocumentSelection > selectedDocument ( ) const
nodiscard

Definition at line 165 of file projectTree.cpp.

◆ selectedProjectItem()

QTreeWidgetItem * selectedProjectItem ( ) const
nodiscard

Definition at line 159 of file projectTree.cpp.


The documentation for this class was generated from the following files: