1 | /* |
---|---|
2 | This file is part of the KDE project |
3 | SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org> |
4 | SPDX-FileCopyrightText: 1999-2005 David Faure <faure@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.0-or-later |
7 | */ |
8 | |
9 | #include "openurlarguments.h" |
10 | |
11 | class KParts::OpenUrlArgumentsPrivate : public QSharedData |
12 | { |
13 | public: |
14 | bool reload = false; |
15 | bool actionRequestedByUser = true; |
16 | int xOffset = 0; |
17 | int yOffset = 0; |
18 | QString mimeType; |
19 | QMap<QString, QString> metaData; |
20 | }; |
21 | |
22 | KParts::OpenUrlArguments::OpenUrlArguments() |
23 | : d(new OpenUrlArgumentsPrivate) |
24 | { |
25 | } |
26 | |
27 | KParts::OpenUrlArguments::OpenUrlArguments(const OpenUrlArguments &other) |
28 | : d(other.d) |
29 | { |
30 | } |
31 | |
32 | KParts::OpenUrlArguments &KParts::OpenUrlArguments::operator=(const OpenUrlArguments &other) |
33 | { |
34 | d = other.d; |
35 | return *this; |
36 | } |
37 | |
38 | KParts::OpenUrlArguments::~OpenUrlArguments() |
39 | { |
40 | } |
41 | |
42 | bool KParts::OpenUrlArguments::reload() const |
43 | { |
44 | return d->reload; |
45 | } |
46 | |
47 | void KParts::OpenUrlArguments::setReload(bool b) |
48 | { |
49 | d->reload = b; |
50 | } |
51 | |
52 | int KParts::OpenUrlArguments::xOffset() const |
53 | { |
54 | return d->xOffset; |
55 | } |
56 | |
57 | void KParts::OpenUrlArguments::setXOffset(int x) |
58 | { |
59 | d->xOffset = x; |
60 | } |
61 | |
62 | int KParts::OpenUrlArguments::yOffset() const |
63 | { |
64 | return d->yOffset; |
65 | } |
66 | |
67 | void KParts::OpenUrlArguments::setYOffset(int y) |
68 | { |
69 | d->yOffset = y; |
70 | } |
71 | |
72 | QString KParts::OpenUrlArguments::mimeType() const |
73 | { |
74 | return d->mimeType; |
75 | } |
76 | |
77 | void KParts::OpenUrlArguments::setMimeType(const QString &mime) |
78 | { |
79 | d->mimeType = mime; |
80 | } |
81 | |
82 | QMap<QString, QString> &KParts::OpenUrlArguments::metaData() |
83 | { |
84 | return d->metaData; |
85 | } |
86 | |
87 | const QMap<QString, QString> &KParts::OpenUrlArguments::metaData() const |
88 | { |
89 | return d->metaData; |
90 | } |
91 | |
92 | bool KParts::OpenUrlArguments::actionRequestedByUser() const |
93 | { |
94 | return d->actionRequestedByUser; |
95 | } |
96 | |
97 | void KParts::OpenUrlArguments::setActionRequestedByUser(bool userRequested) |
98 | { |
99 | d->actionRequestedByUser = userRequested; |
100 | } |
101 |