# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kimagefilepreview.h

    00001 /*
    00002  *
    00003  * This file is part of the KDE project.
    00004  * Copyright (C) 2001 Martin R. Jones <mjones@kde.org>
    00005  *               2001 Carsten Pfeiffer <pfeiffer@kde.org>
    00006  *
    00007  * You can Freely distribute this program under the GNU Library General Public
    00008  * License. See the file "COPYING" for the exact licensing terms.
    00009  */
    00010
    00011 #ifndef KIMAGEFILEPREVIEW_H
    00012 #define KIMAGEFILEPREVIEW_H
    00013
    00014 #include <qpixmap.h>
    00015
    00016 #include <kurl.h>
    00017 #include <kpreviewwidgetbase.h>
    00018
    00019 class QCheckBox;
    00020 class QPushButton;
    00021 class QLabel;
    00022 class QTimer;
    00023
    00024 class KFileDialog;
    00025 class KFileItem;
    00026 namespace KIO {
    00027     class Job;
    00028     class PreviewJob;
    00029 }
    00030
    00034 class KImageFilePreview : public KPreviewWidgetBase
    00035 {
    00036         Q_OBJECT
    00037
    00038         public:
    00039                 KImageFilePreview(QWidget *parent);
    00040                 ~KImageFilePreview();
    00041
    00042                 virtual QSize sizeHint() const;
    00043
    00044         public slots:
    00045                 virtual void showPreview(const KURL &url);
    00046                 virtual void clearPreview();
    00047
    00048         protected slots:
    00049                 void showPreview() { showPreview( currentURL, true ); }
    00050                 void showPreview( const KURL& url, bool force );
    00051
    00052                 void toggleAuto(bool);
    00053                 virtual void gotPreview( const KFileItem*, const QPixmap& );
    00054
    00055         protected:
    00056                 virtual void resizeEvent(QResizeEvent *e);
    00057                 virtual KIO::PreviewJob * createJob( const KURL& url,
    00058                                                      int w, int h );
    00059
    00060         private slots:
    00061                 void slotResult( KIO::Job * );
    00062                 virtual void slotFailed( const KFileItem* );
    00063
    00064         private:
    00065                 bool autoMode;
    00066                 KURL currentURL;
    00067                 QTimer *timer;
    00068                 QLabel *imageLabel;
    00069                 QLabel *infoLabel;
    00070                 QCheckBox *autoPreview;
    00071                 QPushButton *previewButton;
    00072                 KIO::PreviewJob *m_job;
    00073         protected:
    00074                 virtual void virtual_hook( int id, void* data );
    00075         private:
    00076                 class KImageFilePreviewPrivate;
    00077                 KImageFilePreviewPrivate *d;
    00078 };
    00079
    00080 #endif // KIMAGEFILEPREVIEW_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:13:37 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001