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

kstars

imageviewer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           imageviewer.h  -  An ImageViewer for KStars
00003                              -------------------
00004     begin                : Mon Aug 27 2001
00005     copyright            : (C) 2001 by Thomas Kabelmann
00006     email                : tk78@gmx.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef IMAGEVIEWER_H
00019 #define IMAGEVIEWER_H
00020 
00021 #include <qimage.h>
00022 #include <qpixmap.h>
00023 
00024 #include <kpixmapio.h>
00025 #include <kio/job.h>
00026 #include <ktempfile.h>
00027 #include <kmainwindow.h>
00028 
00045 class KURL;
00046 class QFile;
00047 
00048 class ImageViewer : public KMainWindow  {
00049     Q_OBJECT
00050 
00051     public:
00053         ImageViewer (const KURL *imageName, const QString &capText, QWidget *parent, const char *name = 0);
00054 
00056         ~ImageViewer();
00057 
00058     protected:
00060         void paintEvent (QPaintEvent *ev);
00061 
00066         void resizeEvent (QResizeEvent *ev);
00067 
00069         void closeEvent (QCloseEvent *ev);
00070 
00075         void keyPressEvent (QKeyEvent *ev);
00076 
00080         void keyReleaseEvent (QKeyEvent *ev);
00081 
00082     private:
00087         void showImage( void );
00088 
00091         void loadImageFromURL( void );
00092 
00095         void saveFile (KURL &url);
00096         
00099         void checkJob();
00100 
00101         QImage image;
00102         QPixmap pix;
00103         KPixmapIO kpix;
00104         KTempFile tempfile;
00105         QFile *file;
00106         
00107         const KURL imageURL;
00108         bool fileIsImage;
00109         QString filename;
00110         bool ctrl, key_s, key_q;    // the keys
00111 
00112         KIO::Job *downloadJob;  // download job of image -> 0 == no job is running
00113         
00114     private slots:
00116         void downloadReady (KIO::Job *);
00117 
00119         void saveFileToDisc( void );
00120 
00122         void close( void );
00123 };
00124 
00125 #endif

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