/** ** ** @RDE_HEADER@ ** Implementation of base class for 3d rubberbands ** $Id$ ** $HeadURL$ ** $Author$ ** ** ----------------------------------------------------------------------------------------------- ** ** Hardware-Environment: Intel-PC ** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5 ** ** Language ........: C++ 11 ** ** ----------------------------------------------------------------------------------------------- ** ** Author ...........: Jörg Turla, SPD G, Tel. 3132 ** ** ----------------------------------------------------------------------------------------------- ** ** Notes .........: ** ** 27.03.2015, JT : First edition for use with Qt5 ** ** ----------------------------------------------------------------------------------------------- */ #include "rubberband_3d.h" #include #include namespace SituationMap { namespace RB { Rubberband3D::Rubberband3D( SituationMap::Map * map, QObject * parent, bool isActive ) : RubberbandBase(map,parent,isActive), _markerPixmap(nullptr), _markerSelectionPixmap(nullptr) { } // Rubberband3D::Rubberband3D( SituationMap::Map * map, QObject * parent, bool isActive ) Rubberband3D::~Rubberband3D() { delete _markerPixmap; delete _markerSelectionPixmap; } // Rubberband3D::~Rubberband3D() void Rubberband3D::resetAction( AbstractEventDispatcher*,int,int ) {;} bool Rubberband3D::selectAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::multiSelectActionPress ( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::multiSelectActionRelease( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::setCoordinateAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::moveAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::movePickedAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::contextMenuAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::completeStateAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::deleteAction( AbstractEventDispatcher*,int,int ) { return false; } bool Rubberband3D::undoAction( AbstractEventDispatcher*,int,int ) { return false; } QRectF Rubberband3D::sceneBbox() const { return QRectF(); } #include "sphere_pattern.xpm" QImage Rubberband3D::markerSelectionImage() { if (nullptr == _markerSelectionPixmap) { _markerSelectionPixmap = new QPixmap( sphere_pattern_xpm ); QPainter painter(_markerSelectionPixmap); QBrush brush; brush.setStyle(Qt::BrushStyle::SolidPattern); brush.setColor(_handleSelectionColor); painter.setCompositionMode(QPainter::CompositionMode::CompositionMode_Multiply); painter.setPen(_handleDrawColor); painter.setBrush(brush); painter.drawEllipse( 0, 0, _markerSelectionPixmap->width(), _markerSelectionPixmap->height() ); } return _markerSelectionPixmap->toImage(); } // QImage Rubberband3D::markerSelectionImage() QImage Rubberband3D::markerImage() { if (nullptr == _markerPixmap) { _markerPixmap = new QPixmap( sphere_pattern_xpm ); QPainter painter(_markerPixmap); QBrush brush; brush.setStyle(Qt::BrushStyle::SolidPattern); brush.setColor(_handleFillColor); painter.setCompositionMode(QPainter::CompositionMode::CompositionMode_Multiply); painter.setPen(_handleDrawColor); painter.setBrush(brush); painter.drawEllipse( 0, 0, _markerPixmap->width(), _markerPixmap->height() ); } return _markerPixmap->toImage(); } // QImage Rubberband3D::markerImage() } } /* namespace SituationMap::RB */