summaryrefslogtreecommitdiffstats
path: root/src/imageplugins/hotpixels/blackframelistview.h
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-11-22 18:41:30 +0900
committerMichele Calgaro <[email protected]>2024-11-22 18:41:30 +0900
commitee0d99607c14cb63d3ebdb3a970b508949fa8219 (patch)
tree94ac1efedb94cb38bf6879ba0610fe75b554216b /src/imageplugins/hotpixels/blackframelistview.h
parent4adff739380e4ae9f30e443ee95644f184456869 (diff)
downloaddigikam-ee0d99607c14cb63d3ebdb3a970b508949fa8219.tar.gz
digikam-ee0d99607c14cb63d3ebdb3a970b508949fa8219.zip
Rename 'digikam' folder to 'src'
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/imageplugins/hotpixels/blackframelistview.h')
-rw-r--r--src/imageplugins/hotpixels/blackframelistview.h127
1 files changed, 127 insertions, 0 deletions
diff --git a/src/imageplugins/hotpixels/blackframelistview.h b/src/imageplugins/hotpixels/blackframelistview.h
new file mode 100644
index 00000000..977d226d
--- /dev/null
+++ b/src/imageplugins/hotpixels/blackframelistview.h
@@ -0,0 +1,127 @@
+/* ============================================================
+ *
+ * This file is a part of digiKam project
+ * http://www.digikam.org
+ *
+ * Date : 2005-07-05
+ * Description : a ListView to display black frames
+ *
+ * Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2005-2006 by Unai Garro <ugarro at users dot sourceforge dot net>
+ *
+ * This program is free software; you can redistribute it
+ * and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation;
+ * either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * ============================================================ */
+
+#ifndef BLACKFRAMELISTVIEW_H
+#define BLACKFRAMELISTVIEW_H
+
+// TQt includes.
+
+#include <tqimage.h>
+#include <tqstring.h>
+#include <tqsize.h>
+#include <tqpoint.h>
+#include <tqvaluelist.h>
+#include <tqlistview.h>
+
+// KDE includes.
+
+#include <kurl.h>
+#include <tdelocale.h>
+
+// Local includes.
+
+#include "blackframeparser.h"
+#include "hotpixel.h"
+
+namespace DigikamHotPixelsImagesPlugin
+{
+
+class BlackFrameListView : public TQListView
+{
+ TQ_OBJECT
+
+
+public:
+
+ BlackFrameListView(TQWidget* parent=0);
+ ~BlackFrameListView(){};
+
+signals:
+
+ void blackFrameSelected(TQValueList<HotPixel>, const KURL&);
+
+private slots:
+
+ void slotParsed(TQValueList<HotPixel> hotPixels, const KURL& blackFrameURL)
+ {
+ emit blackFrameSelected(hotPixels, blackFrameURL);
+ };
+};
+
+// --------------------------------------------------------------------------
+
+class BlackFrameListViewItem : public TQObject, TQListViewItem
+{
+TQ_OBJECT
+
+
+public:
+
+ BlackFrameListViewItem(BlackFrameListView* parent, const KURL &url);
+ ~BlackFrameListViewItem(){};
+
+ virtual TQString text(int column)const;
+ virtual void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
+ virtual int width(const TQFontMetrics& fm, const TQListView* lv, int c)const;
+
+signals:
+
+ void parsed(TQValueList<HotPixel>, const KURL&);
+ void signalLoadingProgress(float);
+ void signalLoadingComplete();
+
+protected:
+
+ void activate();
+
+private:
+
+ TQPixmap thumb(const TQSize& size);
+
+private slots:
+
+ void slotParsed(TQValueList<HotPixel>);
+
+private:
+
+ // Data contained within each listview item
+ TQImage m_thumb;
+ TQImage m_image;
+
+ TQSize m_imageSize;
+
+ TQValueList <HotPixel> m_hotPixels;
+
+ TQString m_blackFrameDesc;
+
+ KURL m_blackFrameURL;
+
+ BlackFrameParser *m_parser;
+
+ BlackFrameListView *m_parent;
+};
+
+} // NameSpace DigikamHotPixelsImagesPlugin
+
+#endif // BLACKFRAMELISTVIEW_H