Source: kimagefilepreview.h
|
|
|
|
/*
*
* This file is part of the KDE project.
* Copyright (C) 2001 Martin R. Jones
* 2001 Carsten Pfeiffer
*
* You can Freely distribute this program under the GNU Library General Public
* License. See the file "COPYING" for the exact licensing terms.
*/
#ifndef KIMAGEFILEPREVIEW_H
#define KIMAGEFILEPREVIEW_H
#include
#include
#include
class QCheckBox;
class QPushButton;
class QLabel;
class QTimer;
class KFileDialog;
class KFileItem;
namespace KIO { class PreviewJob; }
/**
* Image preview widget for the file dialog.
*/
class KImageFilePreview : public KPreviewWidgetBase
{
Q_OBJECT
public:
KImageFilePreview(QWidget *parent);
~KImageFilePreview();
virtual QSize sizeHint() const;
public slots:
virtual void showPreview(const KURL &url);
virtual void clearPreview();
protected slots:
void showPreview() { showPreview( currentURL, true ); }
void showPreview( const KURL& url, bool force );
void toggleAuto(bool);
virtual void gotPreview( const KFileItem*, const QPixmap& );
protected:
virtual void resizeEvent(QResizeEvent *e);
virtual KIO::PreviewJob * createJob( const KURL& url,
int w, int h );
private slots:
void slotResult( KIO::Job * );
virtual void slotFailed( const KFileItem* );
private:
bool autoMode;
KURL currentURL;
QTimer *timer;
QLabel *imageLabel;
QLabel *infoLabel;
QCheckBox *autoPreview;
QPushButton *previewButton;
KIO::PreviewJob *m_job;
class KImageFilePreviewPrivate;
KImageFilePreviewPrivate *d;
};
#endif // KIMAGEFILEPREVIEW_H
Generated by: dfaure on kde.faure.org on Thu Jan 17 22:17:38 2002, using kdoc 2.0a53. |