X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmarkerlineitem.cpp;h=563ef4edae4bbe630eef9edc3cf8309ff2030add;hp=9782a7938a5d9584b7b9a9acd545e1ad09168f76;hb=a4eb9eaf480ea9df5b4a070ad40171c5f2345440;hpb=6e73ba4a19fd92038e1ea749125767661fb34e27 diff --git a/src/qtui/markerlineitem.cpp b/src/qtui/markerlineitem.cpp index 9782a793..563ef4ed 100644 --- a/src/qtui/markerlineitem.cpp +++ b/src/qtui/markerlineitem.cpp @@ -25,13 +25,21 @@ MarkerLineItem::MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent) : QGraphicsObject(parent), - _boundingRect(0, 0, sceneWidth, 1) + _boundingRect(0, 0, sceneWidth, 1), + _chatLine(0) { + setVisible(false); setZValue(8); styleChanged(); // init brush and height connect(QtUi::style(), SIGNAL(changed()), SLOT(styleChanged())); } +void MarkerLineItem::setChatLine(ChatLine *line) { + _chatLine = line; + if(!line) + setVisible(false); +} + void MarkerLineItem::styleChanged() { _brush = QtUi::style()->brush(UiStyle::MarkerLine);