LibrePCB Developers Documentation
FavoriteProjectsModel Class Reference

The FavoriteProjectsModel class. More...

#include <favoriteprojectsmodel.h>

Inherits QAbstractListModel.

+ Collaboration diagram for FavoriteProjectsModel:

Public Member Functions

 FavoriteProjectsModel ()=delete
 
 FavoriteProjectsModel (const FavoriteProjectsModel &other)=delete
 
 FavoriteProjectsModel (const Workspace &workspace) noexcept
 
 ~FavoriteProjectsModel () noexcept
 
bool isFavoriteProject (const FilePath &filepath) const noexcept
 
void addFavoriteProject (const FilePath &filepath) noexcept
 
void removeFavoriteProject (const FilePath &filepath) noexcept
 
void updateVisibleProjects () noexcept
 
FavoriteProjectsModeloperator= (const FavoriteProjectsModel &rhs)=delete
 

Private Member Functions

void save () noexcept
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 

Private Attributes

const WorkspacemWorkspace
 
FilePath mFilePath
 
QList< FilePathmAllProjects
 
QList< FilePathmVisibleProjects
 

Detailed Description

Constructor & Destructor Documentation

◆ FavoriteProjectsModel() [1/3]

◆ FavoriteProjectsModel() [2/3]

FavoriteProjectsModel ( const FavoriteProjectsModel other)
delete

◆ FavoriteProjectsModel() [3/3]

FavoriteProjectsModel ( const Workspace workspace)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~FavoriteProjectsModel()

~FavoriteProjectsModel ( )
noexcept

Member Function Documentation

◆ isFavoriteProject()

bool isFavoriteProject ( const FilePath filepath) const
noexcept

◆ addFavoriteProject()

void addFavoriteProject ( const FilePath filepath)
noexcept

◆ removeFavoriteProject()

void removeFavoriteProject ( const FilePath filepath)
noexcept

◆ updateVisibleProjects()

void updateVisibleProjects ( )
noexcept
+ Here is the call graph for this function:

◆ operator=()

FavoriteProjectsModel & operator= ( const FavoriteProjectsModel rhs)
delete

◆ save()

void save ( )
privatenoexcept
+ Here is the call graph for this function:

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
private

◆ data()

QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
private

Member Data Documentation

◆ mWorkspace

const Workspace& mWorkspace
private

◆ mFilePath

FilePath mFilePath
private

◆ mAllProjects

QList<FilePath> mAllProjects
private

◆ mVisibleProjects

QList<FilePath> mVisibleProjects
private

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