mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove code already ported to the new profile.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
963178d3d4
commit
e6c294f718
2 changed files with 0 additions and 33 deletions
|
@ -480,37 +480,6 @@ void DivePlannerGraphics::mouseMoveEvent(QMouseEvent *event)
|
|||
#endif
|
||||
}
|
||||
|
||||
void DivePlannerGraphics::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (event->modifiers()) {
|
||||
QGraphicsView::mousePressEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
QPointF mappedPos = mapToScene(event->pos());
|
||||
if (event->button() == Qt::LeftButton) {
|
||||
Q_FOREACH (QGraphicsItem *item, scene()->items(mappedPos, Qt::IntersectsItemBoundingRect, Qt::AscendingOrder, transform())) {
|
||||
if (DiveHandler *h = qgraphicsitem_cast<DiveHandler *>(item)) {
|
||||
activeDraggedHandler = h;
|
||||
activeDraggedHandler->setBrush(Qt::red);
|
||||
originalHandlerPos = activeDraggedHandler->pos();
|
||||
}
|
||||
}
|
||||
}
|
||||
QGraphicsView::mousePressEvent(event);
|
||||
}
|
||||
|
||||
void DivePlannerGraphics::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (activeDraggedHandler) {
|
||||
/* we already deal with all the positioning in the life update,
|
||||
* so all we need to do here is change the color of the handler */
|
||||
activeDraggedHandler->setBrush(QBrush(Qt::white));
|
||||
activeDraggedHandler = 0;
|
||||
drawProfile();
|
||||
}
|
||||
}
|
||||
|
||||
DiveHandler::DiveHandler() : QGraphicsEllipseItem()
|
||||
{
|
||||
setRect(-5, -5, 10, 10);
|
||||
|
|
|
@ -160,8 +160,6 @@ protected:
|
|||
virtual void showEvent(QShowEvent *event);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
qreal fromPercent(qreal percent, Qt::Orientation orientation);
|
||||
public
|
||||
slots:
|
||||
|
|
Loading…
Add table
Reference in a new issue