SocExplorerPlot.cpp
535 lines
| 13.7 KiB
| text/x-c
|
CppLexer
Jeandet Alexis
|
r0 | #include "SocExplorerPlot.h" | ||
SocExplorerPlot::SocExplorerPlot(QWidget *parent) : | ||||
r74 | QWidget(parent), mRubberBand(new QRubberBand(QRubberBand::Rectangle, this)) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot = new QCustomPlot(this); | |||
this->m_plot->setInteractions(QCP::iRangeDrag | QCP::iSelectAxes | | ||||
QCP::iSelectLegend | QCP::iSelectPlottables); | ||||
this->m_plot->axisRect()->setRangeDrag(Qt::Horizontal|Qt::Vertical); | ||||
this->m_plot->axisRect()->setRangeZoom(Qt::Horizontal|Qt::Vertical); | ||||
this->m_mainlayout = new QGridLayout(this); | ||||
this->setLayout(this->m_mainlayout); | ||||
this->m_mainlayout->addWidget(this->m_plot); | ||||
this->setMinimumSize(400,300); | ||||
this->setFocusPolicy(Qt::WheelFocus); | ||||
this->m_plot->setAttribute(Qt::WA_TransparentForMouseEvents); | ||||
this->ctrl_hold = false; | ||||
this->shift_hold = false; | ||||
this->mouse_hold = false; | ||||
this->m_plot->setNoAntialiasingOnDrag(true); | ||||
this->show(); | ||||
} | ||||
Jeandet Alexis
|
r0 | |||
r74 | SocExplorerPlot::~SocExplorerPlot() | |||
{ | ||||
delete mRubberBand; | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::show() | ||||
{ | ||||
r74 | QWidget::show(); | |||
} | ||||
void SocExplorerPlot::replot() | ||||
{ | ||||
this->m_plot->replot(); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setTitle(QString title) | ||||
{ | ||||
r74 | Q_UNUSED(title) | |||
//this->m_plot->setTitle(title); | ||||
/*! | ||||
Jeandet Alexis
|
r0 | @todo Function borcken fixe this! | ||
*/ | ||||
r74 | this->repaint(); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setXaxisLabel(QString label) | ||||
{ | ||||
r74 | this->m_plot->xAxis->setLabel(label); | |||
this->repaint(); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setYaxisLabel(QString label) | ||||
{ | ||||
r74 | this->m_plot->yAxis->setLabel(label); | |||
this->repaint(); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setXaxisRange(double lower, double upper) | ||||
{ | ||||
r74 | this->m_plot->xAxis->setRange(lower,upper); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setYaxisRange(double lower, double upper) | ||||
{ | ||||
r74 | this->m_plot->yAxis->setRange(lower,upper); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::rescaleAxis() | ||||
{ | ||||
r74 | this->m_plot->rescaleAxes(); | |||
this->m_plot->replot(); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setLegendFont(QFont font) | ||||
{ | ||||
r74 | this->m_plot->legend->setFont(font); | |||
this->repaint(); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setLegendSelectedFont(QFont font) | ||||
{ | ||||
r74 | this->m_plot->legend->setSelectedFont(font); | |||
this->repaint(); | ||||
Jeandet Alexis
|
r0 | } | ||
r18 | void SocExplorerPlot::setAdaptativeSampling(int graphIndex, bool enable) | |||
{ | ||||
r74 | this->m_plot->graph(graphIndex)->setAdaptiveSampling(enable); | |||
r18 | } | |||
Jeandet Alexis
|
r0 | int SocExplorerPlot::addGraph() | ||
{ | ||||
r74 | this->m_plot->addGraph(); | |||
return this->m_plot->graphCount() -1; | ||||
} | ||||
bool SocExplorerPlot::removeGraph(int graphIndex) | ||||
{ | ||||
return this->m_plot->removeGraph(graphIndex); | ||||
} | ||||
void SocExplorerPlot::removeAllGraphs() | ||||
{ | ||||
int graphCount=this->m_plot->graphCount(); | ||||
for(int i=0;i<graphCount;i++) | ||||
{ | ||||
this->m_plot->removeGraph(0); | ||||
} | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setGraphName(int graphIndex,QString name) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount()) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setName(name); | |||
Jeandet Alexis
|
r0 | } | ||
} | ||||
void SocExplorerPlot::setGraphData(int graphIndex, QList<QVariant> x, QList<QVariant> y) | ||||
{ | ||||
r74 | if((graphIndex<this->m_plot->graphCount()) && (x.count()==y.count()))// && (x.at(0).type()==QVariant::Double)) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | QVector<double> _x(x.count()), _y(y.count()); | |||
for(int i=0;i<x.count();i++) | ||||
Jeandet Alexis
|
r0 | { | ||
r74 | /*_x[i] = x.at(i).value<double>(); | |||
Jeandet Alexis
|
r0 | _y[i] = y.at(i).value<double>();*/ | ||
r74 | _x[i] = x.at(i).toDouble(); | |||
_y[i] = y.at(i).toDouble(); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | this->m_plot->graph(graphIndex)->setData(_x,_y); | |||
Jeandet Alexis
|
r0 | } | ||
r74 | this->m_plot->replot(); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::addGraphData(int graphIndex, QList<QVariant> x, QList<QVariant> y) | ||||
{ | ||||
r74 | if((graphIndex<this->m_plot->graphCount()) && (x.count()==y.count()))// && (x.at(0).type()==QVariant::Double)) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | QVector<double> _x(x.count()), _y(y.count()); | |||
for(int i=0;i<x.count();i++) | ||||
Jeandet Alexis
|
r0 | { | ||
r74 | /*_x[i] = x.at(i).value<double>(); | |||
Jeandet Alexis
|
r0 | _y[i] = y.at(i).value<double>();*/ | ||
r74 | _x[i] = x.at(i).toDouble(); | |||
_y[i] = y.at(i).toDouble(); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | this->m_plot->graph(graphIndex)->addData(_x,_y); | |||
Jeandet Alexis
|
r0 | } | ||
r74 | this->m_plot->replot(); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::addGraphData(int graphIndex, QVariant x, QVariant y) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount())// && (x.at(0).type()==QVariant::Double)) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->addData(x.toDouble(),y.toDouble()); | |||
Jeandet Alexis
|
r0 | } | ||
r74 | this->m_plot->replot(); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setGraphPen(int graphIndex,QPen pen) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount()) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setPen(pen); | |||
Jeandet Alexis
|
r0 | } | ||
} | ||||
QPen SocExplorerPlot::getGraphPen(int graphIndex) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount()) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | return this->m_plot->graph(graphIndex)->pen(); | |||
Jeandet Alexis
|
r0 | } | ||
r74 | return this->m_plot->graph()->pen(); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::setGraphLineStyle(int graphIndex,QString lineStyle) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount()) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | if(!lineStyle.compare("none")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsNone); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!lineStyle.compare("line")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsLine); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!lineStyle.compare("stepleft")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsStepLeft); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!lineStyle.compare("stepright")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsStepRight); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!lineStyle.compare("stepcenter")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsStepCenter); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!lineStyle.compare("impulse")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setLineStyle(QCPGraph::lsImpulse); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
} | ||||
} | ||||
void SocExplorerPlot::setGraphScatterStyle(int graphIndex,QString scatterStyle) | ||||
{ | ||||
r74 | if(graphIndex<this->m_plot->graphCount()) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | if(!scatterStyle.compare("none")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssNone); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("dot")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssDot); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("cross")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssCross); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("plus")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssPlus); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("circle")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssCircle); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("disc")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssDisc); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("square")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssSquare); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("diamond")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssDiamond); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("star")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssStar); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("triangle")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssTriangle); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("invertedtriangle")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssTriangleInverted); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("crosssquare")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssCrossSquare); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("plussquare")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssPlusSquare); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("crosscircle")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssCrossCircle); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("pluscircle")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssPlusCircle); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(!scatterStyle.compare("peace")) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | this->m_plot->graph(graphIndex)->setScatterStyle(QCPScatterStyle::ssPeace); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
} | ||||
} | ||||
r74 | void SocExplorerPlot::setXaxisTickLabelType(QCPAxis::LabelType type) | |||
{ | ||||
this->m_plot->xAxis->setTickLabelType(type); | ||||
} | ||||
void SocExplorerPlot::setXaxisDateTimeFormat(const QString &format) | ||||
{ | ||||
this->m_plot->xAxis->setDateTimeFormat(format); | ||||
} | ||||
Jeandet Alexis
|
r0 | |||
void SocExplorerPlot::keyPressEvent(QKeyEvent * event) | ||||
{ | ||||
r74 | switch(event->key()) | |||
Jeandet Alexis
|
r0 | { | ||
case Qt::Key_Control: | ||||
r74 | this->ctrl_hold = true; | |||
setCursor(Qt::CrossCursor); | ||||
break; | ||||
Jeandet Alexis
|
r0 | case Qt::Key_Shift: | ||
r74 | this->shift_hold = true; | |||
break; | ||||
Jeandet Alexis
|
r0 | case Qt::Key_M: | ||
r74 | this->rescaleAxis(); | |||
break; | ||||
case Qt::Key_Left: | ||||
if(!ctrl_hold) | ||||
{ | ||||
move(-0.1,Qt::Horizontal); | ||||
} | ||||
else | ||||
{ | ||||
zoom(2,this->width()/2,Qt::Horizontal); | ||||
} | ||||
break; | ||||
case Qt::Key_Right: | ||||
if(!ctrl_hold) | ||||
{ | ||||
move(0.1,Qt::Horizontal); | ||||
} | ||||
else | ||||
{ | ||||
zoom(0.5,this->width()/2,Qt::Horizontal); | ||||
} | ||||
break; | ||||
case Qt::Key_Up: | ||||
if(!ctrl_hold) | ||||
{ | ||||
move(0.1,Qt::Vertical); | ||||
} | ||||
else | ||||
{ | ||||
zoom(0.5,this->height()/2,Qt::Vertical); | ||||
} | ||||
break; | ||||
case Qt::Key_Down: | ||||
if(!ctrl_hold) | ||||
{ | ||||
move(-0.1,Qt::Vertical); | ||||
} | ||||
else | ||||
{ | ||||
zoom(2,this->height()/2,Qt::Vertical); | ||||
} | ||||
break; | ||||
Jeandet Alexis
|
r0 | default: | ||
r74 | QWidget::keyPressEvent(event); | |||
break; | ||||
Jeandet Alexis
|
r0 | } | ||
} | ||||
void SocExplorerPlot::keyReleaseEvent(QKeyEvent * event) | ||||
{ | ||||
r74 | switch(event->key()) | |||
Jeandet Alexis
|
r0 | { | ||
case Qt::Key_Control: | ||||
r74 | event->accept(); | |||
this->ctrl_hold = false; | ||||
break; | ||||
Jeandet Alexis
|
r0 | case Qt::Key_Shift: | ||
r74 | event->accept(); | |||
this->shift_hold = false; | ||||
break; | ||||
Jeandet Alexis
|
r0 | default: | ||
r74 | QWidget::keyReleaseEvent(event); | |||
break; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | setCursor(Qt::ArrowCursor); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::wheelEvent(QWheelEvent * event) | ||||
{ | ||||
r74 | double factor; | |||
double wheelSteps = event->delta()/120.0; // a single step delta is +/-120 usually | ||||
if(ctrl_hold) | ||||
Jeandet Alexis
|
r0 | { | ||
r74 | if (event->orientation()==Qt::Vertical)//mRangeZoom.testFlag(Qt::Vertical)) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | setCursor(Qt::SizeVerCursor); | |||
factor = pow(this->m_plot->axisRect()->rangeZoomFactor(Qt::Vertical), wheelSteps); | ||||
zoom(factor,event->pos().y(),Qt::Vertical); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | QWidget::wheelEvent(event); | |||
return; | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if(shift_hold) | |||
{ | ||||
if (event->orientation()==Qt::Vertical)//mRangeZoom.testFlag(Qt::Vertical)) | ||||
{ | ||||
setCursor(Qt::SizeHorCursor); | ||||
factor = pow(this->m_plot->axisRect()->rangeZoomFactor(Qt::Horizontal), wheelSteps); | ||||
zoom(factor,event->pos().x(),Qt::Horizontal); | ||||
} | ||||
QWidget::wheelEvent(event); | ||||
return; | ||||
} | ||||
move(wheelSteps/10,Qt::Horizontal); | ||||
QWidget::wheelEvent(event); | ||||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::mousePressEvent(QMouseEvent *event) | ||||
{ | ||||
r74 | if(event->button()==Qt::LeftButton) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | if(ctrl_hold) | |||
{ | ||||
setCursor(Qt::CrossCursor); | ||||
mOrigin = event->pos(); | ||||
mRubberBand->setGeometry(QRect(mOrigin, QSize())); | ||||
mRubberBand->show(); | ||||
} | ||||
else | ||||
{ | ||||
setCursor(Qt::ClosedHandCursor); | ||||
mDragStart = event->pos(); | ||||
this->mouse_hold = true; | ||||
DragStartHorzRange = this->m_plot->axisRect()->rangeDragAxis(Qt::Horizontal)->range(); | ||||
DragStartVertRange = this->m_plot->axisRect()->rangeDragAxis(Qt::Vertical)->range(); | ||||
} | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | QWidget::mousePressEvent(event); | |||
Jeandet Alexis
|
r0 | } | ||
void SocExplorerPlot::mouseReleaseEvent(QMouseEvent *event) | ||||
{ | ||||
r74 | if(event->button()==Qt::LeftButton) | |||
{ | ||||
this->mouse_hold = false; | ||||
} | ||||
if (mRubberBand->isVisible()) | ||||
Jeandet Alexis
|
r0 | { | ||
r74 | const QRect & zoomRect = mRubberBand->geometry(); | |||
int xp1, yp1, xp2, yp2; | ||||
zoomRect.getCoords(&xp1, &yp1, &xp2, &yp2); | ||||
double x1 = this->m_plot->xAxis->pixelToCoord(xp1); | ||||
double x2 = this->m_plot->xAxis->pixelToCoord(xp2); | ||||
double y1 = this->m_plot->yAxis->pixelToCoord(yp1); | ||||
double y2 = this->m_plot->yAxis->pixelToCoord(yp2); | ||||
this->m_plot->xAxis->setRange(x1, x2); | ||||
this->m_plot->yAxis->setRange(y1, y2); | ||||
mRubberBand->hide(); | ||||
this->m_plot->replot(); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | setCursor(Qt::ArrowCursor); | |||
QWidget::mouseReleaseEvent(event); | ||||
} | ||||
void SocExplorerPlot::zoom(double factor, int center, Qt::Orientation orientation) | ||||
{ | ||||
QCPAxis* axis = this->m_plot->axisRect()->rangeZoomAxis(orientation); | ||||
axis->scaleRange(factor, axis->pixelToCoord(center)); | ||||
this->m_plot->replot(); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | void SocExplorerPlot::move(double factor, Qt::Orientation orientation) | |||
{ | ||||
QCPAxis* axis = this->m_plot->axisRect()->rangeDragAxis(orientation); | ||||
double rg = (axis->range().upper - axis->range().lower)*(factor); | ||||
axis->setRange(axis->range().lower+(rg), axis->range().upper+(rg)); | ||||
this->m_plot->replot(); | ||||
} | ||||
Jeandet Alexis
|
r0 | void SocExplorerPlot::mouseMoveEvent(QMouseEvent *event) | ||
{ | ||||
r74 | if(mouse_hold) | |||
Jeandet Alexis
|
r0 | { | ||
r74 | QCPAxis* Haxis = this->m_plot->axisRect()->rangeDragAxis(Qt::Horizontal); | |||
QCPAxis* Vaxis = this->m_plot->axisRect()->rangeDragAxis(Qt::Vertical); | ||||
double diff = Haxis->pixelToCoord(mDragStart.x()) - Haxis->pixelToCoord(event->pos().x()); | ||||
Haxis->setRange(DragStartHorzRange.lower+diff, DragStartHorzRange.upper+diff); | ||||
diff = Vaxis->pixelToCoord(mDragStart.y()) - Vaxis->pixelToCoord(event->pos().y()); | ||||
Vaxis->setRange(DragStartVertRange.lower+diff, DragStartVertRange.upper+diff); | ||||
this->m_plot->replot(); | ||||
Jeandet Alexis
|
r0 | } | ||
r74 | if (mRubberBand->isVisible()) | |||
{ | ||||
mRubberBand->setGeometry(QRect(mOrigin, event->pos()).normalized()); | ||||
} | ||||
QWidget::mouseMoveEvent(event); | ||||
Jeandet Alexis
|
r0 | } | ||