2
Gwenview - A simple image viewer for KDE
3
Copyright (C) 2000-2002 Aur�lien G�teau
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 2
8
of the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef FILETHUMBNAILVIEW_H
21
#define FILETHUMBNAILVIEW_H
24
#include <qguardedptr.h>
25
#include <qiconview.h>
28
#include <kfileview.h>
31
#include "browsablefileview.h"
32
#include "thumbnailsize.h"
40
class ThumbnailLoadJob;
43
class FileThumbnailView : public QIconView, public KFileView, public BrowsableFileView {
46
FileThumbnailView(QWidget* parent);
49
QWidget* widget() { return this; }
51
void clearSelection() { QIconView::clearSelection(); }
53
void insertItem(KFileViewItem* item);
54
void ensureItemVisible(const KFileViewItem* item);
55
void setSelected(const KFileViewItem* item,bool enable);
56
bool isSelected(const KFileViewItem* item) const;
57
void removeItem(const KFileViewItem* item);
58
void startThumbnailUpdate();
59
void stopThumbnailUpdate();
64
void selectPrevious();
67
QString previousItemText() const;
68
QString currentItemText() const;
69
QString nextItemText() const;
70
bool currentIsFirst() const;
71
bool currentIsLast() const;
74
* Don't forget to call arrangeItemsInGrid to apply the changes
76
void setThumbnailSize(ThumbnailSize value);
77
ThumbnailSize thumbnailSize() const { return mThumbnailSize; }
80
* Don't forget to call arrangeItemsInGrid to apply the changes
82
void setMarginSize(int value);
83
int marginSize() const { return mMarginSize; }
85
void readConfig(KConfig*,const QString&);
86
void writeConfig(KConfig*,const QString&) const;
90
void setThumbnailPixmap(const KFileViewItem*,const QPixmap&);
93
void updateStarted(int);
95
void updatedOneThumbnail();
101
ThumbnailSize mThumbnailSize;
103
QPopupMenu* mPopupMenu;
105
QGuardedPtr<ThumbnailLoadJob> mThumbnailLoadJob;