chalk

#include <kis_id.h>

Public Member Functions

 KisID (const TQString &id, const TQString &name=TQString())
TQString id () const
TQString name () const

Friends

bool operator== (const KisID &v1, const KisID &v2)
bool operator!= (const KisID &v1, const KisID &v2)
bool operator< (const KisID &v1, const KisID &v2)
bool operator> (const KisID &v1, const KisID &v2)

Detailed Description

Chalk has a large number of extensible resources.

Think:

  • Brushes
  • Palettes
  • Patterns
  • Gradients
  • Color models
  • Filters
  • Composition operations
  • Paint operations
  • Tools
  • Docker tabs

and more...

Many of these resources are stored in KisGenericRegistry-based registries. If we store these resources with a descriptive string as a key use the same string in our UI, then our UI will not be localizable, because the identifications of particular resources will be stored in files, and those files need to be exchangeable.

So, instead we use and ID class that couples an identification string that will be the same across all languages, an i18n-able string that will be used in comboboxes and that has a fast equality operator to make it well suited for use as key in a registry map.

That last bit has not been solved yet.

Definition at line 57 of file kis_id.h.

Constructor & Destructor Documentation

◆ KisID() [1/2]

KisID::KisID ( )
inline

Definition at line 62 of file kis_id.h.

◆ KisID() [2/2]

KisID::KisID ( const TQString & id,
const TQString & name = TQString() )
inline

Definition at line 64 of file kis_id.h.

Member Function Documentation

◆ id()

TQString KisID::id ( ) const
inline

Definition at line 68 of file kis_id.h.

◆ name()

TQString KisID::name ( ) const
inline

Definition at line 69 of file kis_id.h.

◆ operator!=

bool operator!= ( const KisID & v1,
const KisID & v2 )
friend

Definition at line 88 of file kis_id.h.

◆ operator<

bool operator< ( const KisID & v1,
const KisID & v2 )
friend

Definition at line 94 of file kis_id.h.

◆ operator==

bool operator== ( const KisID & v1,
const KisID & v2 )
friend

Definition at line 83 of file kis_id.h.

◆ operator>

bool operator> ( const KisID & v1,
const KisID & v2 )
friend

Definition at line 100 of file kis_id.h.


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