~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to imageplugins/enhance/hotpixels/blackframelistview.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2005-07-05
 
7
 * Description : a ListView to display black frames
 
8
 *
 
9
 * Copyright (C) 2005-2010 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>
 
11
 *
 
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)
 
16
 * any later version.
 
17
 *
 
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.
 
22
 *
 
23
 * ============================================================ */
 
24
 
 
25
#ifndef BLACKFRAMELISTVIEW_H
 
26
#define BLACKFRAMELISTVIEW_H
 
27
 
 
28
// Qt includes
 
29
 
 
30
#include <QList>
 
31
#include <QImage>
 
32
#include <QString>
 
33
#include <QSize>
 
34
#include <QPoint>
 
35
#include <QPixmap>
 
36
#include <QTreeWidget>
 
37
 
 
38
// KDE includes
 
39
 
 
40
#include <kurl.h>
 
41
#include <klocale.h>
 
42
 
 
43
// Local includes
 
44
 
 
45
#include "blackframeparser.h"
 
46
#include "hotpixel.h"
 
47
 
 
48
namespace DigikamEnhanceImagePlugin
 
49
{
 
50
 
 
51
class BlackFrameListView : public QTreeWidget
 
52
{
 
53
    Q_OBJECT
 
54
 
 
55
public:
 
56
 
 
57
    BlackFrameListView(QWidget* parent=0);
 
58
    ~BlackFrameListView(){};
 
59
 
 
60
Q_SIGNALS:
 
61
 
 
62
    void signalBlackFrameSelected(const QList<HotPixel>&, const KUrl&);
 
63
 
 
64
private Q_SLOTS:
 
65
 
 
66
    void slotParsed(const QList<HotPixel>& hotPixels, const KUrl& blackFrameURL)
 
67
    {
 
68
       emit signalBlackFrameSelected(hotPixels, blackFrameURL);
 
69
    };
 
70
};
 
71
 
 
72
//-----------------------------------------------------------------------------------
 
73
 
 
74
class BlackFrameListViewItem : public QObject, QTreeWidgetItem
 
75
{
 
76
Q_OBJECT
 
77
 
 
78
public:
 
79
 
 
80
    BlackFrameListViewItem(BlackFrameListView* parent, const KUrl& url);
 
81
    ~BlackFrameListViewItem(){};
 
82
 
 
83
Q_SIGNALS:
 
84
 
 
85
    void signalParsed(const QList<HotPixel>&, const KUrl&);
 
86
    void signalLoadingProgress(float);
 
87
    void signalLoadingComplete();
 
88
 
 
89
protected:
 
90
 
 
91
    void activate();
 
92
 
 
93
private:
 
94
 
 
95
    QPixmap thumb(const QSize& size);
 
96
 
 
97
private Q_SLOTS:
 
98
 
 
99
    void slotParsed(const QList<HotPixel>&);
 
100
 
 
101
private:
 
102
 
 
103
    // Data contained within each listview item
 
104
    QImage                m_thumb;
 
105
    QImage                m_image;
 
106
 
 
107
    QSize                 m_imageSize;
 
108
 
 
109
    QList<HotPixel>       m_hotPixels;
 
110
 
 
111
    QString               m_blackFrameDesc;
 
112
 
 
113
    KUrl                  m_blackFrameURL;
 
114
 
 
115
    BlackFrameParser*     m_parser;
 
116
 
 
117
    BlackFrameListView*   m_parent;
 
118
};
 
119
 
 
120
}  // namespace DigikamEnhanceImagePlugin
 
121
 
 
122
#endif  // BLACKFRAMELISTVIEW_H