/***************************************************************************
                          qlinetracker.cpp  -  description
                             -------------------
    begin                : dom ene 19 2003
    copyright            : (C) 2003 by Armando Navarro-Vazquez
    email                : qoajnv@usc.es
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 
#include "qlinetracker.h"
#include "qpainter.h"
//Added by qt3to4:
#include <QMouseEvent>

QLineTracker::QLineTracker(QWidget* parent, const char* name) : QRectTracker(parent,name) {
}
QLineTracker::~QLineTracker(){
}
/** No descriptions */
void QLineTracker::mouseMoveEvent(QMouseEvent* e){

  QColor color(255,245,14);
  QPen pen(color,1,Qt::DotLine);
  m_painter->setPen(pen);
  QPoint parentpoint=e->pos();
  QRect rect=m_parent->rect();
  QPoint points[2];
  if(!m_bfirst)       //erase the last line
  {
    
 /*   m_painter->moveTo(m_oldpoint.x(),rect.top());
    m_painter->lineTo(m_oldpoint.x(),rect.bottom());
    m_painter->moveTo(rect.left(),m_oldpoint.y());
    m_painter->lineTo(rect.right(),m_oldpoint.y());*/
  }
  
 /*  m_painter->moveTo(parentpoint.x(),rect.top());
   m_painter->lineTo(parentpoint.x(),rect.bottom());
   m_painter->moveTo(rect.left(),parentpoint.y());
   m_painter->lineTo(rect.right(),parentpoint.y());*/
   
   m_oldpoint=parentpoint;
   m_bfirst=false;
}
