KParts

openurlarguments.cpp
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 1999 Simon Hausmann <[email protected]>
4  SPDX-FileCopyrightText: 1999-2005 David Faure <[email protected]>
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;
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 
43 {
44  return d->reload;
45 }
46 
48 {
49  d->reload = b;
50 }
51 
53 {
54  return d->xOffset;
55 }
56 
57 void KParts::OpenUrlArguments::setXOffset(int x)
58 {
59  d->xOffset = x;
60 }
61 
63 {
64  return d->yOffset;
65 }
66 
67 void KParts::OpenUrlArguments::setYOffset(int y)
68 {
69  d->yOffset = y;
70 }
71 
73 {
74  return d->mimeType;
75 }
76 
77 void KParts::OpenUrlArguments::setMimeType(const QString &mime)
78 {
79  d->mimeType = mime;
80 }
81 
83 {
84  return d->metaData;
85 }
86 
88 {
89  return d->metaData;
90 }
91 
93 {
94  return d->actionRequestedByUser;
95 }
96 
97 void KParts::OpenUrlArguments::setActionRequestedByUser(bool userRequested)
98 {
99  d->actionRequestedByUser = userRequested;
100 }
void setReload(bool b)
Indicates that the url should be loaded from the network even if it matches the current url of the pa...
const QList< QKeySequence > & reload()
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
KCALUTILS_EXPORT QString mimeType()
int yOffset() const
yOffset is the vertical scrolling of the part's widget (in case it's a scrollview).
QMap< QString, QString > & metaData()
Meta-data to associate with the KIO operation that will be used to open the URL.
bool actionRequestedByUser() const
True if the user requested that the URL be opened.
int xOffset() const
xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview).
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 9 2022 03:51:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.