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

#include <PixmapItem.h>

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

Public Member Functions

void calculateCurrentFile (const unsigned int &curTime)
 Calculate current file. More...
 
void createAnimationDataInDisplayProjection ()
 Create images making reprojection if necessary. More...
 
void draw ()
 Draw the current pixmap item. More...
 
void drawForward (const unsigned int &curTime)
 Draw current pixmap item. curTime The animation current time. More...
 
void erase (const unsigned int &curTime)
 Draw current pixmap item. curTime The animation current time. 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...
 
QRect getRect ()
 It gets image rect in device coordinate. More...
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 Paint a pixmap item. More...
 
 PixmapItem ()
 Empty Constructor. More...
 
 PixmapItem (const QString &title, const QString &file, te::qt::widgets::MapDisplay *display)
 Constructor It constructs a Pixmap 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...
 
void setImagePosition (const QPointF &p, const QRectF &dr)
 
void setLUT (const std::vector< std::pair< int, QColor > > &tab)
 Sets the LUT. tab The LUT information. More...
 
void setMatrix ()
 It sets the internal matrix. More...
 
virtual ~PixmapItem ()
 Destructor It destructs a Pixmap Item. More...
 

Public Attributes

Animationm_animation
 The animation this item. More...
 
QVector< QString > m_animationFiles
 The png files in display projection. It contains only the portions to be animated. 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...
 
QString m_baseFile
 Base file name. More...
 
QString m_currentImageFile
 Image to be displayed on paint event animation. More...
 
unsigned int m_curTimeDuration
 Current time (ms). Its value is between 0 and the total duration. More...
 
QDir m_dir
 The image data directory. More...
 
QAbstractAnimation::Direction m_direction
 The direction. More...
 
te::qt::widgets::MapDisplaym_display
 Indicates where the icon item is displayed. More...
 
unsigned int m_duration
 The duration this item. More...
 
QVector< QString > m_files
 The input files. More...
 
QPointF m_imageCenterPos
 Center of the image. More...
 
QRectF m_imaRect
 Image location. More...
 
std::map< uchar, QColor > m_lut
 LUT. More...
 
QMatrix m_matrix
 The display transformation matrix. More...
 
size_t m_ncols
 number of colunms. More...
 
size_t m_nlines
 number of lines. 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...
 
te::gm::LineStringm_route
 The input path in world coordenates. More...
 
int m_SRID
 The input route srid. More...
 
QString m_suffix
 File suffix. More...
 
QVector< te::dt::TimeInstantm_time
 The input time. More...
 
QString m_title
 The icon item title. More...
 
float m_undef
 undef value. More...
 

Properties

QPointF pos
 

Detailed Description

Definition at line 61 of file PixmapItem.h.

Constructor & Destructor Documentation

te::qt::widgets::PixmapItem::PixmapItem ( )

Empty Constructor.

Definition at line 13 of file PixmapItem.cpp.

te::qt::widgets::PixmapItem::PixmapItem ( const QString &  title,
const QString &  file,
te::qt::widgets::MapDisplay display 
)

Constructor It constructs a Pixmap Item.

Parameters
titleThe pixmap item title.
fileThe absolute file path name.
displayWhere the pixmap item is displayed.

Definition at line 18 of file PixmapItem.cpp.

References m_baseFile, m_dir, m_lut, m_suffix, and te::qt::widgets::AnimationItem::setMatrix().

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

Destructor It destructs a Pixmap Item.

Definition at line 36 of file PixmapItem.cpp.

Member Function Documentation

void te::qt::widgets::PixmapItem::calculateCurrentFile ( const unsigned int &  curTime)

Calculate current file.

Parameters
curTimecurrent time

Definition at line 127 of file PixmapItem.cpp.

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

Create images making reprojection if necessary.

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

Definition at line 55 of file PixmapItem.cpp.

References te::qt::widgets::AnimationItem::createAnimationDataInDisplayProjection(), and te::gm::Envelope::transform().

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

Draw the current pixmap item.

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

Definition at line 121 of file PixmapItem.cpp.

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

Draw current pixmap item. curTime The animation current time.

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

Definition at line 108 of file PixmapItem.cpp.

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

Draw current pixmap item. curTime The animation current time.

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

Definition at line 116 of file PixmapItem.cpp.

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().

QRect te::qt::widgets::PixmapItem::getRect ( )

It gets image rect in device coordinate.

Definition at line 136 of file PixmapItem.cpp.

void te::qt::widgets::PixmapItem::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
virtual

Paint a pixmap item.

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

Definition at line 99 of file PixmapItem.cpp.

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().

void te::qt::widgets::PixmapItem::setImagePosition ( const QPointF &  p,
const QRectF &  dr 
)
void te::qt::widgets::PixmapItem::setLUT ( const std::vector< std::pair< int, QColor > > &  tab)

Sets the LUT. tab The LUT information.

Definition at line 142 of file PixmapItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::setEtaLUT(), and te::qt::widgets::TimeSliderWidget::setHidroLUT().

Member Data Documentation

QVector<QString> te::qt::widgets::PixmapItem::m_animationFiles

The png files in display projection. It contains only the portions to be animated.

Definition at line 141 of file PixmapItem.h.

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().

QString te::qt::widgets::PixmapItem::m_baseFile

Base file name.

Definition at line 143 of file PixmapItem.h.

Referenced by PixmapItem().

QString te::qt::widgets::PixmapItem::m_currentImageFile

Image to be displayed on paint event animation.

Definition at line 142 of file PixmapItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::drawPixmapItem(), and te::qt::widgets::TimeSliderWidget::getImage().

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().

QDir te::qt::widgets::PixmapItem::m_dir

The image data directory.

Definition at line 136 of file PixmapItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::getImage(), and PixmapItem().

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.

unsigned int te::qt::widgets::AnimationItem::m_duration
inherited

The duration this item.

Definition at line 158 of file AnimationItem.h.

QPointF te::qt::widgets::PixmapItem::m_imageCenterPos

Center of the image.

Definition at line 147 of file PixmapItem.h.

std::map<uchar, QColor> te::qt::widgets::PixmapItem::m_lut

LUT.

Definition at line 146 of file PixmapItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::getImage(), and PixmapItem().

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().

size_t te::qt::widgets::PixmapItem::m_ncols
size_t te::qt::widgets::PixmapItem::m_nlines
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.

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: