File indexing completed on 2024-04-14 14:55:10

0001 /** ===========================================================
0002  * @file
0003  *
0004  * This file is a part of KDE project
0005  * <a href="https://commits.kde.org/libmediawiki">libmediawiki</a>
0006  *
0007  * @date   2011-03-22
0008  * @brief  a MediaWiki C++ interface for KDE
0009  *
0010  * @author Copyright (C) 2011-2012 by Gilles Caulier
0011  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
0012  * @author Copyright (C) 2010 by Ludovic Delfau
0013  *         <a href="mailto:ludovicdelfau at gmail dot com">ludovicdelfau at gmail dot com</a>
0014  * @author Copyright (C) 2010 by Paolo de Vathaire
0015  *         <a href="mailto:paolo dot devathaire at gmail dot com">paolo dot devathaire at gmail dot com</a>
0016  *
0017  * This program is free software; you can redistribute it
0018  * and/or modify it under the terms of the GNU General
0019  * Public License as published by the Free Software Foundation;
0020  * either version 2, or (at your option)
0021  * any later version.
0022  *
0023  * This program is distributed in the hope that it will be useful,
0024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0026  * GNU General Public License for more details.
0027  *
0028  * ============================================================ */
0029 
0030 #ifndef MEDIAWIKI_IMAGE_H
0031 #define MEDIAWIKI_IMAGE_H
0032 
0033 // Qt includes
0034 
0035 #include <QString>
0036 
0037 // Local includes
0038 
0039 #include "mediawiki_export.h"
0040 
0041 namespace mediawiki
0042 {
0043 
0044 /**
0045  * @brief A image.
0046  */
0047 class MEDIAWIKI_EXPORT Image
0048 {
0049 
0050 public:
0051 
0052     /**
0053      * @brief Constructs a image.
0054      */
0055     Image();
0056 
0057     /**
0058      * @brief Constructs an image from an other image.
0059      * @param other an other image
0060      */
0061     Image(const Image& other);
0062 
0063     /**
0064      * @brief Destructs an image.
0065      */
0066     ~Image();
0067 
0068     /**
0069      * @brief Assingning an image from an other image.
0070      * @param other an other image
0071      */
0072     Image& operator=(Image other);
0073 
0074     /**
0075      * @brief Returns true if this instance and other are equal, else false.
0076      * @param other instance to compare
0077      * @return true if there are equal, else false
0078      */
0079     bool operator==(const Image& other) const;
0080 
0081     /**
0082      * @brief Returns the namespace id of the image.
0083      * @return the namespace id of the image
0084      */
0085     qint64 namespaceId() const;
0086 
0087     /**
0088      * @brief Set the namespace id.
0089      * @param namespaceId the namespace id of the image
0090      */
0091     void setNamespaceId(qint64 namespaceId);
0092 
0093     /**
0094      * @brief Returns the title of the image.
0095      * @return the title of the image
0096      */
0097     QString title() const;
0098 
0099     /**
0100      * @brief Set the title.
0101      * @param title the title of the image
0102      */
0103     void setTitle(const QString& title);
0104 
0105 private:
0106 
0107     class ImagePrivate;
0108     ImagePrivate* const d;
0109 };
0110 
0111 } // namespace mediawiki
0112 
0113 #endif // MEDIAWIKI_IMAGE_H