An abstract class for Animation Item. More...
#include <AnimationItem.h>
Public Member Functions | |
virtual void | adjustDataToAnimationTemporalExtent () |
Adjust data for a given time animation period. More... | |
AnimationItem (const QString &title, te::qt::widgets::MapDisplay *display) | |
Constructor It constructs a Animation Item. More... | |
virtual void | draw ()=0 |
If draw item. More... | |
virtual void | drawForward (const unsigned int &curTime)=0 |
It draws a piece of tracktrajectory trail or draws the current pixmap item. More... | |
virtual void | erase (const unsigned int &curTime)=0 |
It erases a piece of tracktrajectory trail or draws the current pixmap item. 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... | |
virtual void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)=0 |
Paint a Animation Item. 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... | |
virtual | ~AnimationItem () |
Destructor It destructs a Animation 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... | |
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... | |
unsigned int | m_duration |
The duration this item. 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... | |
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 |
An abstract class for Animation Item.
It is the base class that stores data of time and route.
Definition at line 62 of file AnimationItem.h.
te::qt::widgets::AnimationItem::AnimationItem | ( | const QString & | title, |
te::qt::widgets::MapDisplay * | display | ||
) |
Constructor It constructs a Animation Item.
Definition at line 13 of file AnimationItem.cpp.
|
virtual |
Destructor It destructs a Animation Item.
Definition at line 28 of file AnimationItem.cpp.
|
virtual |
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().
|
pure virtual |
If draw item.
Implemented in te::qt::widgets::ImageItem, and te::qt::widgets::TrajectoryItem.
Referenced by te::qt::widgets::AnimationScene::draw().
|
pure virtual |
It draws a piece of tracktrajectory trail or draws the current pixmap item.
curTime The Animation Item current time.
Implemented in te::qt::widgets::ImageItem, and te::qt::widgets::TrajectoryItem.
|
pure virtual |
It erases a piece of tracktrajectory trail or draws the current pixmap item.
curTime The Animation Item current time.
Implemented in te::qt::widgets::ImageItem, and te::qt::widgets::TrajectoryItem.
QAbstractAnimation::Direction te::qt::widgets::AnimationItem::getDirection | ( | ) |
Gets the Animation Item direction.
Definition at line 67 of file AnimationItem.cpp.
unsigned int te::qt::widgets::AnimationItem::getDuration | ( | ) |
Gets the Animation Item duration.
Definition at line 62 of file AnimationItem.cpp.
QPoint te::qt::widgets::AnimationItem::getPosInDeviceCoordinate | ( | ) |
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().
|
pure virtual |
Paint a Animation Item.
Implemented in te::qt::widgets::ImageItem, and te::qt::widgets::TrajectoryItem.
void te::qt::widgets::AnimationItem::setDirection | ( | const QAbstractAnimation::Direction & | direction | ) |
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().
void te::qt::widgets::AnimationItem::setDuration | ( | const unsigned int & | duration | ) |
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().
Animation* te::qt::widgets::AnimationItem::m_animation |
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().
QVector<QPointF> te::qt::widgets::AnimationItem::m_animationRoute |
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 |
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 |
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().
unsigned int te::qt::widgets::AnimationItem::m_curTimeDuration |
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 |
The direction.
Definition at line 159 of file AnimationItem.h.
te::qt::widgets::MapDisplay* te::qt::widgets::AnimationItem::m_display |
Indicates where the icon item is displayed.
Definition at line 144 of file AnimationItem.h.
unsigned int te::qt::widgets::AnimationItem::m_duration |
The duration this item.
Definition at line 158 of file AnimationItem.h.
QMatrix te::qt::widgets::AnimationItem::m_matrix |
The display transformation matrix.
Definition at line 151 of file AnimationItem.h.
Referenced by te::qt::widgets::AnimationView::setMatrix().
double te::qt::widgets::AnimationItem::m_norFinalTime |
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 |
Normalized initial time (between 0 and 1).
Definition at line 155 of file AnimationItem.h.
Referenced by te::qt::widgets::Animation::setDataKeyValues().
int te::qt::widgets::AnimationItem::m_opacity |
Opacity.
Definition at line 160 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated(), and te::qt::widgets::TimeSliderWidget::onOpacityValueChanged().
double te::qt::widgets::AnimationItem::m_panFactor |
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().
QPointF te::qt::widgets::AnimationItem::m_pos |
The icon position.
Definition at line 146 of file AnimationItem.h.
te::gm::LineString* te::qt::widgets::AnimationItem::m_route |
The input path in world coordenates.
Definition at line 149 of file AnimationItem.h.
int te::qt::widgets::AnimationItem::m_SRID |
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().
QVector<te::dt::TimeInstant> te::qt::widgets::AnimationItem::m_time |
The input time.
Definition at line 147 of file AnimationItem.h.
Referenced by te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated().
QString te::qt::widgets::AnimationItem::m_title |
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().
|
readwrite |
Definition at line 65 of file AnimationItem.h.