|
swift
|
Value object encapsulating information of a location, kind of simplified CValueObject compliant version of QUrl. More...
#include <url.h>
Public Types | |
| enum | ColumnIndex { IndexScheme = CPropertyIndexRef::GlobalIndexCUrl , IndexHost , IndexPort , IndexPath , IndexQuery } |
| Properties by index. More... | |
| Public Types inherited from swift::misc::CValueObject< CUrl > | |
| using | base_type |
| Base class. | |
| Public Types inherited from swift::misc::CEmpty | |
| using | base_type = CEmpty |
| Base class is alias of itself. | |
| Public Types inherited from swift::misc::mixin::Index< CUrl > | |
| enum | ColumnIndex |
| Base class enums. More... | |
Public Member Functions | |
| CUrl (const QString &fullUrl=QString()) | |
| Default constructor. | |
| CUrl (const char *url) | |
| Construct from character array. | |
| CUrl (const QUrl &url) | |
| By QUrl. | |
| CUrl (const QString &address, int port) | |
| Constructor. | |
| CUrl (const QString &scheme, const QString &address, int port, const QString &path) | |
| Constructor. | |
| const QString & | getHost () const |
| Get host. | |
| void | setHost (const QString &address) |
| Set address (e.g. myserver.foo.com). | |
| const QString & | getScheme () const |
| Get protocl. | |
| void | setScheme (const QString &protocol) |
| Set protocol. | |
| bool | hasScheme () const |
| Protocol. | |
| const QString & | getPath () const |
| Get path. | |
| void | setPath (const QString &path) |
| Set path. | |
| QString | appendPath (const QString &pathToAppend) |
| Append path. | |
| bool | hasPath () const |
| Has path? | |
| int | getPort () const |
| Get port. | |
| void | setPort (int port) |
| Set port. | |
| bool | hasPort () const |
| Port? | |
| bool | hasDefaultPort () const |
| Default port. | |
| QString | getQuery () const |
| Get query part. | |
| void | setQuery (const QString &query) |
| Set query. | |
| bool | hasQuery () const |
| Query string? | |
| void | appendQuery (const QString &queryToAppend) |
| Append query. | |
| void | appendQuery (const QString &key, const QString &value) |
| Append query. | |
| bool | hasFragment () const |
| Fragment string? | |
| void | setFragment (const QString &fragment) |
| Set fragment. | |
| bool | isEmpty () const |
| Empty. | |
| QString | getFullUrl (bool withQuery=true) const |
| Qualified name. | |
| void | setFullUrl (const QString &fullUrl) |
| Set full URL. | |
| QString | getFileName () const |
| File name. | |
| QUrl | toQUrl () const |
| To QUrl. | |
| void | setQUrl (const QUrl &url) |
| To QUrl. | |
| QNetworkRequest | toNetworkRequest () const |
| To request. | |
| CUrl | withAppendedPath (const QString &path) const |
| Append path. | |
| CUrl | withAppendedQuery (const QString &query) const |
| Append path. | |
| CUrl | withSwitchedScheme (const QString &protocol, int port) const |
| Switch protocol. | |
| bool | pathEndsWith (const QString &ending, Qt::CaseSensitivity cs=Qt::CaseInsensitive) const |
| Path ending with? | |
| bool | isFile () const |
| A path ends with "/", and file is anythingy beyond that, e.g. "path/file". | |
| bool | isFileWithSuffix (const QString &suffix={}) const |
| Stricter version of isFile(). | |
| QString | getFileSuffix () const |
| File appendix if any, otherwise empty, does not include the ".". | |
| QString | getFileSuffixPlusDot () const |
| Suffix plus dot. | |
| bool | isHavingHtmlSuffix () const |
| Likely a HTM file? | |
| bool | isExecutableFile () const |
| Executable file (decided by appendix). | |
| bool | isSwiftInstaller () const |
| swift installer | |
| QVariant | propertyByIndex (swift::misc::CPropertyIndexRef index) const |
| Property by index. | |
| void | setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| operator QUrl () const | |
| Convert to QUrl. | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CUrl > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CUrl > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CUrl > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CUrl > | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
| Convenience function JSON as string. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| Public Member Functions inherited from swift::misc::mixin::String< CUrl > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
| Public Member Functions inherited from swift::misc::mixin::Index< CUrl > | |
| CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
| Update by variant map. | |
| void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
| Set property by index. | |
| QVariant | propertyByIndex (CPropertyIndexRef index) const |
| Property by index. | |
| int | comparePropertyByIndex (CPropertyIndexRef index, const CUrl &compareValue) const |
| Compare for index. | |
| bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
| Is given variant equal to value of property index? | |
| Public Member Functions inherited from swift::misc::mixin::Icon< CUrl > | |
| CIcons::CIcons::StandardIconUnknown16 | toIcon () const |
| As icon, not implemented by all classes. | |
Static Public Member Functions | |
| static int | protocolToDefaultPort (const QString &protocol) |
| Protocol to default port. | |
| static bool | isDefaultPort (const QString &protocol, int port) |
| Default port for given protocol. | |
| static CUrl | fromLocalFile (const QString &localFile) |
| From local file path. | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CUrl > | |
| static void | registerMetadata () |
| Register metadata. | |
| Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CUrl > | |
| static DerivedObj | fromJson (const QJsonObject &json) |
| Get object from QJsonObject. | |
| static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
| Get object from JSON string. | |
Additional Inherited Members | |
| Protected Member Functions inherited from swift::misc::CValueObject< CUrl > | |
| CEmpty ()=default | |
| Inheriting constructors. | |
| CEmpty (const CEmpty &)=default | |
| Inheriting constructors. | |
| CValueObject ()=default | |
| Default constructor. | |
| CValueObject & | operator= (const CValueObject &)=default |
| Copy assignment operator. | |
| ~CValueObject ()=default | |
| Destructor. | |
| Protected Member Functions inherited from swift::misc::CEmpty | |
| CEmpty ()=default | |
| Protected default constructor. | |
| CEmpty (const CEmpty &)=default | |
| Protected copy constructor. | |
| CEmpty & | operator= (const CEmpty &)=default |
| Protected copy assignment operator. | |
| ~CEmpty ()=default | |
| Non-virtual protected destructor. | |
Value object encapsulating information of a location, kind of simplified CValueObject compliant version of QUrl.
| swift::misc::network::CUrl::CUrl | ( | const char * | url | ) |
| swift::misc::network::CUrl::CUrl | ( | const QUrl & | url | ) |
| swift::misc::network::CUrl::CUrl | ( | const QString & | address, |
| int | port ) |
| void swift::misc::network::CUrl::appendQuery | ( | const QString & | queryToAppend | ) |
| void swift::misc::network::CUrl::convertFromJson | ( | const QJsonObject & | json | ) |
| QString swift::misc::network::CUrl::convertToQString | ( | bool | i18n = false | ) | const |
| QString swift::misc::network::CUrl::getFileName | ( | ) | const |
| QString swift::misc::network::CUrl::getFileSuffix | ( | ) | const |
File appendix if any, otherwise empty, does not include the ".".
| QString swift::misc::network::CUrl::getFileSuffixPlusDot | ( | ) | const |
| QString swift::misc::network::CUrl::getFullUrl | ( | bool | withQuery = true | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
| bool swift::misc::network::CUrl::hasDefaultPort | ( | ) | const |
| bool swift::misc::network::CUrl::hasFragment | ( | ) | const |
|
inline |
| bool swift::misc::network::CUrl::hasQuery | ( | ) | const |
|
inline |
|
static |
| bool swift::misc::network::CUrl::isExecutableFile | ( | ) | const |
| bool swift::misc::network::CUrl::isFile | ( | ) | const |
| bool swift::misc::network::CUrl::isFileWithSuffix | ( | const QString & | suffix = {} | ) | const |
| bool swift::misc::network::CUrl::isHavingHtmlSuffix | ( | ) | const |
| bool swift::misc::network::CUrl::isSwiftInstaller | ( | ) | const |
|
inline |
| bool swift::misc::network::CUrl::pathEndsWith | ( | const QString & | ending, |
| Qt::CaseSensitivity | cs = Qt::CaseInsensitive ) const |
| QVariant swift::misc::network::CUrl::propertyByIndex | ( | swift::misc::CPropertyIndexRef | index | ) | const |
|
static |
| void swift::misc::network::CUrl::setFragment | ( | const QString & | fragment | ) |
| void swift::misc::network::CUrl::setFullUrl | ( | const QString & | fullUrl | ) |
|
inline |
| void swift::misc::network::CUrl::setPath | ( | const QString & | path | ) |
|
inline |
| void swift::misc::network::CUrl::setPropertyByIndex | ( | swift::misc::CPropertyIndexRef | index, |
| const QVariant & | variant ) |
| void swift::misc::network::CUrl::setQuery | ( | const QString & | query | ) |
| void swift::misc::network::CUrl::setQUrl | ( | const QUrl & | url | ) |
| void swift::misc::network::CUrl::setScheme | ( | const QString & | protocol | ) |
| QJsonObject swift::misc::network::CUrl::toJson | ( | ) | const |
| QNetworkRequest swift::misc::network::CUrl::toNetworkRequest | ( | ) | const |