ImageWidget Class Reference

#include <ImageWidget.h>

Inheritance diagram for ImageWidget:
FrameWidget

List of all members.

Public Member Functions

void clone (ImageWidget *t)
QString fileName ()
 Return d_file_name.
 ImageWidget (Graph *, const QImage &image)
 Construct an image widget from a QImage.
 ImageWidget (Graph *, const QString &fn=QString::null)
 Construct an image widget from a file name.
bool load (const QString &fn, bool update=true)
 Import image from d_file_name. Returns true if successful.
QPixmap pixmap () const
 Return the pixmap to be drawn.
void print (QPainter *p, const QwtScaleMap map[QwtPlot::axisCnt])
bool saveInternally ()
virtual QString saveToString ()
void setPixmap (const QPixmap &)
void setSaveInternally (bool save=true)

Static Public Member Functions

static void restore (Graph *g, const QStringList &lst)

Private Member Functions

void draw (QPainter *painter, const QRect &r)
void paintEvent (QPaintEvent *e)

Private Attributes

QString d_file_name
 The file from which the image was loaded.
QPixmap d_pix
bool d_save_xpm
 Flag telling if the pixmap must be saved in the .qti project as XPM.

Constructor & Destructor Documentation

ImageWidget::ImageWidget ( Graph plot,
const QString &  fn = QString::null 
)

Construct an image widget from a file name.

References d_pix, load(), FrameWidget::move(), and FrameWidget::setSize().

ImageWidget::ImageWidget ( Graph plot,
const QImage &  image 
)

Construct an image widget from a QImage.

References d_pix, FrameWidget::move(), and FrameWidget::setSize().


Member Function Documentation

void ImageWidget::clone ( ImageWidget t  ) 
void ImageWidget::draw ( QPainter *  painter,
const QRect &  r 
) [private]
QString ImageWidget::fileName (  )  [inline]
bool ImageWidget::load ( const QString &  fn,
bool  update = true 
)

Import image from d_file_name. Returns true if successful.

References d_file_name, d_pix, and FrameWidget::plot().

Referenced by EnrichmentDialog::chooseImageFile(), and ImageWidget().

void ImageWidget::paintEvent ( QPaintEvent *  e  )  [private, virtual]

Reimplemented from FrameWidget.

References d_pix, and draw().

QPixmap ImageWidget::pixmap (  )  const [inline]

Return the pixmap to be drawn.

References d_pix.

Referenced by LineProfileTool::calculateLineProfile(), and clone().

void ImageWidget::print ( QPainter *  p,
const QwtScaleMap  map[QwtPlot::axisCnt] 
) [virtual]
void ImageWidget::restore ( Graph g,
const QStringList &  lst 
) [static]
bool ImageWidget::saveInternally (  )  [inline]

References d_save_xpm.

Referenced by clone(), and EnrichmentDialog::setWidget().

QString ImageWidget::saveToString (  )  [virtual]

Reimplemented from FrameWidget.

References d_file_name, d_pix, and d_save_xpm.

void ImageWidget::setPixmap ( const QPixmap &  pix  ) 
void ImageWidget::setSaveInternally ( bool  save = true  )  [inline]

Member Data Documentation

QString ImageWidget::d_file_name [private]

The file from which the image was loaded.

Referenced by clone(), fileName(), load(), and saveToString().

QPixmap ImageWidget::d_pix [private]
bool ImageWidget::d_save_xpm [private]

Flag telling if the pixmap must be saved in the .qti project as XPM.

Referenced by clone(), saveInternally(), saveToString(), and setSaveInternally().


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

Generated on Tue Nov 3 10:48:55 2009 for QtiPlot by  doxygen 1.6.1