3 #include <QAbstractTableModel>
7 #include <cad/meta/dxflinepattern.h>
11 #define PREVIEW_WIDTH 100
12 #define PREVIEW_HEIGHT 20
40 void setLinePatterns(std::vector<lc::DxfLinePatternByValue_CSPtr> linePatterns);
47 lc::DxfLinePattern_CSPtr
linePatternAt(
const int index)
const;
49 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
50 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
51 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
53 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const;
int rowCount(const QModelIndex &parent=QModelIndex()) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const
void setLinePatterns(std::vector< lc::DxfLinePatternByValue_CSPtr > linePatterns)
Set the new list of line patterns.
Model to display a list of DxfLinePatterns in a QTableView. Show preview, name and description...
std::vector< lc::DxfLinePatternByValue_CSPtr > _linePatterns
LinePatternModel(QObject *parent=0)
Create widget.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
lc::DxfLinePattern_CSPtr linePatternAt(const int index) const
Return line pattern at specific row.