Provides support for unique identificators. More...
#include <uniqueid.h>
Public Member Functions | |
| UniqueId (const QString &s_name) | |
| create a new codes provider or load an existing one | |
| ~UniqueId () | |
| destructor | |
| QString | name (ID id) |
| get the string associated with an identifier | |
| ID | value (const QString &s_name) |
| get the id associated with a name | |
| void | insert (ID id, const QString &s_name) |
| insert a new ID or update the string associated with one | |
| ID | addNew (const QString &s_name=QString()) |
| allocate a new unique id and assigne provided description | |
| ID | checkAdd (const QString &s_name) |
| check if provided description exists; create a new one if not | |
| void | checkAdd (ID id, const QString &s_name) |
| check if provided description exists; set this one if not | |
| bool | save (QSettings &stg) const |
| save the list of values and strings | |
| bool | load (QSettings &stg) |
| load the list of values and strings; current content is wiped out | |
| bool | operator== (const UniqueId &other) const |
| tell if two classes are equal | |
| QString | createName (const QString &s_pattern) |
| generate an unique name based on a pattern | |
| QList< ID > | ids (void) const |
| allocated keys | |
| bool | isAssigned (ID id) const |
| tell if an ID is assigned | |
Provides support for unique identificators.
| ID UniqueId::value | ( | const QString & | s_name | ) |
get the id associated with a name
| s_name | the string to search (case sensitive) |