projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed a newly introduced crash on user mode changes
[quassel.git]
/
src
/
qtui
/
chatline.h
diff --git
a/src/qtui/chatline.h
b/src/qtui/chatline.h
index
c7ac49b
..
3649c54
100644
(file)
--- a/
src/qtui/chatline.h
+++ b/
src/qtui/chatline.h
@@
-23,7
+23,7
@@
#include <QGraphicsItem>
#include <QGraphicsItem>
-#include "
messag
emodel.h"
+#include "
chatlin
emodel.h"
class ChatItem;
class ChatItem;
@@
-34,23
+34,25
@@
class ChatLine : public QGraphicsItem {
virtual ~ChatLine();
virtual QRectF boundingRect () const;
virtual ~ChatLine();
virtual QRectF boundingRect () const;
- inline int width() const { return _width; }
- inline int height() const { return _height; }
+ inline qreal width() const { return _width; }
+ inline qreal height() const { return _height; }
+ ChatItem *item(ChatLineModel::ColumnType) const;
virtual void paint (QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual void paint (QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- //void layout();
// returns height
qreal setGeometry(qreal width, qreal firstColPos, qreal secondColPos);
// returns height
qreal setGeometry(qreal width, qreal firstColPos, qreal secondColPos);
-
- //void myMousePressEvent ( QGraphicsSceneMouseEvent * event ) { qDebug() << "press"; mousePressEvent(event); }
+ void setSelected(bool selected, ChatLineModel::ColumnType minColumn = ChatLineModel::ContentsColumn);
+ void setHighlighted(bool highlighted);
protected:
protected:
- //bool sceneEvent ( QEvent * event );
private:
ChatItem *_timestampItem, *_senderItem, *_contentsItem;
private:
ChatItem *_timestampItem, *_senderItem, *_contentsItem;
- int _width, _height;
+ qreal _width, _height;
+
+ enum { Selected = 0x40, Highlighted = 0x80 };
+ quint8 _selection; // save space, so we put both the col and the flags into one byte
};
#endif
};
#endif