+ nothing to moc for DAG RectItem class
This commit is contained in:
parent
88e987dd86
commit
3e941f2b87
|
@ -43,9 +43,9 @@ RectItem::RectItem(QGraphicsItem* parent) : QGraphicsRectItem(parent)
|
||||||
void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
|
void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
|
||||||
{
|
{
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
||||||
QStyleOptionViewItemV4 styleOption;
|
QStyleOptionViewItemV4 styleOption;
|
||||||
|
|
||||||
styleOption.backgroundBrush = backgroundBrush;
|
styleOption.backgroundBrush = backgroundBrush;
|
||||||
if (editing)
|
if (editing)
|
||||||
styleOption.backgroundBrush = editBrush;
|
styleOption.backgroundBrush = editBrush;
|
||||||
|
@ -69,10 +69,8 @@ void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
styleOption.rect = this->rect().toRect();
|
styleOption.rect = this->rect().toRect();
|
||||||
|
|
||||||
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &styleOption, painter);
|
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &styleOption, painter);
|
||||||
|
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <moc_DAGRectItem.cpp>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user