1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a list of selectable options with preview
8
* effects as thumbnails.
10
* Copyright (C) 2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
* This program is free software; you can redistribute it
13
* and/or modify it under the terms of the GNU General
14
* Public License as published by the Free Software Foundation;
15
* either version 2, or (at your option)
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* ============================================================ */
30
#include <QtCore/QObject>
31
#include <QtGui/QPixmap>
32
#include <QtGui/QTreeWidget>
33
#include <QtGui/QTreeWidgetItem>
37
#include "digikam_export.h"
42
class DImgThreadedFilter;
43
class PreviewThreadWrapperPriv;
45
class DIGIKAM_EXPORT PreviewThreadWrapper : public QObject
51
PreviewThreadWrapper(QObject* parent=0);
52
~PreviewThreadWrapper();
54
void registerFilter(int id, DImgThreadedFilter* filter);
61
void signalFilterStarted(int);
62
void signalFilterFinished(int, const QPixmap&);
66
void slotFilterStarted();
67
void slotFilterFinished(bool success);
68
void slotFilterProgress(int progress);
72
PreviewThreadWrapperPriv* const d;
75
// -------------------------------------------------------------------
77
class PreviewListItemPriv;
79
class DIGIKAM_EXPORT PreviewListItem : public QTreeWidgetItem
84
PreviewListItem(QTreeWidget* parent=0);
87
void setPixmap(const QPixmap& pix);
97
PreviewListItemPriv* const d;
100
// -------------------------------------------------------------------
102
class PreviewListPriv;
104
class DIGIKAM_EXPORT PreviewList : public QTreeWidget
110
PreviewList(QObject* parent = 0);
113
PreviewListItem* addItem(DImgThreadedFilter* filter, const QString& txt, int id);
115
void setCurrentId(int id);
123
void slotProgressTimerDone();
124
void slotFilterStarted(int);
125
void slotFilterFinished(int, const QPixmap&);
129
PreviewListItem* findItem(int id);
133
PreviewListPriv* const d;
136
} // namespace Digikam
138
#endif /* PREVIEWLIST_H */