KParts

openurlarguments.cpp
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
11class KParts::OpenUrlArgumentsPrivate : public QSharedData
12{
13public:
14 bool reload = false;
15 bool actionRequestedByUser = true;
16 int xOffset = 0;
17 int yOffset = 0;
18 QString mimeType;
20};
21
22KParts::OpenUrlArguments::OpenUrlArguments()
23 : d(new OpenUrlArgumentsPrivate)
24{
25}
26
27KParts::OpenUrlArguments::OpenUrlArguments(const OpenUrlArguments &other)
28 : d(other.d)
29{
30}
31
32KParts::OpenUrlArguments &KParts::OpenUrlArguments::operator=(const OpenUrlArguments &other)
33{
34 d = other.d;
35 return *this;
36}
37
38KParts::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
57void KParts::OpenUrlArguments::setXOffset(int x)
58{
59 d->xOffset = x;
60}
61
63{
64 return d->yOffset;
65}
66
67void KParts::OpenUrlArguments::setYOffset(int y)
68{
69 d->yOffset = y;
70}
71
73{
74 return d->mimeType;
75}
76
77void KParts::OpenUrlArguments::setMimeType(const QString &mime)
78{
79 d->mimeType = mime;
80}
81
86
88{
89 return d->metaData;
90}
91
93{
94 return d->actionRequestedByUser;
95}
96
97void KParts::OpenUrlArguments::setActionRequestedByUser(bool userRequested)
98{
99 d->actionRequestedByUser = userRequested;
100}
OpenUrlArguments is the set of arguments that specify how a URL should be opened by KParts::ReadOnlyP...
void setReload(bool b)
Indicates that the url should be loaded from the network even if it matches the current url of the pa...
int xOffset() const
xOffset is the horizontal scrolling of the part's widget (in case it's a scrollview).
QString mimeType() const
The mimetype to use when opening the url, when known by the calling application.
QMap< QString, QString > & metaData()
Meta-data to associate with the KIO operation that will be used to open the URL.
int yOffset() const
yOffset is the vertical scrolling of the part's widget (in case it's a scrollview).
bool actionRequestedByUser() const
True if the user requested that the URL be opened.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:54:49 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.