digiKam
hotpixelprops.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2005-03-27
7  * Description : HotPixel properties container.
8  *
9  * Copyright (C) 2005-2022 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 DIGIKAM_HOT_PIXEL_PROPS_H
26 #define DIGIKAM_HOT_PIXEL_PROPS_H
27 
28 // Qt includes
29 
30 #include <QRect>
31 #include <QList>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 namespace Digikam
38 {
39 
40 class DIGIKAM_EXPORT HotPixelProps
41 {
42 
43 public:
44 
45  QRect rect;
47 
48 public:
49 
50  int y() const;
51  int x() const;
52  int width() const;
53  int height() const;
54 
55  bool operator==(const HotPixelProps& p) const;
56 
57  // Helper methods to stream container data with string.
58  QString toString() const;
59  bool fromString(const QString& str);
60 
61 public:
62 
63  // Helper methods to stream list of containers data with string list.
64  static QStringList toStringList(const QList<HotPixelProps>& lst);
65  static QList<HotPixelProps> fromStringList(const QStringList& hplst);
66 
67 private:
68 
69  bool diagonal(const QRect& r1, const QRect& r2) const;
70 };
71 
72 } // namespace Digikam
73 
74 #endif // DIGIKAM_HOT_PIXEL_PROPS_H
Definition: hotpixelprops.h:41
int luminosity
Definition: hotpixelprops.h:46
QRect rect
Definition: hotpixelprops.h:45
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition: searchtextbar.cpp:49