You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.8 KiB
78 lines
1.8 KiB
15 years ago
|
/*
|
||
|
*
|
||
|
* This file is part of the KDE project.
|
||
|
* Copyright (C) 2001 Martin R. Jones <mjones@kde.org>
|
||
|
* 2001 Carsten Pfeiffer <pfeiffer@kde.org>
|
||
|
*
|
||
|
* 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
|
||
|
|
||
15 years ago
|
#include <tqpixmap.h>
|
||
15 years ago
|
|
||
|
#include <kurl.h>
|
||
|
#include <kpreviewwidgetbase.h>
|
||
|
|
||
15 years ago
|
class TQCheckBox;
|
||
|
class TQPushButton;
|
||
|
class TQLabel;
|
||
|
class TQTimer;
|
||
15 years ago
|
|
||
|
class KFileDialog;
|
||
|
class KFileItem;
|
||
12 years ago
|
namespace TDEIO { class Job; class PreviewJob; }
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Image preview widget for the file dialog.
|
||
|
*/
|
||
12 years ago
|
class TDEIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
15 years ago
|
KImageFilePreview(TQWidget *parent);
|
||
15 years ago
|
~KImageFilePreview();
|
||
|
|
||
13 years ago
|
virtual TQSize sizeHint() const;
|
||
15 years ago
|
|
||
|
public slots:
|
||
|
virtual void showPreview(const KURL &url);
|
||
|
virtual void clearPreview();
|
||
|
|
||
|
protected slots:
|
||
|
void showPreview();
|
||
|
void showPreview( const KURL& url, bool force );
|
||
|
|
||
|
void toggleAuto(bool);
|
||
15 years ago
|
virtual void gotPreview( const KFileItem*, const TQPixmap& );
|
||
15 years ago
|
|
||
|
protected:
|
||
15 years ago
|
virtual void resizeEvent(TQResizeEvent *e);
|
||
12 years ago
|
virtual TDEIO::PreviewJob * createJob( const KURL& url,
|
||
15 years ago
|
int w, int h );
|
||
|
|
||
|
private slots:
|
||
12 years ago
|
void slotResult( TDEIO::Job * );
|
||
15 years ago
|
virtual void slotFailed( const KFileItem* );
|
||
|
|
||
|
private:
|
||
|
bool autoMode;
|
||
|
KURL currentURL;
|
||
15 years ago
|
TQTimer *timer;
|
||
|
TQLabel *imageLabel;
|
||
|
TQLabel *infoLabel;
|
||
|
TQCheckBox *autoPreview;
|
||
|
TQPushButton *previewButton;
|
||
12 years ago
|
TDEIO::PreviewJob *m_job;
|
||
15 years ago
|
protected:
|
||
|
virtual void virtual_hook( int id, void* data );
|
||
|
private:
|
||
|
class KImageFilePreviewPrivate;
|
||
|
KImageFilePreviewPrivate *d;
|
||
|
};
|
||
|
|
||
|
#endif // KIMAGEFILEPREVIEW_H
|