• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • graphics API Reference
  • KDE Home
  • Contact Us
 

digikam

  • extragear
  • graphics
  • digikam
  • core
  • libs
  • metadataengine
  • containers
metadatainfo.cpp
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 : 2007-09-12
7  * Description : Metadata info containers
8  *
9  * Copyright (C) 2007-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2009-2019 by Gilles Caulier <caulier dot gilles at gmail dot com>
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 // Local includes
26 
27 #include "metadatainfo.h"
28 
29 namespace Digikam
30 {
31 
32 bool IptcCoreContactInfo::isNull() const
33 {
34  return city.isNull() &&
35  country.isNull() &&
36  address.isNull() &&
37  postalCode.isNull() &&
38  provinceState.isNull() &&
39  email.isNull() &&
40  phone.isNull() &&
41  webUrl.isNull();
42 }
43 
44 bool IptcCoreContactInfo::isEmpty() const
45 {
46  return city.isEmpty() &&
47  country.isEmpty() &&
48  address.isEmpty() &&
49  postalCode.isEmpty() &&
50  provinceState.isEmpty() &&
51  email.isEmpty() &&
52  phone.isEmpty() &&
53  webUrl.isEmpty();
54 }
55 
56 bool IptcCoreContactInfo::operator==(const IptcCoreContactInfo& t) const
57 {
58  bool b1 = city == t.city;
59  bool b2 = country == t.country;
60  bool b3 = address == t.address;
61  bool b4 = postalCode == t.postalCode;
62  bool b5 = provinceState == t.provinceState;
63  bool b6 = email == t.email;
64  bool b7 = phone == t.phone;
65  bool b8 = webUrl == t.webUrl;
66 
67  return b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8;
68 }
69 
70 QDebug operator<<(QDebug dbg, const IptcCoreContactInfo& inf)
71 {
72  dbg.nospace() << "IptcCoreContactInfo::city: "
73  << inf.city << ", ";
74  dbg.nospace() << "IptcCoreContactInfo::country: "
75  << inf.country << ", ";
76  dbg.nospace() << "IptcCoreContactInfo::address: "
77  << inf.address << ", ";
78  dbg.nospace() << "IptcCoreContactInfo::postalCode: "
79  << inf.postalCode << ", ";
80  dbg.nospace() << "IptcCoreContactInfo::provinceState: "
81  << inf.provinceState << ", ";
82  dbg.nospace() << "IptcCoreContactInfo::email: "
83  << inf.email << ", ";
84  dbg.nospace() << "IptcCoreContactInfo::phone: "
85  << inf.phone << ", ";
86  dbg.nospace() << "IptcCoreContactInfo::webUrl: "
87  << inf.webUrl;
88  return dbg.space();
89 }
90 
91 // -------------------------------------------------------------------------
92 
93 bool IptcCoreLocationInfo::isEmpty() const
94 {
95  return country.isEmpty() &&
96  countryCode.isEmpty() &&
97  provinceState.isEmpty() &&
98  city.isEmpty() &&
99  location.isEmpty();
100 }
101 
102 bool IptcCoreLocationInfo::isNull() const
103 {
104  return country.isNull() &&
105  countryCode.isNull() &&
106  provinceState.isNull() &&
107  city.isNull() &&
108  location.isNull();
109 }
110 
111 bool IptcCoreLocationInfo::operator==(const IptcCoreLocationInfo& t) const
112 {
113  bool b1 = country == t.country;
114  bool b2 = countryCode == t.countryCode;
115  bool b3 = provinceState == t.provinceState;
116  bool b4 = city == t.city;
117  bool b5 = location == t.location;
118 
119  return b1 && b2 && b3 && b4 && b5;
120 }
121 
122 QDebug operator<<(QDebug dbg, const IptcCoreLocationInfo& inf)
123 {
124  dbg.nospace() << "IptcCoreLocationInfo::country: "
125  << inf.country << ", ";
126  dbg.nospace() << "IptcCoreLocationInfo::countryCode: "
127  << inf.countryCode << ", ";
128  dbg.nospace() << "IptcCoreLocationInfo::provinceState: "
129  << inf.provinceState << ", ";
130  dbg.nospace() << "IptcCoreLocationInfo::city: "
131  << inf.city << ", ";
132  dbg.nospace() << "IptcCoreLocationInfo::location: "
133  << inf.location;
134  return dbg.space();
135 }
136 
137 } // namespace Digikam
Digikam::IptcCoreContactInfo::postalCode
QString postalCode
Definition: metadatainfo.h:71
Digikam::IptcCoreLocationInfo::operator==
bool operator==(const IptcCoreLocationInfo &t) const
Definition: metadatainfo.cpp:111
Digikam::IptcCoreContactInfo::isNull
bool isNull() const
Definition: metadatainfo.cpp:32
Digikam::operator<<
QDebug operator<<(QDebug dbg, const DbEngineParameters &p)
Definition: dbengineparameters.cpp:796
QDebug::nospace
QDebug & nospace()
t
#define t
QString::isNull
bool isNull() const
Digikam::IptcCoreContactInfo::phone
QString phone
Definition: metadatainfo.h:74
Digikam::IptcCoreLocationInfo::provinceState
QString provinceState
Definition: metadatainfo.h:50
Digikam::IptcCoreContactInfo::provinceState
QString provinceState
Definition: metadatainfo.h:72
Digikam::IptcCoreContactInfo::address
QString address
Definition: metadatainfo.h:70
QString::isEmpty
bool isEmpty() const
Digikam::IptcCoreLocationInfo::isNull
bool isNull() const
Definition: metadatainfo.cpp:102
Digikam::IptcCoreContactInfo
Definition: metadatainfo.h:60
Digikam::IptcCoreContactInfo::operator==
bool operator==(const IptcCoreContactInfo &t) const
Definition: metadatainfo.cpp:56
Digikam::IptcCoreContactInfo::webUrl
QString webUrl
Definition: metadatainfo.h:75
Digikam::IptcCoreLocationInfo::isEmpty
bool isEmpty() const
Definition: metadatainfo.cpp:93
Digikam::IptcCoreLocationInfo::city
QString city
Definition: metadatainfo.h:51
QDebug::space
QDebug & space()
QDebug
Digikam::IptcCoreContactInfo::city
QString city
Definition: metadatainfo.h:68
Digikam::IptcCoreContactInfo::isEmpty
bool isEmpty() const
Definition: metadatainfo.cpp:44
Digikam::IptcCoreLocationInfo::country
QString country
Definition: metadatainfo.h:48
Digikam::IptcCoreContactInfo::country
QString country
Definition: metadatainfo.h:69
Digikam::IptcCoreLocationInfo::countryCode
QString countryCode
Definition: metadatainfo.h:49
Digikam::IptcCoreLocationInfo::location
QString location
Definition: metadatainfo.h:52
Digikam::IptcCoreLocationInfo
Definition: metadatainfo.h:40
Digikam::IptcCoreContactInfo::email
QString email
Definition: metadatainfo.h:73
metadatainfo.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Wed Dec 11 2019 07:34:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages
-->

graphics API Reference

Skip menu "graphics API Reference"
  • digikam
  • KDiagram
  •     KChart
  •     KGantt
  • KPhotoAlbum
  •   AndroidRemoteControl
  • Krita
  •   libs
  •     KritaBasicFlakes
  •     brush
  •     KritaUndo2
  •     KritaFlake
  •     image
  •     KritaPlugin
  •     Krita
  •     KritaOdf
  •     KritaPigment
  •     KritaStore
  •     ui
  •     KritaWidgets
  •     KritaWidgetUtils
  •   plugins
  •     Assitants
  •     Extensions
  •     Filters
  •         KritaText
  •         KritaTextLayout
  •     Generators
  •     Formats
  •             src
  •     PaintOps
  •       libpaintop
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal