• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

  • sources
  • kde-4.12
  • kdelibs
  • kio
  • kfile
kimagefilepreview.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is part of the KDE project.
4  * Copyright (C) 2001 Martin R. Jones <mjones@kde.org>
5  * 2001 Carsten Pfeiffer <pfeiffer@kde.org>
6  * 2008 Rafael Fernández López <ereslibre@kde.org>
7  *
8  * You can Freely distribute this program under the GNU Library General Public
9  * License. See the file "COPYING" for the exact licensing terms.
10  */
11 
12 #ifndef KIMAGEFILEPREVIEW_H
13 #define KIMAGEFILEPREVIEW_H
14 
15 #include <QtGui/QPixmap>
16 
17 #include <kurl.h>
18 #include <kpreviewwidgetbase.h>
19 
20 class KFileItem;
21 class KJob;
22 namespace KIO { class PreviewJob; }
23 
27 class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
28 {
29  Q_OBJECT
30 
31  public:
37  explicit KImageFilePreview(QWidget *parent = 0);
38 
42  ~KImageFilePreview();
43 
47  virtual QSize sizeHint() const;
48 
49  public Q_SLOTS:
53  virtual void showPreview(const KUrl &url);
54 
58  virtual void clearPreview();
59 
60  protected Q_SLOTS:
61  void showPreview();
62  void showPreview( const KUrl& url, bool force );
63 
64  virtual void gotPreview( const KFileItem&, const QPixmap& );
65 
66  protected:
67  virtual void resizeEvent( QResizeEvent *event );
68  virtual KIO::PreviewJob * createJob( const KUrl& url, int width, int height );
69 
70  private:
71  class KImageFilePreviewPrivate;
72  KImageFilePreviewPrivate *const d;
73 
74  Q_DISABLE_COPY(KImageFilePreview)
75 
76  Q_PRIVATE_SLOT( d, void _k_slotResult( KJob* ) )
77  Q_PRIVATE_SLOT( d, void _k_slotFailed( const KFileItem& ) )
78  Q_PRIVATE_SLOT( d, void _k_slotStepAnimation( int frame ) )
79  Q_PRIVATE_SLOT( d, void _k_slotFinished( ) )
80 };
81 
82 #endif // KIMAGEFILEPREVIEW_H
KPreviewWidgetBase::showPreview
virtual void showPreview(const KUrl &url)=0
This slot is called every time the user selects another file in the file dialog.
kurl.h
QWidget
kpreviewwidgetbase.h
KUrl
KImageFilePreview
Image preview widget for the file dialog.
Definition: kimagefilepreview.h:27
KIO::PreviewJob
KIO Job to get a thumbnail picture.
Definition: previewjob.h:38
KPreviewWidgetBase::clearPreview
virtual void clearPreview()=0
Reimplement this to clear the preview.
KPreviewWidgetBase
Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(cons...
Definition: kpreviewwidgetbase.h:43
QSize
KJob
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal