• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
previewjob.h
1 // -*- c++ -*-
2 // vim: ts=4 sw=4 et
3 /* This file is part of the KDE libraries
4  Copyright (C) 2000 David Faure <faure@kde.org>
5  2000 Carsten Pfeiffer <pfeiffer@kde.org>
6  2001 Malte Starostik <malte.starostik@t-online.de>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef __kio_previewjob_h__
25 #define __kio_previewjob_h__
26 
27 #include <kfileitem.h>
28 #include <kio/job.h>
29 
30 class TQPixmap;
31 
32 namespace KIO {
37  class KIO_EXPORT PreviewJob : public KIO::Job
38  {
39  Q_OBJECT
40  public:
57  PreviewJob( const KFileItemList &items, int width, int height,
58  int iconSize, int iconAlpha, bool scale, bool save,
59  const TQStringList *enabledPlugins, bool deleteItems = false );
60  virtual ~PreviewJob();
61 
68  void removeItem( const KFileItem *item );
69 
76  void setIgnoreMaximumSize(bool ignoreSize = true);
77 
84  static TQStringList availablePlugins();
85 
91  static TQStringList supportedMimeTypes();
92 
96  virtual void kill( bool quietly = true );
97 
98  signals:
105  void gotPreview( const KFileItem *item, const TQPixmap &preview );
112  void failed( const KFileItem *item );
113 
114  protected:
115  void getOrCreateThumbnail();
116  bool statResultThumbnail();
117  void createThumbnail( TQString );
118 
119  protected slots:
120  virtual void slotResult( KIO::Job *job );
121 
122  private slots:
123  void startPreview();
124  void slotThumbData(KIO::Job *, const TQByteArray &);
125 
126  private:
127  void determineNextFile();
128  void emitPreview(const TQImage &thumb);
129  void emitFailed(const KFileItem *item = 0);
130 
131  protected:
132  virtual void virtual_hook( int id, void* data );
133  private:
134  struct PreviewJobPrivate *d;
135  };
136 
157  KIO_EXPORT PreviewJob *filePreview( const KFileItemList &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
158 
179  KIO_EXPORT PreviewJob *filePreview( const KURL::List &items, int width, int height = 0, int iconSize = 0, int iconAlpha = 70, bool scale = true, bool save = true, const TQStringList *enabledPlugins = 0 );
180 }
181 
182 #endif
KIO
A namespace for KIO globals.
Definition: authinfo.h:29
KIO::filePreview
KIO_EXPORT PreviewJob * filePreview(const KFileItemList &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const TQStringList *enabledPlugins=0)
Creates a PreviewJob to generate or retrieve a preview image for the given URL.
Definition: previewjob.cpp:576
KIO::PreviewJob
KIO Job to get a thumbnail picture.
Definition: previewjob.h:37
KIO::Job
The base class for all jobs.
Definition: jobclasses.h:68
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:41

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |