Fix some warnings
[quassel.git] / src / qtui / columnhandleitem.cpp
index e8dd97e..7d382c1 100644 (file)
 #include <QGraphicsSceneHoverEvent>
 #include <QPainter>
 
-#include <QDebug>
-
 #include "columnhandleitem.h"
 
 ColumnHandleItem::ColumnHandleItem(qreal w, QGraphicsItem *parent)
   : QGraphicsItem(parent),
     _width(w),
     _hover(0),
-    _timeLine(150),
     _moving(false),
+    _timeLine(150),
     _minXPos(0),
     _maxXPos(0)
 {
@@ -87,6 +85,7 @@ void ColumnHandleItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
   if(_moving) {
     _moving = false;
     setCursor(QCursor(Qt::OpenHandCursor));
+    emit positionChanged(x() + width()/2);
     event->accept();
   } else {
     event->ignore();
@@ -117,7 +116,7 @@ void ColumnHandleItem::hoverChanged(qreal value) {
 void ColumnHandleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
   Q_UNUSED(option);
   Q_UNUSED(widget);
-  
+
   QLinearGradient gradient(0, 0, width(), 0);
   gradient.setColorAt(0.25, Qt::transparent);
   gradient.setColorAt(0.5, QColor(0, 0, 0, _hover * 200));