// qurl.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtCore Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ModuleCode #include %End class QUrl { %TypeHeaderCode #include %End public: QUrl(); QUrl(const QString &url); QUrl(const QUrl ©); QUrl(const QString &url, QUrl::ParsingMode mode); ~QUrl(); enum FormattingOption { None, RemoveScheme, RemovePassword, RemoveUserInfo, RemovePort, RemoveAuthority, RemovePath, RemoveQuery, RemoveFragment, StripTrailingSlash, }; typedef QFlags FormattingOptions; enum ParsingMode { TolerantMode, StrictMode, }; void setUrl(const QString &url); void setUrl(const QString &url, QUrl::ParsingMode mode); void setEncodedUrl(const QByteArray &url); void setEncodedUrl(const QByteArray &url, QUrl::ParsingMode mode); bool isValid() const; bool isEmpty() const; void clear(); void setScheme(const QString &scheme); QString scheme() const; void setAuthority(const QString &authority); QString authority() const; void setUserInfo(const QString &userInfo); QString userInfo() const; void setUserName(const QString &userName); QString userName() const; void setPassword(const QString &password); QString password() const; void setHost(const QString &host); QString host() const; void setPort(int port); int port() const; int port(int defaultPort) const; void setPath(const QString &path); QString path() const; void setEncodedQuery(const QByteArray &query); QByteArray encodedQuery() const; void setQueryDelimiters(char valueDelimiter, char pairDelimiter); char queryValueDelimiter() const; char queryPairDelimiter() const; void setQueryItems(const QList > &query); void addQueryItem(const QString &key, const QString &value); QList > queryItems() const; bool hasQueryItem(const QString &key) const; QString queryItemValue(const QString &key) const; QStringList allQueryItemValues(const QString &key) const; void removeQueryItem(const QString &key); void removeAllQueryItems(const QString &key); void setFragment(const QString &fragment); QString fragment() const; QUrl resolved(const QUrl &relative) const; bool isRelative() const; bool isParentOf(const QUrl &url) const; static QUrl fromLocalFile(const QString &localfile); QString toLocalFile() const; QString toString(QFlags options = None) const; QByteArray toEncoded(QFlags options = None) const; static QUrl fromEncoded(const QByteArray &url); static QUrl fromEncoded(const QByteArray &url, QUrl::ParsingMode mode); void detach(); bool isDetached() const; bool operator<(const QUrl &url) const; bool operator==(const QUrl &url) const; bool operator!=(const QUrl &url) const; static QString fromPercentEncoding(const QByteArray &); static QByteArray toPercentEncoding(const QString &, const QByteArray &exclude = QByteArray(), const QByteArray &include = QByteArray()); static QString fromPunycode(const QByteArray &); static QByteArray toPunycode(const QString &); %If (Qt_4_2_0 -) bool hasQuery() const; %End %If (Qt_4_2_0 -) bool hasFragment() const; %End %If (Qt_4_2_0 -) QString errorString() const; %End %If (Qt_4_2_0 -) static QString fromAce(const QByteArray &); %End %If (Qt_4_2_0 -) static QByteArray toAce(const QString &); %End %If (Qt_4_2_0 -) static QStringList idnWhitelist(); %End %If (Qt_4_2_0 -) static void setIdnWhitelist(const QStringList &); %End }; QFlags operator|(QUrl::FormattingOption f1, QFlags f2); QFlags operator|(QUrl::FormattingOption f1, QUrl::FormattingOption f2); QDataStream &operator<<(QDataStream &, const QUrl & /Constrained/); QDataStream &operator>>(QDataStream &, QUrl & /Constrained/); %If (Qt_4_3_0 -) void qSwap(QUrl &value1, QUrl &value2); %End