14 #include <QItemDelegate>
17 namespace MAKVrExchange
34 virtual QSize
sizeHint(
const QStyleOptionViewItem& option,
35 const QModelIndex& index )
const;
46 virtual void setColor(
const QColor& color );
49 virtual void paint( QPainter* painter,
const QStyleOptionViewItem& option,
50 const QModelIndex& index )
const;
71 virtual void setColor(
const QColor& color );
93 const QModelIndex& index )
const;
100 const QModelIndex& index )
const;
103 virtual void paint( QPainter* painter,
const QStyleOptionViewItem& option,
104 const QModelIndex& index )
const;
117 const QModelIndex& index )
const;
120 virtual void paint( QPainter* painter,
const QStyleOptionViewItem& option,
121 const QModelIndex& index )
const;
126 QRect& pixmapRect,
bool hint )
const;
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Draw the line style that was chosen.
QColor myColor
Definition: plotterLegendItemDelegates.h:79
virtual void setEditorData(QWidget *editor, const QModelIndex &index) const
Populate the editor with the item's data.
QColor myColor
Definition: plotterLegendItemDelegates.h:54
DtLineStylePainterDelegate * myDelegate
Definition: plotterLegendItemDelegates.h:81
virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Set the item's data based on changes to the editor.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create the color select dialog.
Item Delegate for picking a line style.
Definition: plotterLegendItemDelegates.h:87
virtual void paintEvent(QPaintEvent *event)
Paint method for the combo box.
virtual ~DtLineStyleComboBox()
Virtual DTOR.
virtual QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
Create and initialize combo box editor.
virtual void doLayoutCenter(const QStyleOptionViewItem &option, QRect &pixmapRect, bool hint) const
Layout the pixmap rect for the color icon.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Paint the combo boxes elements as lines.
Item Delegate for selecting a color.
Definition: plotterLegendItemDelegates.h:110
Item Delegate for painting lines in the LineStyleComboBox's items.
Definition: plotterLegendItemDelegates.h:41
virtual void setColor(const QColor &color)
Set the color used to draw the lines.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Draw the line style that was chosen.
DtLineStyleComboBox(QWidget *parent=0)
CTOR.
virtual void setColor(const QColor &color)
Set the color used to draw the lines.
Combo Box for choosing line styles.
Definition: plotterLegendItemDelegates.h:60