1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the Qt 3 compatibility classes of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
33
#include "QtCore/qstring.h"
40
class Q_COMPAT_EXPORT Q3Url
44
Q3Url( const QString& url );
45
Q3Url( const Q3Url& url );
46
Q3Url( const Q3Url& url, const QString& relUrl, bool checkSlash = false );
49
QString protocol() const;
50
virtual void setProtocol( const QString& protocol );
53
virtual void setUser( const QString& user );
56
QString password() const;
57
virtual void setPassword( const QString& pass );
58
bool hasPassword() const;
61
virtual void setHost( const QString& user );
65
virtual void setPort( int port );
68
QString path( bool correct = true ) const;
69
virtual void setPath( const QString& path );
72
virtual void setEncodedPathAndQuery( const QString& enc );
73
QString encodedPathAndQuery();
75
virtual void setQuery( const QString& txt );
76
QString query() const;
79
virtual void setRef( const QString& txt );
83
bool isLocalFile() const;
85
virtual void addPath( const QString& path );
86
virtual void setFileName( const QString& txt );
88
QString fileName() const;
89
QString dirPath() const;
91
Q3Url& operator=( const Q3Url& url );
92
Q3Url& operator=( const QString& url );
94
bool operator==( const Q3Url& url ) const;
95
bool operator==( const QString& url ) const;
97
static void decode( QString& url );
98
static void encode( QString& url );
100
operator QString() const;
101
virtual QString toString( bool encodedPath = false, bool forcePrependProtocol = true ) const;
105
static bool isRelativeUrl( const QString &url );
108
virtual void reset();
109
virtual bool parse( const QString& url );