projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add shortcut that jumps to the markerline
[quassel.git]
/
src
/
qtui
/
markerlineitem.cpp
diff --git
a/src/qtui/markerlineitem.cpp
b/src/qtui/markerlineitem.cpp
index
9782a79
..
563ef4e
100644
(file)
--- a/
src/qtui/markerlineitem.cpp
+++ b/
src/qtui/markerlineitem.cpp
@@
-25,13
+25,21
@@
MarkerLineItem::MarkerLineItem(qreal sceneWidth, QGraphicsItem *parent)
: QGraphicsObject(parent),
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()));
}
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);
void MarkerLineItem::styleChanged() {
_brush = QtUi::style()->brush(UiStyle::MarkerLine);