KProperty

KPropertyComposedUrl.h
1 /* This file is part of the KDE project
2  Copyright (C) 2018 Jarosław Staniek <[email protected]>
3  Copyright (C) 2018 Dmitry Baryshev <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KPROPERTYCOMPOSEDURL_H
22 #define KPROPERTYCOMPOSEDURL_H
23 
24 #include "kpropertycore_export.h"
25 
26 #include <QDebug>
27 #include <QMetaType>
28 #include <QUrl>
29 
35 class KPROPERTYCORE_EXPORT KPropertyComposedUrl
36 {
37 public:
42 
50  KPropertyComposedUrl(const QUrl &baseUrl, const QString &relativePath = QString());
51 
63  KPropertyComposedUrl(const QUrl &baseUrl, const QUrl &absoluteUrl);
64 
69 
71 
75  KPropertyComposedUrl &operator=(const KPropertyComposedUrl &other);
76 
83  bool operator==(const KPropertyComposedUrl &other) const;
84 
88  bool operator!=(const KPropertyComposedUrl &other) const { return !operator==(other); }
89 
98  QUrl value() const;
99 
103  QUrl baseUrl() const;
104 
111  void setBaseUrl(const QUrl &url);
112 
119  QUrl absoluteUrl() const;
120 
127  void setAbsoluteUrl(const QUrl &absoluteUrl);
128 
136  QString relativePath() const;
137 
144  void setRelativePath(const QString &relativePath);
145 
152  bool isValid() const;
153 
154 private:
155  class Private;
156  Private *const d;
157 };
158 
159 Q_DECLARE_METATYPE(KPropertyComposedUrl)
160 
161 KPROPERTYCORE_EXPORT QDebug operator<<(QDebug dbg, const KPropertyComposedUrl &p);
163 
164 #endif // KPROPERTYCOMPOSEDURL_H
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
bool operator!=(const KPropertyComposedUrl &other) const
Return true if this KPropertyComposedUrl does not equal to other.
A data structure that composes absolute and relative URLs.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 9 2020 23:10:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.