1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2018-07-30
7  * Description : author data container for external plugin
8  *
9  * Copyright (C) 2018-2021 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 #include "dpluginauthor.h"
25 
26 // KDE includes
27 
28 #include <klocalizedstring.h>
29 
30 namespace Digikam
31 {
32 
DPluginAuthor(const QString & n,const QString & e,const QString & y)33 DPluginAuthor::DPluginAuthor(const QString& n,
34                              const QString& e,
35                              const QString& y)
36     : name(n),
37       email(e),
38       years(y),
39       roles(i18n("Developer"))
40 {
41 }
42 
DPluginAuthor(const QString & n,const QString & e,const QString & y,const QString & r)43 DPluginAuthor::DPluginAuthor(const QString& n,
44                              const QString& e,
45                              const QString& y,
46                              const QString& r)
47     : name(n),
48       email(e),
49       years(y),
50       roles(r)
51 {
52 }
53 
~DPluginAuthor()54 DPluginAuthor::~DPluginAuthor()
55 {
56 }
57 
toString() const58 QString DPluginAuthor::toString() const
59 {
60     return (QString::fromLatin1("%1 <%2> %3 [%4]").arg(name).arg(email).arg(years).arg(roles));
61 }
62 
63 } // namespace Digikam
64