libglom-1.22  1.21.3
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:
Inheritance graph
[legend]
Collaboration diagram for Glom::LayoutItem_Field:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LayoutItem_Field ()
 LayoutItem_Field (const LayoutItem_Field& src)
LayoutItem_Fieldoperator= (const LayoutItem_Field& src)
virtual ~LayoutItem_Field ()
virtual LayoutItemclone () 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 get_name () const
 Get the non-user-visible name of the field.
virtual Glib::ustring& locale) const
 Get the user-visible title for the field, in the user's current locale.
virtual Glib::ustring& locale) const
 Get the user-visible title for the field, in the user's current locale.
Glib::ustring& locale) const
sharedptr< const CustomTitleget_title_custom () const
sharedptr< CustomTitleget_title_custom ()
void set_title_custom (const sharedptr< CustomTitle >& title)
virtual get_layout_display_name () const
 Get a text representation for the field, such as Relationship::FieldName.
virtual get_part_type_name () const
virtual 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 Fieldget_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 FieldFormattingget_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 get_formatting_used_has_translatable_choices () const
 A convenience method to discover whether the formatting that is used has custom choices with the values restricted to those choices, meaning that those choices could be translated.
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.

get_title() returns either the title of the Field or the CustomTitle. You should not call get/set_title_original() or get/set_title_translation() on items of this type.


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.

bool Glom::LayoutItem_Field::get_formatting_used_has_translatable_choices ( ) const

A convenience method to discover whether the formatting that is used has custom choices with the values restricted to those choices, meaning that those choices could be translated.

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_viewThis 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 Glib::ustring locale) 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 Glib::ustring locale) 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 Glib::ustring locale) 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


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