libglom-1.26: Glom::HasTitleSingular Class Reference

libglom-1.26 1.28.5

- Main Page
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
Glom::HasTitleSingular Class Reference

HasTitleSingular instances may have a (translated) singular form of their title. More...

Inheritance diagram for Glom::HasTitleSingular:
[legend]
Collaboration diagram for Glom::HasTitleSingular:
[legend]

## Public Member Functions
| HasTitleSingular ()
| HasTitleSingular (const HasTitleSingular& src)
virtual | ~HasTitleSingular ()
HasTitleSingular& | operator= (const HasTitleSingular& src)
bool | operator== (const HasTitleSingular& src) const
bool | operator!= (const HasTitleSingular& src) const
Glib::ustring | get_title_singular (const Glib::ustring& locale) const
| Get the (translation of the) singular form of the title, in the current locale, if specified. More...
Glib::ustring | get_title_singular_original () const
| Get the title's original (non-translated, usually English) text. More...
Glib::ustring | get_title_singular_with_fallback (const Glib::ustring& locale) const
| Get the (translation of the) singular form of the title, in the current locale, if specified, falling back to the non-singular title, and then falling back to the table name. More...
void | set_title_singular (const Glib::ustring& title, const Glib::ustring& locale)
| Set the singular title's translation for the current locale. More...

## Public Attributes
sharedptr< TranslatableItem > | m_title_singular
| For instance, "Customer" if the table is titled "Customers". More...

## Detailed Description

HasTitleSingular instances may have a (translated) singular form of their title.

For instance, "Album" instead of "Albums". This is useful in some generated UI strings.

## Constructor & Destructor Documentation

Glom::HasTitleSingular::HasTitleSingular | ( |  | ) |

Glom::HasTitleSingular::HasTitleSingular | ( | const HasTitleSingular& | src | ) |

virtual Glom::HasTitleSingular::~HasTitleSingular | ( |  | ) |
| virtual

## Member Function Documentation

Glib::ustring Glom::HasTitleSingular::get_title_singular | ( | const Glib::ustring & | locale | ) | const

Get the (translation of the) singular form of the title, in the current locale, if specified.

Glib::ustring Glom::HasTitleSingular::get_title_singular_original | ( |  | ) | const

Get the title's original (non-translated, usually English) text.

Glib::ustring Glom::HasTitleSingular::get_title_singular_with_fallback | ( | const Glib::ustring & | locale | ) | const

Get the (translation of the) singular form of the title, in the current locale, if specified, falling back to the non-singular title, and then falling back to the table name.

bool Glom::HasTitleSingular::operator!= | ( | const HasTitleSingular& | src | ) | const

HasTitleSingular& Glom::HasTitleSingular::operator= | ( | const HasTitleSingular& | src | ) |

bool Glom::HasTitleSingular::operator== | ( | const HasTitleSingular& | src | ) | const

void Glom::HasTitleSingular::set_title_singular | ( | const Glib::ustring & | title,
|  | const Glib::ustring & | locale
| ) |  |

Set the singular title's translation for the current locale.

## Member Data Documentation

sharedptr<TranslatableItem> Glom::HasTitleSingular::m_title_singular

For instance, "Customer" if the table is titled "Customers".

This is useful in some UI strings.

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

- libglom/data_structure/has_title_singular.h