|
LibreCAD
|
Model to display a list of DxfLinePatterns in a QTableView. Show preview, name and description. More...
#include <linepatternmodel.h>


Public Types | |
| enum | columns { PREVIEW, NAME, DESCRIPTION, LAST } |
Public Member Functions | |
| LinePatternModel (QObject *parent=0) | |
| Create widget. More... | |
| void | setLinePatterns (std::vector< lc::DxfLinePatternByValue_CSPtr > linePatterns) |
| Set the new list of line patterns. More... | |
| lc::DxfLinePattern_CSPtr | linePatternAt (const int index) const |
| Return line pattern at specific row. More... | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Private Attributes | |
| std::vector < lc::DxfLinePatternByValue_CSPtr > | _linePatterns |
Model to display a list of DxfLinePatterns in a QTableView. Show preview, name and description.
Definition at line 18 of file linepatternmodel.h.
| Enumerator | |
|---|---|
| PREVIEW | |
| NAME | |
| DESCRIPTION | |
| LAST | |
Definition at line 22 of file linepatternmodel.h.
| LinePatternModel::LinePatternModel | ( | QObject * | parent = 0 | ) |
Create widget.
| parent | Pointer to parent object |
Definition at line 3 of file linepatternmodel.cpp.
| int LinePatternModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 23 of file linepatternmodel.cpp.
| QVariant LinePatternModel::data | ( | const QModelIndex & | index, |
| int | role = Qt::DisplayRole |
||
| ) | const |
Definition at line 27 of file linepatternmodel.cpp.
| QVariant LinePatternModel::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role | ||
| ) | const |
Definition at line 64 of file linepatternmodel.cpp.
| lc::DxfLinePattern_CSPtr LinePatternModel::linePatternAt | ( | const int | index | ) | const |
Return line pattern at specific row.
| index | Row |
Definition at line 15 of file linepatternmodel.cpp.
| int LinePatternModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 19 of file linepatternmodel.cpp.
| void LinePatternModel::setLinePatterns | ( | std::vector< lc::DxfLinePatternByValue_CSPtr > | linePatterns | ) |
Set the new list of line patterns.
| linePatterns | New list of DxfLinePatterns Update the list |
Definition at line 7 of file linepatternmodel.cpp.
|
private |
Definition at line 56 of file linepatternmodel.h.