• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

ImageViewer Class Reference

Image viewer widget for KStars. More...

#include <imageviewer.h>

Inheritance diagram for ImageViewer:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 ImageViewer (const KURL *imageName, const QString &capText, QWidget *parent, const char *name=0)
 ~ImageViewer ()

Protected Member Functions

void closeEvent (QCloseEvent *ev)
void keyPressEvent (QKeyEvent *ev)
void keyReleaseEvent (QKeyEvent *ev)
void paintEvent (QPaintEvent *ev)
void resizeEvent (QResizeEvent *ev)

Detailed Description

Image viewer widget for KStars.

Author:
Thomas Kabelmann
Version:
1.0
This image-viewer automatically resizes the picture. The output works with kio-slaves and not directly with the QImage save-routines because normally the image-files are in GIF-format and QT does not save these files. For other formats, like PNG, this is not so important because they can directly saved by QImage.

The download-slave works asynchron so the parent-widget can be used at this time. The save-slave works synchronously, but this is not important because the files are at this time local saved and this works not so long.

Definition at line 48 of file imageviewer.h.


Constructor & Destructor Documentation

ImageViewer::ImageViewer ( const KURL *  imageName,
const QString &  capText,
QWidget *  parent,
const char *  name = 0 
)

Constructor.

Definition at line 32 of file imageviewer.cpp.

ImageViewer::~ImageViewer (  ) 

Destructor.

If there is a partially downloaded image file, delete it.

Definition at line 57 of file imageviewer.cpp.


Member Function Documentation

void ImageViewer::closeEvent ( QCloseEvent *  ev  )  [protected]

Make sure all events have been processed before closing the dialog.

Definition at line 86 of file imageviewer.cpp.

void ImageViewer::keyPressEvent ( QKeyEvent *  ev  )  [protected]

Keyboard shortcuts for saving files and closing the window.

Note:
(this should be deprecated; instead just assign KAccel to the close/save buttons)

Definition at line 94 of file imageviewer.cpp.

void ImageViewer::keyReleaseEvent ( QKeyEvent *  ev  )  [protected]

Unset the bool variables that indicate keys were pressed.

(this should be deprecated; see above)

Definition at line 114 of file imageviewer.cpp.

void ImageViewer::paintEvent ( QPaintEvent *  ev  )  [protected]

Bitblt the image onto the viewer widget.

Definition at line 73 of file imageviewer.cpp.

void ImageViewer::resizeEvent ( QResizeEvent *  ev  )  [protected]

The window is resized when a file finishes downloading, before it is displayed.

The resizeEvent converts the downloaded QImage to a QPixmap

Note:
(JH: not sure why this conversion is not done in showImage)

Definition at line 78 of file imageviewer.cpp.


The documentation for this class was generated from the following files:
  • imageviewer.h
  • imageviewer.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal