te::qt::widgets::QtKnowItem Class Reference

#include <QtKnowItem.h>

Inheritance diagram for te::qt::widgets::QtKnowItem:
te::qt::widgets::ImageItem te::qt::widgets::AnimationItem QObject QGraphicsPixmapItem

Public Member Functions

void adjustDataToAnimationTemporalExtent ()
 Adjust data for a given time animation period. More...
 
void calculateCurrentFile (const unsigned int &curTime)
 Calculate current file. More...
 
void draw ()
 Draw the current image item. More...
 
virtual void drawCurrentImage (QPainter *p)
 Get current image. More...
 
void drawForward (const unsigned int &curTime)
 Draw current image item. curTime The animation current time. More...
 
void erase (const unsigned int &curTime)
 Draw current image item. curTime The animation current time. More...
 
void generateRoute ()
 It generate the raster route. More...
 
virtual bool getCtlParameters ()
 Get control parameters. 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...
 
virtual void loadCurrentImage ()
 Get current image. More...
 
virtual bool loadData ()
 Load temporal raster data. More...
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 Paint a image item. More...
 
 QtKnowItem ()
 Empty Constructor. More...
 
 QtKnowItem (const QString &title, const QString &file, te::qt::widgets::MapDisplay *display)
 Constructor It constructs a Qt Konw 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 tryDoReprojectionUsingAffineTransform (QPainter *painter)
 It try do reprojection using affine transfom. For small areas it gives a good result, however, for larger areas the result is not good. More...
 
virtual ~QtKnowItem ()
 Destructor It destructs a Qt know 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
 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...
 
QImage * m_image
 current image 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.002 and 0.5 More...
 
QPointF m_pos
 The icon position. More...
 
QString m_preffix
 File preffix. More...
 
te::gm::LineStringm_route
 The input path in world coordenates. More...
 
int m_SRID
 The input route srid. More...
 
QImage m_staticRepresentation
 Static representation of the animation. 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
 

Private Member Functions

te::dt::TimeInstant getTime (QString file)
 Get time of the raster data. More...
 

Detailed Description

Definition at line 41 of file QtKnowItem.h.

Constructor & Destructor Documentation

te::qt::widgets::QtKnowItem::QtKnowItem ( )

Empty Constructor.

Definition at line 13 of file QtKnowItem.cpp.

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

Constructor It constructs a Qt Konw Item.

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

Definition at line 18 of file QtKnowItem.cpp.

References ~QtKnowItem().

te::qt::widgets::QtKnowItem::~QtKnowItem ( )
virtualdefault

Destructor It destructs a Qt know Item.

Referenced by QtKnowItem().

Member Function Documentation

void te::qt::widgets::ImageItem::draw ( )
virtualinherited
void te::qt::widgets::ImageItem::drawCurrentImage ( QPainter *  p)
virtualinherited

Get current image.

p Pointer to QPainter. r Image rect in device coordinate. ima Pointer to QImage.

Definition at line 244 of file ImageItem.cpp.

References te::qt::widgets::ImageItem::getRect(), te::qt::widgets::ImageItem::m_image, te::qt::widgets::AnimationItem::m_opacity, and te::qt::widgets::ImageItem::tryDoReprojectionUsingAffineTransform().

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

void te::qt::widgets::ImageItem::drawForward ( const unsigned int curTime)
virtualinherited
void te::qt::widgets::ImageItem::erase ( const unsigned int curTime)
virtualinherited

Draw current image item. curTime The animation current time.

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

Definition at line 465 of file ImageItem.cpp.

References te::qt::widgets::ImageItem::drawForward().

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

Gets the Animation Item direction.

Returns
The Animation Item direction.

Definition at line 66 of file AnimationItem.cpp.

References te::qt::widgets::AnimationItem::m_direction.

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

Gets the Animation Item duration.

Returns
The Animation Item duration.

Definition at line 61 of file AnimationItem.cpp.

References te::qt::widgets::AnimationItem::m_duration.

QPoint te::qt::widgets::AnimationItem::getPosInDeviceCoordinate ( )
inherited
te::dt::TimeInstant te::qt::widgets::QtKnowItem::getTime ( QString  file)
privatevirtual

Get time of the raster data.

file raster data file name.

The time instant.

Implements te::qt::widgets::ImageItem.

Definition at line 25 of file QtKnowItem.cpp.

References file().

void te::qt::widgets::ImageItem::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget  
)
virtualinherited
void te::qt::widgets::AnimationItem::setDirection ( const QAbstractAnimation::Direction &  direction)
inherited
void te::qt::widgets::ImageItem::setLUT ( const std::vector< std::pair< int, QColor > > &  tab)
inherited

Sets the LUT. tab The LUT information.

Definition at line 504 of file ImageItem.cpp.

References te::qt::widgets::ImageItem::m_lut.

Referenced by te::qt::widgets::Eta5kmItem::setLUT(), and te::qt::widgets::HidroItem::setLUT().

void te::qt::widgets::ImageItem::tryDoReprojectionUsingAffineTransform ( QPainter *  painter)
inherited

It try do reprojection using affine transfom. For small areas it gives a good result, however, for larger areas the result is not good.

Parameters
painterPainter that will be configured to try do reprojection.

Definition at line 301 of file ImageItem.cpp.

References te::gm::LineString::getPointN(), te::map::MapDisplay::getSRID(), line, te::gm::LineStringType, te::qt::widgets::AnimationItem::m_display, te::qt::widgets::ImageItem::m_imaRect, te::qt::widgets::AnimationItem::m_matrix, te::qt::widgets::AnimationItem::m_SRID, PI, te::gm::LineString::setPoint(), TE_UNKNOWN_SRS, and te::gm::LineString::transform().

Referenced by te::qt::widgets::ImageItem::drawCurrentImage().

Member Data Documentation

QVector<QString> te::qt::widgets::ImageItem::m_animationFiles
inherited

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

Definition at line 197 of file ImageItem.h.

Referenced by te::qt::widgets::ImageItem::adjustDataToAnimationTemporalExtent(), te::qt::widgets::ImageItem::calculateCurrentFile(), and te::qt::widgets::Animation::setDataKeyValues().

bool te::qt::widgets::AnimationItem::m_automaticPan
inherited
QString te::qt::widgets::ImageItem::m_baseFile
inherited

Base file name.

Definition at line 200 of file ImageItem.h.

Referenced by te::qt::widgets::ImageItem::ImageItem().

QString te::qt::widgets::ImageItem::m_currentImageFile
inherited
QAbstractAnimation::Direction te::qt::widgets::AnimationItem::m_direction
inherited
QPointF te::qt::widgets::ImageItem::m_imageCenterPos
inherited

Center of the image.

Definition at line 205 of file ImageItem.h.

std::map<uchar, QColor> te::qt::widgets::ImageItem::m_lut
inherited
double te::qt::widgets::AnimationItem::m_norFinalTime
inherited

Normalized final time (between 0 and 1).

Definition at line 158 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 157 of file AnimationItem.h.

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

double te::qt::widgets::AnimationItem::m_panFactor
inherited
QString te::qt::widgets::ImageItem::m_preffix
inherited

File preffix.

Definition at line 202 of file ImageItem.h.

Referenced by te::qt::widgets::ImageItem::getCtlParameters(), and te::qt::widgets::ImageItem::loadData().

te::gm::LineString* te::qt::widgets::AnimationItem::m_route
inherited

Property Documentation


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