119 lines
3.4 KiB
Objective-C
Executable File
119 lines
3.4 KiB
Objective-C
Executable File
/**
|
|
**
|
|
** @RDE_HEADER@
|
|
** Definition of internal data of base class for rubberbands
|
|
** $Id$
|
|
** $HeadURL$
|
|
** $Author$
|
|
**
|
|
** -----------------------------------------------------------------------------------------------
|
|
**
|
|
** Hardware-Environment: Intel-PC
|
|
** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5
|
|
**
|
|
** Language ........: C++ 11
|
|
**
|
|
** -----------------------------------------------------------------------------------------------
|
|
**
|
|
** Author ...........: Joerg Turla, SPD G, Tel. 3132
|
|
**
|
|
** -----------------------------------------------------------------------------------------------
|
|
**
|
|
** Notes .........:
|
|
**
|
|
** 16.06.2015, JT : First edition for use with Qt5
|
|
**
|
|
** -----------------------------------------------------------------------------------------------
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <QtCore/QList>
|
|
#include <QtCore/QPointer>
|
|
|
|
#include <Common/ref_pointer.h>
|
|
#include <Common/situation_map_logging.h>
|
|
|
|
#include "rubberband_base.h"
|
|
|
|
|
|
|
|
class QHBoxLayout;
|
|
class QWidget;
|
|
class QPushButton;
|
|
class QGraphicsScene;
|
|
class QGraphicsView;
|
|
|
|
|
|
namespace Esri {
|
|
namespace ArcGISRuntime {
|
|
class MapGraphicsView;
|
|
} }
|
|
|
|
|
|
namespace SituationMap
|
|
{
|
|
class Map;
|
|
}
|
|
|
|
namespace SituationMap { namespace RB
|
|
{
|
|
|
|
class RubberbandHandleProxy;
|
|
|
|
/**
|
|
@class Rubberband::BaseInternalData rubberband_base_internal.h
|
|
@brief Definition of internal data of rubberband base class.
|
|
*/
|
|
class RubberbandBase::BaseInternalData
|
|
{
|
|
public:
|
|
|
|
static QPixmap * _applyIcon;
|
|
static QPixmap * _abortIcon;
|
|
static QPixmap * _undoIcon;
|
|
|
|
QPointer<SituationMap::Map> _map;
|
|
|
|
SituationMap::CoordTranslationFunctor * _mapCtFunctor;
|
|
|
|
bool _isActive;
|
|
|
|
bool _applyIsPossible;
|
|
bool _undoIsPossible;
|
|
bool _hasUndoButton;
|
|
|
|
QPointF _lastClickPosition;
|
|
|
|
QPointF _buttonBoxSceneAnchor;
|
|
QPoint _buttonBoxFixPosition;
|
|
SituationMap::RefPointer<RubberbandHandleProxy> _buttonProxy;
|
|
QPointer<QWidget> _buttonBox;
|
|
QHBoxLayout * _buttonLayout;
|
|
QPushButton * _undoButton;
|
|
QPushButton * _cancelButton;
|
|
QPushButton * _applyButton;
|
|
|
|
QCursor _restoreCursor; // workaround Qt bug. remove when fixed
|
|
|
|
QVector<std::function<bool(RubberbandBase*)>> _updateFunctorList;
|
|
|
|
LOGGER_T _logger;
|
|
|
|
explicit BaseInternalData( SituationMap::Map * map, RubberbandBase * me );
|
|
|
|
virtual ~BaseInternalData();
|
|
|
|
bool buttonProxyActive( const QPointF & pos ) const;
|
|
|
|
void enableAndShowOnlyPossibleButtons();
|
|
|
|
BaseInternalData( const BaseInternalData & ) = delete;
|
|
BaseInternalData & operator = ( const BaseInternalData & ) = delete;
|
|
|
|
}; /* BaseInternalData */
|
|
|
|
|
|
} } /* namespace SituationMap::RB */
|