All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::qt::widgets::TrajectoryItem Class Reference

This class is a dialog for the Trajectory Icon Item. More...

#include <TrajectoryItem.h>

Inheritance diagram for te::qt::widgets::TrajectoryItem:
te::qt::widgets::AnimationItem

Public Member Functions

void createAnimationDataInDisplayProjection ()
 Create route points making reprojection if necessary. More...
 
void draw ()
 Draw the trajectory long trail. It draws the beginning until the current time. The beginning depends on the direction (forward or backward). More...
 
void drawForward (const unsigned int &curTime)
 Draw a piece of tracktrajectory trail. It draws from the previous time to the current time. More...
 
void erase (const unsigned int &curTime)
 erase a piece of tracktrajectory trail. More...
 
QAbstractAnimation::Direction getDirection ()
 Gets the Animation Item direction. More...
 
unsigned int getDuration ()
 Gets the Animation Item duration. More...
 
QPoint getPosInDeviceCoordinate ()
 It returns the Animation Item position in device coordinate. More...
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 Paint a piece of trajectory trail. More...
 
void setDirection (const QAbstractAnimation::Direction &direction)
 Sets the Animation Item direction. More...
 
void setDuration (const unsigned int &duration)
 Sets the Animation Item duration. More...
 
void setMatrix ()
 It sets the internal matrix. More...
 
 TrajectoryItem (const QString &title, te::qt::widgets::MapDisplay *display, const QString &file, const QSize &size)
 Constructor It constructs a Trajectory Icon Item. More...
 
virtual ~TrajectoryItem ()
 Destructor It destructs a Trajectory Icon Item. More...
 

Public Attributes

Animationm_animation
 The animation this item. More...
 
QVector< QPointF > m_animationRoute
 The path coordenates in map display projection. It contains only the portions to be animated. More...
 
QVector< te::dt::TimeInstantm_animationTime
 The animation time. It contains only the portions to be animated. More...
 
bool m_automaticPan
 True if automatic pan over this item. More...
 
QColor m_backwardColor
 The backward trail color. More...
 
unsigned int m_curTimeDuration
 Current time (ms). Its value is between 0 and the total duration. More...
 
QAbstractAnimation::Direction m_direction
 The direction. More...
 
te::qt::widgets::MapDisplaym_display
 Indicates where the icon item is displayed. More...
 
bool m_drawTrail
 flag to draw trail More...
 
unsigned int m_duration
 The duration this item. More...
 
bool m_erasePerfectly
 flag to erase trajectory piece perfectly (default = false). More...
 
QColor m_forwardColor
 The forward trail color. More...
 
QString m_iconFile
 file that generated the pixmap More...
 
QSize m_iconSize
 icon size More...
 
int m_lineWidth
 The route/trail line width in pixels. More...
 
QMatrix m_matrix
 The display transformation matrix. More...
 
double m_norFinalTime
 Normalized final time (between 0 and 1). More...
 
double m_norInitialTime
 Normalized initial time (between 0 and 1). More...
 
int m_opacity
 Opacity. More...
 
double m_panFactor
 the range is between 0.05 and 0.5 More...
 
QPointF m_pos
 The icon position. More...
 
QPointF m_posOld
 Auxiliar point. More...
 
te::gm::LineStringm_route
 The input path in world coordenates. More...
 
int m_SRID
 The input route srid. More...
 
QVector< te::dt::TimeInstantm_time
 The input time. More...
 
QString m_title
 The icon item title. More...
 

Properties

QPointF pos
 

Detailed Description

This class is a dialog for the Trajectory Icon Item.

Definition at line 58 of file TrajectoryItem.h.

Constructor & Destructor Documentation

te::qt::widgets::TrajectoryItem::TrajectoryItem ( const QString &  title,
te::qt::widgets::MapDisplay display,
const QString &  file,
const QSize &  size 
)

Constructor It constructs a Trajectory Icon Item.

Parameters
titleThe icon item title.
displayWhere the icon item is displayed.
fileThe icon file.
sizeicon size.

Definition at line 16 of file TrajectoryItem.cpp.

References m_iconSize, and te::qt::widgets::AnimationItem::setMatrix().

te::qt::widgets::TrajectoryItem::~TrajectoryItem ( )
virtual

Destructor It destructs a Trajectory Icon Item.

Definition at line 58 of file TrajectoryItem.cpp.

Member Function Documentation

void te::qt::widgets::TrajectoryItem::createAnimationDataInDisplayProjection ( )
virtual

Create route points making reprojection if necessary.

Reimplemented from te::qt::widgets::AnimationItem.

Definition at line 62 of file TrajectoryItem.cpp.

References te::qt::widgets::AnimationItem::createAnimationDataInDisplayProjection().

void te::qt::widgets::TrajectoryItem::draw ( )
virtual

Draw the trajectory long trail. It draws the beginning until the current time. The beginning depends on the direction (forward or backward).

Implements te::qt::widgets::AnimationItem.

Definition at line 268 of file TrajectoryItem.cpp.

References te::qt::widgets::AnimationScene::m_mutex, and te::qt::widgets::AnimationScene::m_trajectoryPixmap.

void te::qt::widgets::TrajectoryItem::drawForward ( const unsigned int &  curTime)
virtual

Draw a piece of tracktrajectory trail. It draws from the previous time to the current time.

curTime The trajectory current time.

Implements te::qt::widgets::AnimationItem.

Definition at line 156 of file TrajectoryItem.cpp.

References te::qt::widgets::AnimationScene::m_mutex, and te::qt::widgets::AnimationScene::m_trajectoryPixmap.

void te::qt::widgets::TrajectoryItem::erase ( const unsigned int &  curTime)
virtual

erase a piece of tracktrajectory trail.

curTime The trajectory current time.

Implements te::qt::widgets::AnimationItem.

Definition at line 214 of file TrajectoryItem.cpp.

References te::qt::widgets::AnimationScene::m_mutex, and te::qt::widgets::AnimationScene::m_trajectoryPixmap.

QAbstractAnimation::Direction te::qt::widgets::AnimationItem::getDirection ( )
inherited

Gets the Animation Item direction.

Returns
The Animation Item direction.

Definition at line 70 of file AnimationItem.cpp.

unsigned int te::qt::widgets::AnimationItem::getDuration ( )
inherited

Gets the Animation Item duration.

Returns
The Animation Item duration.

Definition at line 65 of file AnimationItem.cpp.

QPoint te::qt::widgets::AnimationItem::getPosInDeviceCoordinate ( )
inherited

It returns the Animation Item position in device coordinate.

Returns
Position in device coordinate.

Definition at line 44 of file AnimationItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent().

void te::qt::widgets::TrajectoryItem::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
virtual
void te::qt::widgets::AnimationItem::setDirection ( const QAbstractAnimation::Direction &  direction)
inherited

Sets the Animation Item direction.

Parameters
directionThe Animation Item direction.

Definition at line 59 of file AnimationItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::setDirection().

void te::qt::widgets::AnimationItem::setDuration ( const unsigned int &  duration)
inherited

Sets the Animation Item duration.

Parameters
durationThe Animation Item duration.

Definition at line 49 of file AnimationItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::setDirection(), and te::qt::widgets::AnimationScene::setDuration().

Member Data Documentation

QVector<QPointF> te::qt::widgets::AnimationItem::m_animationRoute
inherited

The path coordenates in map display projection. It contains only the portions to be animated.

Definition at line 150 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

QVector<te::dt::TimeInstant> te::qt::widgets::AnimationItem::m_animationTime
inherited

The animation time. It contains only the portions to be animated.

Definition at line 148 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::getAnimationDataIndex(), te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent(), and te::qt::widgets::Animation::setDataKeyValues().

bool te::qt::widgets::AnimationItem::m_automaticPan
inherited

True if automatic pan over this item.

Definition at line 152 of file AnimationItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::adjustTrajectoryGroupBox(), and te::qt::widgets::AnimationScene::setAutomaticPan().

QColor te::qt::widgets::TrajectoryItem::m_backwardColor
unsigned int te::qt::widgets::AnimationItem::m_curTimeDuration
inherited

Current time (ms). Its value is between 0 and the total duration.

Definition at line 154 of file AnimationItem.h.

Referenced by te::qt::widgets::AnimationScene::draw().

QAbstractAnimation::Direction te::qt::widgets::AnimationItem::m_direction
inherited

The direction.

Definition at line 159 of file AnimationItem.h.

te::qt::widgets::MapDisplay* te::qt::widgets::AnimationItem::m_display
inherited

Indicates where the icon item is displayed.

Definition at line 144 of file AnimationItem.h.

bool te::qt::widgets::TrajectoryItem::m_drawTrail
unsigned int te::qt::widgets::AnimationItem::m_duration
inherited

The duration this item.

Definition at line 158 of file AnimationItem.h.

bool te::qt::widgets::TrajectoryItem::m_erasePerfectly

flag to erase trajectory piece perfectly (default = false).

Definition at line 120 of file TrajectoryItem.h.

QColor te::qt::widgets::TrajectoryItem::m_forwardColor
QString te::qt::widgets::TrajectoryItem::m_iconFile
int te::qt::widgets::TrajectoryItem::m_lineWidth

The route/trail line width in pixels.

Definition at line 119 of file TrajectoryItem.h.

QMatrix te::qt::widgets::AnimationItem::m_matrix
inherited

The display transformation matrix.

Definition at line 151 of file AnimationItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::drawPixmapItem().

double te::qt::widgets::AnimationItem::m_norFinalTime
inherited

Normalized final time (between 0 and 1).

Definition at line 156 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

double te::qt::widgets::AnimationItem::m_norInitialTime
inherited

Normalized initial time (between 0 and 1).

Definition at line 155 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

double te::qt::widgets::AnimationItem::m_panFactor
inherited
QPointF te::qt::widgets::AnimationItem::m_pos
inherited

The icon position.

Definition at line 146 of file AnimationItem.h.

QPointF te::qt::widgets::TrajectoryItem::m_posOld

Auxiliar point.

Definition at line 121 of file TrajectoryItem.h.

Property Documentation

QPointF te::qt::widgets::AnimationItem::pos
readwriteinherited

Definition at line 60 of file AnimationItem.h.


The documentation for this class was generated from the following files: