Ran qt3to4
[basket4.git] / src / kiconcanvas.h
blob9efb63563cfb9bbcda4a6bc96e1b796c3d79ca7b
1 /* vi: ts=8 sts=4 sw=4
2 * kate: space-indent on; indent-width 4; mixedindent off; indent-mode cstyle;
4 * This file is part of the KDE project, module kfile.
5 * Copyright (C) 2006 Luke Sandell <lasandell@gmail.com>
6 * (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
7 * (C) 2000 Geert Jansen <jansen@kde.org>
8 * (C) 2000 Kurt Granroth <granroth@kde.org>
9 * (C) 1997 Christoph Neerfeld <chris@kde.org>
11 * This is free software; it comes under the GNU Library General
12 * Public License, version 2. See the file "COPYING.LIB" for the
13 * exact licensing terms.
16 #ifndef _KICONCANVAS_H_
17 #define _KICONCANVAS_H_
19 #include <qstring.h>
20 #include <qstringlist.h>
21 #include <kiconview.h>
23 class QTimer;
24 class KIconLoader;
25 class Q3DragObject;
26 class QIconLoader;
28 /**
29 * Icon canvas for KIconDialog.
31 class KIO_EXPORT KIconCanvas: public KIconView
32 /* NOTE: Why export this? */
34 Q_OBJECT
36 public:
37 KIconCanvas(QWidget *parent=0L, const char *name=0L);
38 ~KIconCanvas();
40 /**
41 * Load icons into the canvas.
43 void loadFiles(const QStringList& files);
45 /**
46 * Returns the current icon.
48 QString getCurrent() const;
50 void setIconLoader(KIconLoader *loader);
52 void setGroupOrSize(int groupOrSize);
54 void setStrictIconSize(bool strictIconSize);
56 public slots:
57 void stopLoading();
59 signals:
60 /**
61 * Emitted when the current icon has changed.
63 void nameChanged(QString);
64 /* KDE 4: Make it const QString */
66 void startLoading(int);
67 void progress(int);
68 void finished();
70 private slots:
71 void slotLoadFiles();
72 void slotCurrentChanged(Q3IconViewItem *item);
74 private:
75 QStringList mFiles;
76 QTimer *mpTimer;
77 KIconLoader *mpLoader;
79 protected:
80 virtual void virtual_hook( int id, void* data );
81 virtual Q3DragObject *dragObject();
82 void loadIcon(const QString &path);
84 private:
85 class KIconCanvasPrivate;
86 KIconCanvasPrivate *d;
89 #endif