LibrePCB Developers Documentation
PathModel Class Referencefinal

The PathModel class implements QAbstractTableModel for librepcb::Path. More...

#include <pathmodel.h>

Inherits QAbstractTableModel.

+ Collaboration diagram for PathModel:

Public Types

enum  Column
 

Public Member Functions

 PathModel ()=delete
 
 PathModel (const PathModel &other) noexcept
 
 PathModel (QObject *parent=nullptr) noexcept
 
 ~PathModel () noexcept
 
void setPath (const Path &path) noexcept
 
const PathgetPath () const noexcept
 
void addItem (const QVariant &editData) noexcept
 
void copyItem (const QVariant &editData) noexcept
 
void removeItem (const QVariant &editData) noexcept
 
void moveItemUp (const QVariant &editData) noexcept
 
void moveItemDown (const QVariant &editData) noexcept
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
PathModeloperator= (const PathModel &rhs) noexcept
 

Private Attributes

Path mPath
 
Vertex mNewVertex
 

Detailed Description

The PathModel class implements QAbstractTableModel for librepcb::Path.

Member Enumeration Documentation

◆ Column

enum Column
Enumerator
COLUMN_X 
COLUMN_Y 
COLUMN_ANGLE 
COLUMN_ACTIONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

◆ PathModel() [1/3]

PathModel ( )
delete

◆ PathModel() [2/3]

PathModel ( const PathModel other)
noexcept

◆ PathModel() [3/3]

PathModel ( QObject *  parent = nullptr)
explicitnoexcept

◆ ~PathModel()

~PathModel ( )
noexcept

Member Function Documentation

◆ setPath()

void setPath ( const Path path)
noexcept

◆ getPath()

const Path& getPath ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ addItem()

void addItem ( const QVariant &  editData)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyItem()

void copyItem ( const QVariant &  editData)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItem()

void removeItem ( const QVariant &  editData)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemUp()

void moveItemUp ( const QVariant &  editData)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveItemDown()

void moveItemDown ( const QVariant &  editData)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ columnCount()

int columnCount ( const QModelIndex &  parent = QModelIndex()) const
override
+ Here is the caller graph for this function:

◆ data()

QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ headerData()

QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags flags ( const QModelIndex &  index) const
override
+ Here is the caller graph for this function:

◆ setData()

bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

PathModel& operator= ( const PathModel rhs)
noexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mPath

Path mPath
private

◆ mNewVertex

Vertex mNewVertex
private

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