~ubuntu-branches/debian/sid/libmediawiki/sid

« back to all changes in this revision

Viewing changes to src/imageinfo.h

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2017-11-05 21:15:29 UTC
  • Revision ID: package-import@ubuntu.com-20171105211529-bgfi385yv79030cf
Tags: upstream-5.37.0
ImportĀ upstreamĀ versionĀ 5.37.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** ===========================================================
 
2
 * @file
 
3
 *
 
4
 * This file is a part of KDE project
 
5
 * <a href="https://projects.kde.org/projects/extragear/libs/libmediawiki">libmediawiki</a>
 
6
 *
 
7
 * @date   2011-03-22
 
8
 * @brief  a MediaWiki C++ interface for KDE
 
9
 *
 
10
 * @author Copyright (C) 2011-2012 by Gilles Caulier
 
11
 *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
 
12
 * @author Copyright (C) 2010 by Ludovic Delfau
 
13
 *         <a href="mailto:ludovicdelfau at gmail dot com">ludovicdelfau at gmail dot com</a>
 
14
 *
 
15
 * This program is free software; you can redistribute it
 
16
 * and/or modify it under the terms of the GNU General
 
17
 * Public License as published by the Free Software Foundation;
 
18
 * either version 2, or (at your option)
 
19
 * any later version.
 
20
 *
 
21
 * This program is distributed in the hope that it will be useful,
 
22
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
23
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
24
 * GNU General Public License for more details.
 
25
 *
 
26
 * ============================================================ */
 
27
 
 
28
#ifndef MEDIAWIKI_IMAGEINFO_H
 
29
#define MEDIAWIKI_IMAGEINFO_H
 
30
 
 
31
// Qt includes
 
32
 
 
33
#include <QtCore/QDateTime>
 
34
#include <QtCore/QHash>
 
35
#include <QtCore/QString>
 
36
#include <QtCore/QUrl>
 
37
#include <QtCore/QVariant>
 
38
 
 
39
// Local includes
 
40
 
 
41
#include "mediawiki_export.h"
 
42
 
 
43
namespace mediawiki
 
44
{
 
45
 
 
46
/**
 
47
 * @brief An image info.
 
48
 */
 
49
class MEDIAWIKI_EXPORT Imageinfo
 
50
{
 
51
public:
 
52
 
 
53
    /**
 
54
     * @brief Constructs an image info.
 
55
     */
 
56
    Imageinfo();
 
57
 
 
58
    /**
 
59
     * @brief Constructs an image info from an other image info.
 
60
     * @param other an other image info
 
61
     */
 
62
    Imageinfo(const Imageinfo& other);
 
63
 
 
64
    /**
 
65
     * @brief Destructs an image info.
 
66
     */
 
67
    ~Imageinfo();
 
68
 
 
69
    /**
 
70
     * @brief Assingning an image info from an other image info.
 
71
     * @param other an other image info
 
72
     */
 
73
    Imageinfo& operator=(Imageinfo other);
 
74
 
 
75
    /**
 
76
     * @brief Returns true if this instance and other are equal, else false.
 
77
     * @param other instance to compare
 
78
     * @return true if there are equal, else false
 
79
     */
 
80
    bool operator==(const Imageinfo& other) const;
 
81
 
 
82
    /**
 
83
     * @brief Get the time and date of the revision.
 
84
     * @return the time and date of the revision
 
85
     */
 
86
    QDateTime timestamp() const;
 
87
 
 
88
    /**
 
89
     * @brief Set the time and date of the revision.
 
90
     * @param timestamp the time and date of the revision
 
91
     */
 
92
    void setTimestamp(const QDateTime& timestamp);
 
93
 
 
94
    /**
 
95
     * @brief Get the user who made the revision.
 
96
     * @return the user who made the revision
 
97
     */
 
98
    QString user() const;
 
99
 
 
100
    /**
 
101
     * @brief Set the user who made the revision.
 
102
     * @param user the user who made the revision
 
103
     */
 
104
    void setUser(const QString& user);
 
105
 
 
106
    /**
 
107
     * @brief Get the edit comment.
 
108
     * @return the edit comment
 
109
     */
 
110
    QString comment() const;
 
111
 
 
112
    /**
 
113
     * @brief Set the edit comment.
 
114
     * @param comment the edit comment
 
115
     */
 
116
    void setComment(const QString& comment);
 
117
 
 
118
    /**
 
119
     * @brief Get the URL of the image.
 
120
     * @return the URL of the image
 
121
     */
 
122
    QUrl url() const;
 
123
 
 
124
    /**
 
125
     * @brief Set the URL of the image.
 
126
     * @param url the URL of the image
 
127
     */
 
128
    void setUrl(const QUrl& url);
 
129
 
 
130
    /**
 
131
     * @brief Get the description URL of the image.
 
132
     * @return the description URL of the image
 
133
     */
 
134
    QUrl descriptionUrl() const;
 
135
 
 
136
    /**
 
137
     * @brief Set the description URL of the image.
 
138
     * @param descriptionUrl the description URL of the image
 
139
     */
 
140
    void setDescriptionUrl(const QUrl& descriptionUrl);
 
141
 
 
142
    /**
 
143
     * @brief Get the thumb URL of the image.
 
144
     * @return the thumb URL of the image
 
145
     */
 
146
    QUrl thumbUrl() const;
 
147
 
 
148
    /**
 
149
     * @brief Get the thumb URL of the image.
 
150
     * @param thumbUrl the thumb URL of the image
 
151
     */
 
152
    void setThumbUrl(const QUrl& thumbUrl);
 
153
 
 
154
    /**
 
155
     * @brief Get the thumb width of the image.
 
156
     * @return the thumb width of the image
 
157
     */
 
158
    qint64 thumbWidth() const;
 
159
 
 
160
    /**
 
161
     * @brief Set the thumb width of the image.
 
162
     * @param thumbWidth the thumb width of the image
 
163
     */
 
164
    void setThumbWidth(qint64 thumbWidth);
 
165
 
 
166
    /**
 
167
     * @brief Get the thumb height of the image.
 
168
     * @return the thumb height of the image
 
169
     */
 
170
    qint64 thumbHeight() const;
 
171
 
 
172
    /**
 
173
     * @brief Set the thumb height of the image.
 
174
     * @param thumbHeight the thumb height of the image
 
175
     */
 
176
    void setThumbHeight(qint64 thumbHeight);
 
177
 
 
178
    /**
 
179
     * @brief Get the image's size in bytes.
 
180
     * @return the image's size in bytes
 
181
     */
 
182
    qint64 size() const;
 
183
 
 
184
    /**
 
185
     * @brief Set the image's size in bytes.
 
186
     * @param size the image's size in bytes
 
187
     */
 
188
    void setSize(qint64 size);
 
189
 
 
190
    /**
 
191
     * @brief Get the image's width.
 
192
     * @return the image's width
 
193
     */
 
194
    qint64 width() const;
 
195
 
 
196
    /**
 
197
     * @brief Set the image's width.
 
198
     * @param width the image's width
 
199
     */
 
200
    void setWidth(qint64 width);
 
201
 
 
202
    /**
 
203
     * @brief Get the image's height.
 
204
     * @return the image's height
 
205
     */
 
206
    qint64 height() const;
 
207
 
 
208
    /**
 
209
     * @brief Set the image's height.
 
210
     * @param height the image's height
 
211
     */
 
212
    void setHeight(qint64 height);
 
213
 
 
214
    /**
 
215
     * @brief Get the image's SHA-1 hash.
 
216
     * @return the image's SHA-1 hash
 
217
     */
 
218
    QString sha1() const;
 
219
 
 
220
    /**
 
221
     * @brief Set the image's SHA-1 hash.
 
222
     * @param sha1 the image's SHA-1 hash
 
223
     */
 
224
    void setSha1(const QString& sha1);
 
225
 
 
226
    /**
 
227
     * @brief Get the image's MIME type.
 
228
     * @return the image's MIME type
 
229
     */
 
230
    QString mime() const;
 
231
 
 
232
    /**
 
233
     * @brief Set the image's MIME type.
 
234
     * @param mime the image's MIME type
 
235
     */
 
236
    void setMime(const QString& mime);
 
237
 
 
238
    /**
 
239
     * @brief Get image metadata.
 
240
     * @return image metadata
 
241
     */
 
242
    const QHash<QString, QVariant>& metadata() const;
 
243
 
 
244
    /**
 
245
     * @brief Get image metadata.
 
246
     * @return image metadata
 
247
     */
 
248
    QHash<QString, QVariant>& metadata();
 
249
 
 
250
    /**
 
251
     * @brief Set image metadata.
 
252
     * @param metadata image metadata
 
253
     */
 
254
     void setMetadata(const QHash<QString, QVariant>& metadata);
 
255
 
 
256
private:
 
257
 
 
258
    class ImageinfoPrivate;
 
259
    ImageinfoPrivate* const d;
 
260
};
 
261
 
 
262
} // namespace mediawiki
 
263
 
 
264
#endif // MEDIAWIKI_IMAGEINFO_H