libglom-1.22  1.22.0
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 Glib::ustring get_name () const
 Get the non-user-visible name of the field.
virtual Glib::ustring get_title (const Glib::ustring& locale) const
 Get the user-visible title for the field, in the user's current locale.
virtual Glib::ustring get_title_or_name (const Glib::ustring& locale) const
 Get the user-visible title for the field, in the user's current locale.
Glib::ustring get_title_or_name_no_custom (const Glib::ustring& locale) const
sharedptr< const CustomTitleget_title_custom () const
sharedptr< CustomTitleget_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 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 Formattingget_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
Formatting::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


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.

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

virtual const Formatting& 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.

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.

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.

Convenience function, to avoid use of get_full_field_details().

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

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.

Implements Glom::LayoutItem.

Reimplemented in Glom::LayoutItem_FieldSummary.

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.

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.

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_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.


Member Data Documentation


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