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
 

Signals

void pathChanged (const Path &path)
 

Public Member Functions

 PathModel ()=delete
 
 PathModel (const PathModel &other)=delete
 
 PathModel (QObject *parent=nullptr) noexcept
 
 ~PathModel () noexcept
 
void setPath (const Path &path) noexcept
 
const PathgetPath () const noexcept
 
void add (const QPersistentModelIndex &itemIndex) noexcept
 
void copy (const QPersistentModelIndex &itemIndex) noexcept
 
void remove (const QPersistentModelIndex &itemIndex) noexcept
 
void moveUp (const QPersistentModelIndex &itemIndex) noexcept
 
void moveDown (const QPersistentModelIndex &itemIndex) 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)
delete

◆ 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:

◆ add()

void add ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy()

void copy ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void remove ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveUp()

void moveUp ( const QPersistentModelIndex &  itemIndex)
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveDown()

void moveDown ( const QPersistentModelIndex &  itemIndex)
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:

◆ pathChanged

void pathChanged ( const Path path)
signal
+ 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: