accounts-qt 1.17

Public Member Functions | Friends | List of all members
Service Class Reference

Representation of an account service. More...

`#include <Accounts/Service>`

## Public Member Functions
| Service ()
| Construct an invalid service.
| Service (const Service &other)
| Copy constructor.
Service & | operator= (const Service &other)
bool | isValid () const
| Check whether this object represents a Service.
QString | name () const
| Get the name of the service.
QString | description () const
| Get the description of the service.
QString | displayName () const
| Get the display name of the service, untranslated.
QString | trCatalog () const
QString | serviceType () const
| Get the service type ID of the service.
QString | provider () const
| Get the provider ID of the service.
QString | iconName () const
| Get the icon name for this service.
bool | hasTag (const QString &tag) const
| Check if this service has a tag.
QSet< QString > | tags () const
| Return all tags of the service as a set.
const QDomDocument | domDocument () const
| Get the contents of the service XML file.

## Friends
bool | operator== (const Accounts::Service &s1, const Accounts::Service &s2)

## Detailed Description

Representation of an account service.

The Service object represents an account service. It can be used to retrieve some basic properties of the service (such as name, type and provider) and to get access to the contents of the XML file which defines it.

Definition at line 48 of file service.h.

## Constructor & Destructor Documentation

## ◆ Service() [1/2]

Service | ( |  | ) |

Construct an invalid service.

Definition at line 59 of file service.cpp.

Referenced by Service().

## ◆ Service() [2/2]

Service | ( | const Service & | other | ) |

Copy constructor.

Copying a Service object is very cheap, because the data is shared among copies.

Definition at line 69 of file service.cpp.

References Service().

## ◆ ~Service()

~Service | ( |  | ) |

Definition at line 88 of file service.cpp.

## Member Function Documentation

## ◆ description()

QString description | ( |  | ) | const

Get the description of the service.

Returns
  The description of the service.

Definition at line 124 of file service.cpp.

## ◆ displayName()

QString displayName | ( |  | ) | const

Get the display name of the service, untranslated.

Returns
  The display name of the service.

Definition at line 133 of file service.cpp.

## ◆ domDocument()

const QDomDocument domDocument | ( |  | ) | const

Get the contents of the service XML file.

Returns
  The DOM of the whole XML service file

Definition at line 210 of file service.cpp.

## ◆ hasTag()

bool hasTag | ( | const QString & | tag | ) | const

Check if this service has a tag.

Parameters

  tag | Tag to look for

Returns
  Service has the tag?

Definition at line 180 of file service.cpp.

## ◆ iconName()

QString iconName | ( |  | ) | const

Get the icon name for this service.

Returns
  The icon name.

Definition at line 168 of file service.cpp.

## ◆ isValid()

bool isValid | ( |  | ) | const

Check whether this object represents a Service.

Returns
  true if the Service is a valid one.

Definition at line 104 of file service.cpp.

Referenced by name().

## ◆ name()

QString name | ( |  | ) | const

Get the name of the service.

This can be used as a unique identifier for this service.

Returns
  The unique name of the service.

Definition at line 114 of file service.cpp.

References isValid().

## ◆ operator=()

Service & operator= | ( | const Service & | other | ) |

Definition at line 77 of file service.cpp.

## ◆ provider()

QString provider | ( |  | ) | const

Get the provider ID of the service.

Returns
  The provider of the service.

Definition at line 159 of file service.cpp.

## ◆ serviceType()

QString serviceType | ( |  | ) | const

Get the service type ID of the service.

Returns
  The service type of the service.

Definition at line 142 of file service.cpp.

## ◆ tags()

QSet< QString > tags | ( |  | ) | const

Return all tags of the service as a set.

Returns
  Set of tags

Definition at line 190 of file service.cpp.

## ◆ trCatalog()

QString trCatalog | ( |  | ) | const

Returns
  The translation catalog of the service.

Definition at line 150 of file service.cpp.

## Friends And Related Symbol Documentation

## ◆ operator==

bool operator== | ( | const Accounts::Service & | s1,
|  | const Accounts::Service & | s2 )
| friend

Definition at line 70 of file service.h.

The documentation for this class was generated from the following files:

- Accounts/service.h
- Accounts/service.cpp