ServerPasswordSummary Class Reference

Public Member Functions

 ServerPasswordSummary (const Server *server, const QString &type)
 Builds ServerPasswordSummary out of provided data.
 
const QString & address () const
 
const QString & game () const
 
bool isValid () const
 
const QString & name () const
 
unsigned short port () const
 
QVariant serializeQVariant () const
 
const ServerSummaryserverSummary () const
 
void setServerSummary (const ServerSummary &val)
 
void setType (const QString &val)
 One of ServerPasswordType consts or custom.
 
float similarity (const ServerPasswordSummary &other) const
 Similarity to the 'other' server; between 0.0 and 1.0.
 
QDateTime time () const
 
const QString & type () const
 One of ServerPasswordType consts or custom.
 
const QString & typeWithCompatibility () const
 Returns type(), if type() is empty returns ServerPasswordType::CONNECT .
 

Static Public Member Functions

static ServerPasswordSummary deserializeQVariant (const QVariant &v)
 

Detailed Description

Definition at line 40 of file serverpasswordsummary.h.

Constructor & Destructor Documentation

ServerPasswordSummary::ServerPasswordSummary ( const Server server,
const QString &  type 
)

Builds ServerPasswordSummary out of provided data.

Parameters
serverData such as game or address are extracted from this object.
typePassword use-case type, either one of ServerPasswordType consts or custom.

Definition at line 47 of file serverpasswordsummary.cpp.

Member Function Documentation

void ServerPasswordSummary::setType ( const QString &  val)

One of ServerPasswordType consts or custom.

Definition at line 108 of file serverpasswordsummary.cpp.

float ServerPasswordSummary::similarity ( const ServerPasswordSummary other) const

Similarity to the 'other' server; between 0.0 and 1.0.

Similarity is calculated basing on serverSummary() and type().

Both servers must be valid.

Definition at line 113 of file serverpasswordsummary.cpp.

const QString & ServerPasswordSummary::type ( ) const

One of ServerPasswordType consts or custom.

Definition at line 129 of file serverpasswordsummary.cpp.

const QString & ServerPasswordSummary::typeWithCompatibility ( ) const

Returns type(), if type() is empty returns ServerPasswordType::CONNECT .

This provides compatibility with configuration stored by Doomseeker <=0.11.1

Definition at line 134 of file serverpasswordsummary.cpp.


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