1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a ListView to display black frames
9
* Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
* Copyright (C) 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
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
* ============================================================ */
25
#ifndef BLACKFRAMELISTVIEW_H
26
#define BLACKFRAMELISTVIEW_H
34
#include <qvaluelist.h>
35
#include <qlistview.h>
44
#include "blackframeparser.h"
47
namespace DigikamHotPixelsImagesPlugin
50
class BlackFrameListView : public QListView
56
BlackFrameListView(QWidget* parent=0);
57
~BlackFrameListView(){};
61
void blackFrameSelected(QValueList<HotPixel>, const KURL&);
65
void slotParsed(QValueList<HotPixel> hotPixels, const KURL& blackFrameURL)
67
emit blackFrameSelected(hotPixels, blackFrameURL);
71
// --------------------------------------------------------------------------
73
class BlackFrameListViewItem : public QObject, QListViewItem
79
BlackFrameListViewItem(BlackFrameListView* parent, const KURL &url);
80
~BlackFrameListViewItem(){};
82
virtual QString text(int column)const;
83
virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
84
virtual int width(const QFontMetrics& fm, const QListView* lv, int c)const;
88
void parsed(QValueList<HotPixel>, const KURL&);
89
void signalLoadingProgress(float);
90
void signalLoadingComplete();
98
QPixmap thumb(const QSize& size);
102
void slotParsed(QValueList<HotPixel>);
106
// Data contained within each listview item
112
QValueList <HotPixel> m_hotPixels;
114
QString m_blackFrameDesc;
116
KURL m_blackFrameURL;
118
BlackFrameParser *m_parser;
120
BlackFrameListView *m_parent;
123
} // NameSpace DigikamHotPixelsImagesPlugin
125
#endif // BLACKFRAMELISTVIEW_H