File indexing completed on 2025-01-05 03:53:35

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-03-22
0007  * Description : a Iface C++ interface
0008  *
0009  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2011      by Ludovic Delfau <ludovicdelfau at gmail dot com>
0011  * SPDX-FileCopyrightText: 2011      by Paolo de Vathaire <paolo dot devathaire at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #include "mediawiki_image.h"
0018 
0019 // C++ includes
0020 
0021 #include <algorithm>
0022 
0023 namespace MediaWiki
0024 {
0025 
0026 class Q_DECL_HIDDEN Image::Private
0027 {
0028 public:
0029 
0030     Private()
0031       : namespaceId(-1)
0032     {
0033     }
0034 
0035     qint64  namespaceId;
0036     QString title;
0037 };
0038 
0039 Image::Image()
0040     : d(new Private())
0041 {
0042 }
0043 
0044 Image::Image(const Image& other)
0045     : d(new Private(*(other.d)))
0046 {
0047 }
0048 
0049 Image::~Image()
0050 {
0051     delete d;
0052 }
0053 
0054 Image& Image::operator=(const Image& other)
0055 {
0056     *d = *other.d;
0057 
0058     return *this;
0059 }
0060 
0061 bool Image::operator==(const Image& other) const
0062 {
0063     return (
0064             (namespaceId() == other.namespaceId()) &&
0065             (title()       == other.title())
0066            );
0067 }
0068 
0069 qint64 Image::namespaceId() const
0070 {
0071     return d->namespaceId;
0072 }
0073 
0074 void Image::setNamespaceId(qint64 namespaceId)
0075 {
0076     d->namespaceId = namespaceId;
0077 }
0078 
0079 QString Image::title() const
0080 {
0081     return d->title;
0082 }
0083 
0084 void Image::setTitle(const QString& title)
0085 {
0086     d->title = title;
0087 }
0088 
0089 } // namespace MediaWiki