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

« back to all changes in this revision

Viewing changes to libs/dmetadata/captionvalues.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

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        : 2009-07-13
7
 
 * Description : caption values container
8
 
 *
9
 
 * Copyright (C) 2009-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
 
 *
11
 
 * This program is free software; you can redistribute it
12
 
 * and/or modify it under the terms of the GNU General
13
 
 * Public License as published by the Free Software Foundation;
14
 
 * either version 2, or (at your option)
15
 
 * any later version.
16
 
 *
17
 
 * This program is distributed in the hope that it will be useful,
18
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 
 * GNU General Public License for more details.
21
 
 *
22
 
 * ============================================================ */
23
 
 
24
 
#ifndef CAPTION_VALUES_H
25
 
#define CAPTION_VALUES_H
26
 
 
27
 
// Qt includes
28
 
 
29
 
#include <QMap>
30
 
#include <QString>
31
 
#include <QDateTime>
32
 
#include <QDebug>
33
 
 
34
 
// LibKExiv2 includes
35
 
 
36
 
#include <libkexiv2/kexiv2.h>
37
 
 
38
 
// Local includes
39
 
 
40
 
#include "digikam_export.h"
41
 
 
42
 
using namespace KExiv2Iface;
43
 
 
44
 
namespace Digikam
45
 
{
46
 
 
47
 
class DIGIKAM_EXPORT CaptionValues
48
 
{
49
 
public:
50
 
 
51
 
    CaptionValues();
52
 
    ~CaptionValues();
53
 
 
54
 
    bool operator==(const CaptionValues& val) const;
55
 
 
56
 
    QString   caption;
57
 
    QString   author;
58
 
    QDateTime date;
59
 
};
60
 
 
61
 
//! kDebug() stream operator. Writes values @a val to the debug output in a nicely formatted way.
62
 
DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const CaptionValues& val);
63
 
 
64
 
// --------------------------------------------------------------------
65
 
 
66
 
/** A map used to store a list of Alternative Language values + author and date properties
67
 
    The map key is the language code following RFC3066 notation
68
 
    (like "fr-FR" for French), and the CaptionsMap value all caption properties.
69
 
 */
70
 
class DIGIKAM_EXPORT CaptionsMap : public QMap<QString, CaptionValues>
71
 
{
72
 
public:
73
 
 
74
 
    CaptionsMap();
75
 
    ~CaptionsMap();
76
 
 
77
 
    void setData(const KExiv2::AltLangMap& comments,
78
 
                 const KExiv2::AltLangMap& authors,
79
 
                 const QString& commonAuthor,
80
 
                 const KExiv2::AltLangMap& dates);
81
 
 
82
 
    void fromAltLangMap(const KExiv2::AltLangMap& map);
83
 
    KExiv2::AltLangMap toAltLangMap() const;
84
 
 
85
 
    /** Sets the author for the comments in the specified languages.
86
 
     *  If commonAuthor is not null, it will be used to set the author of all comments
87
 
     *  for which the author is not specified in the map. */
88
 
    void setAuthorsList(const KExiv2::AltLangMap& map, const QString& commonAuthor = QString());
89
 
    KExiv2::AltLangMap authorsList() const;
90
 
 
91
 
    void setDatesList(const KExiv2::AltLangMap& map);
92
 
    KExiv2::AltLangMap datesList() const;
93
 
};
94
 
 
95
 
}  // namespace Digikam
96
 
 
97
 
Q_DECLARE_METATYPE(Digikam::CaptionValues)
98
 
Q_DECLARE_METATYPE(Digikam::CaptionsMap)
99
 
 
100
 
#endif // CAPTION_VALUES_H