26 #include "../ifc/ifcdef.h"
28 #include <QStandardItemModel>
29 #include <QAbstractItemView>
54 , m_iconHeight(height)
79 view()->setTextElideMode(Qt::ElideNone);
80 setSizeAdjustPolicy(QComboBox::AdjustToContents);
92 setCurrentIndex(index);
113 setCurrentIndex(findData(type));
115 if (currentIndex()!= count() -1 )
128 QVariant type = itemData(index);
129 if(type != QVariant::Invalid )
141 pixmap.fill(Qt::black);
143 QBrush brush(Qt::black);
144 QPen pen(brush, 2.5, style);
146 QPainter painter(&pixmap);
148 if (style != Qt::NoPen)
154 return QIcon(pixmap);
void setLineType(const QString &type)
void lineTypeChanged(const QString &type)
void updateLineType(int index)
QIcon createIcon(const QString &type)
LineTypeComboBox(QWidget *parent=nullptr)
QString m_currentLineType
virtual ~LineTypeComboBox()
const QString LineTypeSolidLine
const QString LineTypeDashDotLine
const QString LineTypeDashDotDotLine
const QString LineTypeDashLine
const QString LineTypeNone
Qt::PenStyle lineTypeToPenStyle(const QString &lineType)
LineStyle return pen style for current line style.
const QString LineTypeDotLine