#include <TrajectoryItem.h>
Public Member Functions | |
virtual void | adjustDataToAnimationTemporalExtent () |
Adjust data for a given time animation period. 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 | drawIcon (QPainter *painter) |
draw tracktrajectory icon. 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... | |
TrajectoryItem (const QString &title, const QString &id, te::qt::widgets::MapDisplay *display, const QString &file, const QSize &size) | |
Constructor It constructs a Trajectory Icon Item. More... | |
void | transformToDisplayProjection (QVector< QPointF > &vec) |
It transform coodinates to map display projection coodinates. More... | |
virtual | ~TrajectoryItem () |
Destructor It destructs a Trajectory Icon Item. More... | |
Public Attributes | |
Animation * | m_animation |
The animation this item. More... | |
QVector< QPointF > | m_animationRoute |
It contains only the portions to be animated. More... | |
QVector< te::dt::TimeInstant > | m_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::MapDisplay * | m_display |
Indicates where the icon item is displayed. More... | |
bool | m_doIconRotate |
do automatic icon rotate 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... | |
QString | m_layerId |
trajectory layer Id 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.002 and 0.5 More... | |
QPointF | m_pos |
The icon position. More... | |
QPointF | m_posOld |
Auxiliar point. More... | |
te::gm::LineString * | m_route |
The input path in world coordenates. More... | |
int | m_SRID |
The input route srid. More... | |
QVector< te::dt::TimeInstant > | m_time |
The input time. More... | |
QString | m_title |
The icon item title. More... | |
Properties | |
QPointF | pos |
Definition at line 57 of file TrajectoryItem.h.
te::qt::widgets::TrajectoryItem::TrajectoryItem | ( | const QString & | title, |
const QString & | id, | ||
te::qt::widgets::MapDisplay * | display, | ||
const QString & | file, | ||
const QSize & | size | ||
) |
Constructor It constructs a Trajectory Icon Item.
title | The icon item title. |
id | The trajectory layer id. |
display | Where the icon item is displayed. |
file | The icon file. |
size | icon size. |
Definition at line 16 of file TrajectoryItem.cpp.
References m_iconSize.
|
virtual |
Destructor It destructs a Trajectory Icon Item.
Definition at line 59 of file TrajectoryItem.cpp.
|
virtualinherited |
Adjust data for a given time animation period.
Reimplemented in te::qt::widgets::ImageItem.
Definition at line 72 of file AnimationItem.cpp.
References TE_UNKNOWN_SRS.
Referenced by te::qt::widgets::Animation::adjustDataToAnimationTemporalExtent(), and te::qt::widgets::ImageItem::adjustDataToAnimationTemporalExtent().
|
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 286 of file TrajectoryItem.cpp.
References te::qt::widgets::Canvas::calcAspectRatio(), te::qt::widgets::Canvas::getMatrix(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::qt::widgets::AnimationScene::m_mutex, te::qt::widgets::AnimationScene::m_trajectoryPixmap, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, and te::qt::widgets::Canvas::setWindow().
|
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 168 of file TrajectoryItem.cpp.
References te::qt::widgets::AnimationScene::m_mutex, and te::qt::widgets::AnimationScene::m_trajectoryPixmap.
void te::qt::widgets::TrajectoryItem::drawIcon | ( | QPainter * | painter | ) |
draw tracktrajectory icon.
painter Painter.
Definition at line 359 of file TrajectoryItem.cpp.
References PI.
Referenced by te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent().
|
virtual |
erase a piece of tracktrajectory trail.
curTime The trajectory current time.
Implements te::qt::widgets::AnimationItem.
Definition at line 229 of file TrajectoryItem.cpp.
References te::qt::widgets::AnimationScene::m_mutex, and te::qt::widgets::AnimationScene::m_trajectoryPixmap.
|
inherited |
Gets the Animation Item direction.
Definition at line 67 of file AnimationItem.cpp.
|
inherited |
Gets the Animation Item duration.
Definition at line 62 of file AnimationItem.cpp.
|
inherited |
It returns the Animation Item position in device coordinate.
Definition at line 33 of file AnimationItem.cpp.
References TE_UNKNOWN_SRS, and te::gm::AbstractPoint::transform().
|
virtual |
Paint a piece of trajectory trail.
Implements te::qt::widgets::AnimationItem.
Definition at line 63 of file TrajectoryItem.cpp.
References te::gm::Envelope::getHeight(), te::gm::Envelope::getLowerLeftX(), te::gm::Envelope::getLowerLeftY(), te::gm::Envelope::getWidth(), te::gm::Envelope::m_llx, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, and te::gm::Envelope::m_ury.
|
inherited |
Sets the Animation Item direction.
direction | The Animation Item direction. |
Definition at line 56 of file AnimationItem.cpp.
Referenced by te::qt::widgets::TimeSliderWidget::setDirection().
|
inherited |
Sets the Animation Item duration.
duration | The Animation Item duration. |
Definition at line 46 of file AnimationItem.cpp.
Referenced by te::qt::widgets::TimeSliderWidget::setDirection(), and te::qt::widgets::AnimationScene::setDuration().
void te::qt::widgets::TrajectoryItem::transformToDisplayProjection | ( | QVector< QPointF > & | vec | ) |
It transform coodinates to map display projection coodinates.
vec | Coordinates in native projection. |
Definition at line 152 of file TrajectoryItem.cpp.
References te::gm::LineString::getPointN(), te::gm::Point::getX(), te::gm::Point::getY(), te::gm::LineStringType, te::gm::LineString::setPoint(), TE_UNKNOWN_SRS, and te::gm::LineString::transform().
|
inherited |
The animation this item.
Definition at line 157 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::addTemporalImages(), te::qt::widgets::Animation::Animation(), te::qt::widgets::TimeSliderWidget::calculateAllSpatialExtent(), te::qt::widgets::TimeSliderWidget::calculateAllTemporalExtent(), te::qt::widgets::TimeSliderWidget::createAnimations(), te::qt::widgets::TimeSliderWidget::dropAction(), and te::qt::widgets::TimeSliderWidget::removeAnimation().
|
inherited |
It contains only the portions to be animated.
Definition at line 150 of file AnimationItem.h.
Referenced by te::qt::widgets::Animation::setDataKeyValues().
|
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().
|
inherited |
True if automatic pan over this item.
Definition at line 152 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::onAutoPanCheckBoxClicked().
QColor te::qt::widgets::TrajectoryItem::m_backwardColor |
The backward trail color.
Definition at line 127 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::eventFilter().
|
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().
|
inherited |
The direction.
Definition at line 159 of file AnimationItem.h.
|
inherited |
Indicates where the icon item is displayed.
Definition at line 144 of file AnimationItem.h.
bool te::qt::widgets::TrajectoryItem::m_doIconRotate |
do automatic icon rotate
Definition at line 124 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::onIconRotateCheckBoxClicked().
bool te::qt::widgets::TrajectoryItem::m_drawTrail |
flag to draw trail
Definition at line 125 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::onDrawTrailCheckBoxClicked().
|
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 129 of file TrajectoryItem.h.
QColor te::qt::widgets::TrajectoryItem::m_forwardColor |
The forward trail color.
Definition at line 126 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::eventFilter().
QString te::qt::widgets::TrajectoryItem::m_iconFile |
file that generated the pixmap
Definition at line 122 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::eventFilter(), and te::qt::widgets::TimeSliderWidget::onTrajectoryPixmapSizeChanged().
QSize te::qt::widgets::TrajectoryItem::m_iconSize |
icon size
Definition at line 123 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::eventFilter(), te::qt::widgets::TimeSliderWidget::onTrajectoryPixmapSizeChanged(), and TrajectoryItem().
QString te::qt::widgets::TrajectoryItem::m_layerId |
trajectory layer Id
Definition at line 131 of file TrajectoryItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::eventFilter(), te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated(), te::qt::widgets::TimeSliderWidget::onAutoPanCheckBoxClicked(), te::qt::widgets::TimeSliderWidget::onBackPushButtonClicked(), te::qt::widgets::TimeSliderWidget::onDrawTrailCheckBoxClicked(), te::qt::widgets::TimeSliderWidget::onFrontPushButtonClicked(), te::qt::widgets::TimeSliderWidget::onIconRotateCheckBoxClicked(), te::qt::widgets::TimeSliderWidget::onOpacityValueChanged(), te::qt::widgets::TimeSliderWidget::onTrajectoryPixmapSizeChanged(), te::qt::widgets::TimeSliderWidget::removeAnimation(), and te::qt::widgets::TimeSliderWidget::trajectoryAlreadyExists().
int te::qt::widgets::TrajectoryItem::m_lineWidth |
The route/trail line width in pixels.
Definition at line 128 of file TrajectoryItem.h.
|
inherited |
The display transformation matrix.
Definition at line 151 of file AnimationItem.h.
Referenced by te::qt::widgets::AnimationView::setMatrix().
|
inherited |
Normalized final time (between 0 and 1).
Definition at line 156 of file AnimationItem.h.
Referenced by te::qt::widgets::Animation::setDataKeyValues().
|
inherited |
Normalized initial time (between 0 and 1).
Definition at line 155 of file AnimationItem.h.
Referenced by te::qt::widgets::Animation::setDataKeyValues().
|
inherited |
Opacity.
Definition at line 160 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated(), and te::qt::widgets::TimeSliderWidget::onOpacityValueChanged().
|
inherited |
the range is between 0.002 and 0.5
Definition at line 153 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::onPanFactorValueChanged().
|
inherited |
The icon position.
Definition at line 146 of file AnimationItem.h.
QPointF te::qt::widgets::TrajectoryItem::m_posOld |
Auxiliar point.
Definition at line 130 of file TrajectoryItem.h.
|
inherited |
The input path in world coordenates.
Definition at line 149 of file AnimationItem.h.
|
inherited |
The input route srid.
Definition at line 145 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::calculateAllSpatialExtent(), and te::qt::widgets::TimeSliderWidget::TimeSliderWidget().
|
inherited |
The input time.
Definition at line 147 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated().
|
inherited |
The icon item title.
Definition at line 143 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::coverageAlreadyExists(), and te::qt::widgets::TimeSliderWidget::trajectoryAlreadyExists().
|
readwriteinherited |
Definition at line 65 of file AnimationItem.h.