libglom-1.20: Glom::LayoutItem_Field Class Reference

libglom-1.20 1.20.7

- Main Page
- Related Pages
- Namespaces
- Classes

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

Public Member Functions | Public Attributes
Glom::LayoutItem_Field Class Reference

A LayoutItem that shows the data from a table field. More...

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

List of all members.

## Public Member Functions
| LayoutItem_Field ()
| LayoutItem_Field (const LayoutItem_Field& src)
LayoutItem_Field& | operator= (const LayoutItem_Field& src)
virtual | ~LayoutItem_Field ()
virtual LayoutItem* | clone () const
| Create a new copied instance.
bool | operator== (const LayoutItem_Field& src) const
virtual void | set_name (const Glib::ustring& name)
| Set the non-user-visible name of the field.
virtual Glib::ustring | get_name () const
| Get the non-user-visible name of the field.
virtual Glib::ustring | get_title () const
| Get the user-visible title for the field, in the user's current locale.
virtual Glib::ustring | get_title_or_name () const
| Get the user-visible title for the field, in the user's current locale.
Glib::ustring | get_title_or_name_no_custom () const
sharedptr< const CustomTitle > | get_title_custom () const
sharedptr< CustomTitle > | get_title_custom ()
void | set_title_custom (const sharedptr< CustomTitle >& title)
virtual Glib::ustring | get_layout_display_name () const
| Get a text representation for the field, such as Relationship::FieldName.
virtual Glib::ustring | get_part_type_name () const
virtual Glib::ustring | get_report_part_id () const
| Gets the node name to use for the intermediate XML, (and usually, the CSS style class to use for the resulting HTML).
void | set_full_field_details (const sharedptr< const Field >& field)
sharedptr< const Field > | get_full_field_details () const
Field::glom_field_type | get_glom_type () const
| Convenience function, to avoid use of get_full_field_details().
bool | get_editable_and_allowed () const
bool | get_hidden () const
| For extra fields, needed for SQL queries. The user should never be able to make an item hidden - he can just remove it.
void | set_hidden (bool val=true)
bool | get_formatting_use_default () const
| Discover whether to use the default formatting for this field, instead of some custom per-layout-item field formatting.
void | set_formatting_use_default (bool use_default=true)
| Specify whether to use the default formatting for this field, instead of some custom per-layout-item field formatting.
virtual const FieldFormatting& | get_formatting_used () const
| Get the field formatting used by this layout item, which may be either custom field formatting or the default field formatting.
virtual FieldFormatting::HorizontalAlignment | get_formatting_used_horizontal_alignment (bool for_details_view=false) const
| Get the alignment for the formatting used (see get_formatting_used()), choosing an appropriate alignment if it is set to HORIZONTAL_ALIGNMENT_AUTO.
bool | is_same_field (const sharedptr< const LayoutItem_Field >& field) const
| Compare the name, relationship, and related_relationship.
## Public Attributes
bool | m_priv_view
bool | m_priv_edit

## Detailed Description

A LayoutItem that shows the data from a table field.

The field may be in a known table, or in a to table of a relationship or related relatinoship. See UsesRelationship::get_relationship() and UsesRelationship::get_related_relationship() in the base class.

## Constructor & Destructor Documentation

Glom::LayoutItem_Field::LayoutItem_Field | ( |  | ) |

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

virtual Glom::LayoutItem_Field::~LayoutItem_Field | ( |  | ) | `[virtual]`

## Member Function Documentation

virtual LayoutItem* Glom::LayoutItem_Field::clone | ( |  | ) | const`[virtual]`

Create a new copied instance.

This allows us to deep-copy a list of LayoutItems.

Implements Glom::LayoutItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

bool Glom::LayoutItem_Field::get_editable_and_allowed | ( |  | ) | const

bool Glom::LayoutItem_Field::get_formatting_use_default | ( |  | ) | const

Discover whether to use the default formatting for this field, instead of some custom per-layout-item field formatting.

virtual const FieldFormatting& Glom::LayoutItem_Field::get_formatting_used | ( |  | ) | const`[virtual]`

Get the field formatting used by this layout item, which may be either custom field formatting or the default field formatting.

Reimplemented from Glom::LayoutItem_WithFormatting.

virtual FieldFormatting::HorizontalAlignment Glom::LayoutItem_Field::get_formatting_used_horizontal_alignment | ( | bool | for_details_view = `false` | ) | const`[virtual]`

Get the alignment for the formatting used (see get_formatting_used()), choosing an appropriate alignment if it is set to HORIZONTAL_ALIGNMENT_AUTO.

Note that this never returns HORIZONTAL_ALIGNMENT_AUTO.

Parameters:

  for_details_view | This can change the effect of HORIZONTAL_ALIGNMENT_AUTO.

Reimplemented from Glom::LayoutItem_WithFormatting.

sharedptr<const Field> Glom::LayoutItem_Field::get_full_field_details | ( |  | ) | const

Field::glom_field_type Glom::LayoutItem_Field::get_glom_type | ( |  | ) | const

Convenience function, to avoid use of get_full_field_details().

bool Glom::LayoutItem_Field::get_hidden | ( |  | ) | const

For extra fields, needed for SQL queries. The user should never be able to make an item hidden - he can just remove it.

virtual Glib::ustring Glom::LayoutItem_Field::get_layout_display_name | ( |  | ) | const`[virtual]`

Get a text representation for the field, such as Relationship::FieldName.

Reimplemented from Glom::LayoutItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

virtual Glib::ustring Glom::LayoutItem_Field::get_name | ( |  | ) | const`[virtual]`

Get the non-user-visible name of the field.

Reimplemented from Glom::TranslatableItem.

virtual Glib::ustring Glom::LayoutItem_Field::get_part_type_name | ( |  | ) | const`[virtual]`

Implements Glom::LayoutItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

virtual Glib::ustring Glom::LayoutItem_Field::get_report_part_id | ( |  | ) | const`[virtual]`

Gets the node name to use for the intermediate XML, (and usually, the CSS style class to use for the resulting HTML).

Reimplemented from Glom::LayoutItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

virtual Glib::ustring Glom::LayoutItem_Field::get_title | ( |  | ) | const`[virtual]`

Get the user-visible title for the field, in the user's current locale.

This returns the name if no title is set.

Reimplemented from Glom::TranslatableItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

sharedptr<const CustomTitle> Glom::LayoutItem_Field::get_title_custom | ( |  | ) | const

sharedptr<CustomTitle> Glom::LayoutItem_Field::get_title_custom | ( |  | ) |

virtual Glib::ustring Glom::LayoutItem_Field::get_title_or_name | ( |  | ) | const`[virtual]`

Get the user-visible title for the field, in the user's current locale.

Reimplemented from Glom::TranslatableItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

Glib::ustring Glom::LayoutItem_Field::get_title_or_name_no_custom | ( |  | ) | const

bool Glom::LayoutItem_Field::is_same_field | ( | const sharedptr< const LayoutItem_Field >& | field | ) | const

Compare the name, relationship, and related_relationship.

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

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

void Glom::LayoutItem_Field::set_formatting_use_default | ( | bool | use_default = `true` | ) |

Specify whether to use the default formatting for this field, instead of some custom per-layout-item field formatting.

void Glom::LayoutItem_Field::set_full_field_details | ( | const sharedptr< const Field >& | field | ) |

void Glom::LayoutItem_Field::set_hidden | ( | bool | val = `true` | ) |

virtual void Glom::LayoutItem_Field::set_name | ( | const Glib::ustring & | name | ) | `[virtual]`

Set the non-user-visible name of the field.

Reimplemented from Glom::TranslatableItem.

void Glom::LayoutItem_Field::set_title_custom | ( | const sharedptr< CustomTitle >& | title | ) |

## Member Data Documentation

bool Glom::LayoutItem_Field::m_priv_edit

bool Glom::LayoutItem_Field::m_priv_view

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

- libglom/data_structure/layout/layoutitem_field.h