X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fcolumnhandleitem.h;fp=src%2Fqtui%2Fcolumnhandleitem.h;h=2c5aca5be9bd2585ab567497b4473b4f296c31ce;hp=67377407082ceceb0b22193d12f73d806a70136b;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hpb=61c8d84d1c849373e0f115dc748ed45cff95287d diff --git a/src/qtui/columnhandleitem.h b/src/qtui/columnhandleitem.h index 67377407..2c5aca5b 100644 --- a/src/qtui/columnhandleitem.h +++ b/src/qtui/columnhandleitem.h @@ -27,49 +27,51 @@ #include "chatscene.h" -class ColumnHandleItem : public QGraphicsObject { - Q_OBJECT - Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity) +class ColumnHandleItem : public QGraphicsObject +{ + Q_OBJECT + Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity) -public: - ColumnHandleItem(qreal width, QGraphicsItem *parent = 0); - virtual inline int type() const { return ChatScene::ColumnHandleType; } +public : + ColumnHandleItem(qreal width, QGraphicsItem *parent = 0); + virtual inline int type() const { return ChatScene::ColumnHandleType; } - inline qreal width() const { return _width; } - inline QRectF boundingRect() const { return _boundingRect; } - inline qreal sceneLeft() const { return _sceneLeft; } - inline qreal sceneRight() const { return _sceneRight; } + inline qreal width() const { return _width; } + inline QRectF boundingRect() const { return _boundingRect; } + inline qreal sceneLeft() const { return _sceneLeft; } + inline qreal sceneRight() const { return _sceneRight; } - inline qreal opacity() const { return _opacity; } + inline qreal opacity() const { return _opacity; } - void setXPos(qreal xpos); - void setXLimits(qreal min, qreal max); + void setXPos(qreal xpos); + void setXLimits(qreal min, qreal max); - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); public slots: - void sceneRectChanged(const QRectF &); - void setOpacity(qreal opacity); + void sceneRectChanged(const QRectF &); + void setOpacity(qreal opacity); protected: - void hoverEnterEvent(QGraphicsSceneHoverEvent *event); - void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void hoverEnterEvent(QGraphicsSceneHoverEvent *event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); signals: - void positionChanged(qreal x); + void positionChanged(qreal x); private: - qreal _width; - qreal _sceneLeft, _sceneRight; - QRectF _boundingRect; - bool _moving; - qreal _offset; - qreal _minXPos, _maxXPos; - qreal _opacity; - QPropertyAnimation *_animation; + qreal _width; + qreal _sceneLeft, _sceneRight; + QRectF _boundingRect; + bool _moving; + qreal _offset; + qreal _minXPos, _maxXPos; + qreal _opacity; + QPropertyAnimation *_animation; }; + #endif