summaryrefslogtreecommitdiffstats
path: root/krusader/KViewer/kimagefilepreview.h
blob: 8966c5f46f81d4b2452194f64b7359bf3373ad93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
*
* This file is part of the KDE project.
* Copyright (C) 2001 Martin R. Jones <mjones@kde.org>
*               2001 Carsten Pfeiffer <pfeiffer@kde.org>
*
* Modified for Krusader by Shie Erlich, October 2004
*
* You can Freely distribute this program under the GNU Library General Public
* License. See the file "COPYING" for the exact licensing terms.
*/

#ifndef KrusaderImageFilePreview_H
#define KrusaderImageFilePreview_H

#include <tqpixmap.h>

#include <kurl.h>
#include <kpreviewwidgetbase.h>

class TQCheckBox;
class TQPushButton;
class TQLabel;
class TQTimer;

class KFileDialog;
class KFileItem;

class KrusaderImageFilePreview : public KPreviewWidgetBase {
		Q_OBJECT
  TQ_OBJECT

	public:
		KrusaderImageFilePreview( TQWidget *tqparent );
		~KrusaderImageFilePreview();

		virtual TQSize tqsizeHint() const;

	public slots:
		virtual void showPreview( const KURL &url );
		virtual void clearPreview();

	protected slots:
		void showPreview();
		void showPreview( const KURL& url, bool force );

		virtual void gotPreview( const KFileItem*, const TQPixmap& );

	protected:
		virtual void resizeEvent( TQResizeEvent *e );
		virtual KIO::PreviewJob * createJob( const KURL& url,
		                                     int w, int h );

	private slots:
		void slotResult( KIO::Job * );
		virtual void slotFailed( const KFileItem* );

	private:
		KURL currentURL;
		TQTimer *timer;
		TQLabel *imageLabel;
		TQLabel *infoLabel;
		KIO::PreviewJob *m_job;
	protected:
		virtual void virtual_hook( int id, void* data );
	private:
		class KrusaderImageFilePreviewPrivate;
		KrusaderImageFilePreviewPrivate *d;
};

#endif // KrusaderImageFilePreview_H