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

KIO

previewjob.h
Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // vim: ts=4 sw=4 et
00003 /*  This file is part of the KDE libraries
00004     Copyright (C) 2000 David Faure <faure@kde.org>
00005                   2000 Carsten Pfeiffer <pfeiffer@kde.org>
00006                   2001 Malte Starostik <malte.starostik@t-online.de>
00007 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021     Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #ifndef KIO_PREVIEWJOB_H
00025 #define KIO_PREVIEWJOB_H
00026 
00027 #include <kfileitem.h>
00028 #include <kio/job.h>
00029 
00030 class QPixmap;
00031 
00032 namespace KIO {
00033     class PreviewJobPrivate;
00038     class KIO_EXPORT PreviewJob : public KIO::Job
00039     {
00040         Q_OBJECT
00041     public:
00046         enum ScaleType {
00051             Unscaled,
00056             Scaled,
00062             ScaledAndCached
00063         };
00064 
00065 #ifndef KDE_NO_DEPRECATED
00066 
00086         KDE_DEPRECATED PreviewJob(const KFileItemList& items, int width, int height,
00087                                   int iconSize, int iconAlpha, bool scale, bool save,
00088                                   const QStringList *enabledPlugins);
00089 #endif
00090 
00100         PreviewJob(const KFileItemList &items,
00101                    const QSize &size,
00102                    const QStringList *enabledPlugins = 0);
00103 
00104         virtual ~PreviewJob();
00105 
00113         void setOverlayIconSize(int size);
00114 
00120         int overlayIconSize() const;
00121 
00129         void setOverlayIconAlpha(int alpha);
00130 
00137         int overlayIconAlpha() const;
00138 
00145         void setScaleType(ScaleType type);
00146 
00152         ScaleType scaleType() const;
00153 
00160         void removeItem( const KUrl& url );
00161 
00166         void setIgnoreMaximumSize(bool ignoreSize = true);
00167 
00176         void setSequenceIndex(int index);
00177 
00183         int sequenceIndex() const;
00184 
00191         static QStringList availablePlugins();
00192 
00198         static QStringList supportedMimeTypes();
00199 
00207 #ifndef KDE_NO_DEPRECATED
00208         KDE_DEPRECATED static KIO::filesize_t maximumFileSize();
00209 #endif
00210 
00211 
00212     Q_SIGNALS:
00219         void gotPreview( const KFileItem& item, const QPixmap &preview );
00226         void failed( const KFileItem& item );
00227 
00228     protected Q_SLOTS:
00229         virtual void slotResult( KJob *job );
00230 
00231     private:
00232         Q_PRIVATE_SLOT(d_func(), void startPreview())
00233         Q_PRIVATE_SLOT(d_func(), void slotThumbData(KIO::Job *, const QByteArray &))
00234         Q_DECLARE_PRIVATE(PreviewJob)
00235     };
00236 
00237 #ifndef KDE_NO_DEPRECATED
00238 
00261     KIO_EXPORT_DEPRECATED PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 ); // KDE5: use enums instead of bool scale + bool save
00262 
00286     KIO_EXPORT_DEPRECATED PreviewJob *filePreview( const KUrl::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const QStringList *enabledPlugins = 0 );
00287 #endif
00288 
00299     KIO_EXPORT PreviewJob *filePreview(const KFileItemList &items, const QSize &size, const QStringList *enabledPlugins = 0);
00300 }
00301 
00302 #endif

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

Skip menu "kdelibs"
  • 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal