libglom-1.20: Glom::LayoutItem_Portal Class Reference

libglom-1.20 1.20.7

- Main Page
- Related Pages
- Namespaces
- Classes

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

Public Types | Public Member Functions
Glom::LayoutItem_Portal Class Reference
Inheritance diagram for Glom::LayoutItem_Portal:
[legend]
Collaboration diagram for Glom::LayoutItem_Portal:
[legend]

List of all members.

## Public Types
enum | navigation_type { NAVIGATION_NONE, NAVIGATION_AUTOMATIC, NAVIGATION_SPECIFIC }
| The navigation (if any) that should be used when the user activates a related record row. More...
## Public Member Functions
| LayoutItem_Portal ()
| LayoutItem_Portal (const LayoutItem_Portal& src)
LayoutItem_Portal& | operator= (const LayoutItem_Portal& src)
virtual | ~LayoutItem_Portal ()
virtual LayoutItem* | clone () const
| Create a new copied instance.
virtual Glib::ustring | get_title () const
| Get the title's translation for the current locale.
virtual Glib::ustring | get_title_or_name () const
virtual Glib::ustring | get_part_type_name () const
virtual void | change_field_item_name (const Glib::ustring& table_name, const Glib::ustring& field_name, const Glib::ustring& field_name_new)
virtual void | change_related_field_item_name (const Glib::ustring& table_name, const Glib::ustring& field_name, const Glib::ustring& field_name_new)
Glib::ustring | get_from_table () const
| A helper method to avoid extra ifs to avoid null dereferencing.
sharedptr< UsesRelationship > | get_navigation_relationship_specific ()
| Gets the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.
sharedptr< const UsesRelationship > | get_navigation_relationship_specific () const
| Get the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.
void | set_navigation_relationship_specific (const sharedptr< UsesRelationship >& relationship)
| Set the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.
void | reset_navigation_relationship ()
navigation_type | get_navigation_type () const
| Discover what type (if any) navigation should be used when the user activates a related record row.
void | set_navigation_type (navigation_type type)
| Set what type (if any) navigation should be used when the user activates a related record row.
void | get_suitable_table_to_view_details (Glib::ustring& table_name, sharedptr< const UsesRelationship >& relationship, const Document* document) const
| Discover what table to show when clicking on a related record.
sharedptr< const UsesRelationship > | get_portal_navigation_relationship_automatic (const Document* document) const
| Get the relationship (from the related table) into which the row button should navigate, or none if it should use the portal's directly related table itself.
double | get_print_layout_row_height () const
| This is used only for the print layouts.
void | set_print_layout_row_height (double row_height)
| This is used only for the print layouts.
double | get_print_layout_row_line_width () const
| This is used only for the print layouts.
void | set_print_layout_row_line_width (double width)
| This is used only for the print layouts.
double | get_print_layout_column_line_width () const
| This is used only for the print layouts.
void | set_print_layout_column_line_width (double width)
| This is used only for the print layouts.
Glib::ustring | get_print_layout_line_color () const
| This is used only for the print layouts.
void | set_print_layout_line_color (const Glib::ustring& color)
| This is used only for the print layouts.
void | get_rows_count (gulong& rows_count_min, gulong& rows_count_max) const
| Get the number of rows that should be displayed.
void | set_rows_count (gulong rows_count_min, gulong rows_count_max)
| Set the number of rows that should be displayed.

## Member Enumeration Documentation

enum Glom::LayoutItem_Portal::navigation_type

The navigation (if any) that should be used when the user activates a related record row.

Enumerator:

  NAVIGATION_NONE | No navigation will be offered.
  NAVIGATION_AUTOMATIC | The destination related table will be chosen automatically based on the relationship and the visible fields.
  NAVIGATION_SPECIFIC | The destination related table will be determined by a specified relationship.

## Constructor & Destructor Documentation

Glom::LayoutItem_Portal::LayoutItem_Portal | ( |  | ) |

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

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

## Member Function Documentation

virtual void Glom::LayoutItem_Portal::change_field_item_name | ( | const Glib::ustring & | table_name,
|  | const Glib::ustring & | field_name,
|  | const Glib::ustring & | field_name_new
| ) |  | `[virtual]`

Reimplemented from Glom::LayoutGroup.

Reimplemented in Glom::LayoutItem_CalendarPortal.

virtual void Glom::LayoutItem_Portal::change_related_field_item_name | ( | const Glib::ustring & | table_name,
|  | const Glib::ustring & | field_name,
|  | const Glib::ustring & | field_name_new
| ) |  | `[virtual]`

Reimplemented from Glom::LayoutGroup.

Reimplemented in Glom::LayoutItem_CalendarPortal.

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

Create a new copied instance.

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

Reimplemented from Glom::LayoutGroup.

Reimplemented in Glom::LayoutItem_CalendarPortal.

Glib::ustring Glom::LayoutItem_Portal::get_from_table | ( |  | ) | const

A helper method to avoid extra ifs to avoid null dereferencing.

sharedptr<UsesRelationship> Glom::LayoutItem_Portal::get_navigation_relationship_specific | ( |  | ) |

Gets the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.

sharedptr<const UsesRelationship> Glom::LayoutItem_Portal::get_navigation_relationship_specific | ( |  | ) | const

Get the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.

navigation_type Glom::LayoutItem_Portal::get_navigation_type | ( |  | ) | const

Discover what type (if any) navigation should be used when the user activates a related record row.

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

Reimplemented from Glom::LayoutGroup.

Reimplemented in Glom::LayoutItem_CalendarPortal.

sharedptr<const UsesRelationship> Glom::LayoutItem_Portal::get_portal_navigation_relationship_automatic | ( | const Document* | document | ) | const

Get the relationship (from the related table) into which the row button should navigate, or none if it should use the portal's directly related table itself.

(If that should be chosen automatically, by looking at the fields in the portal.)

double Glom::LayoutItem_Portal::get_print_layout_column_line_width | ( |  | ) | const

This is used only for the print layouts.

Glib::ustring Glom::LayoutItem_Portal::get_print_layout_line_color | ( |  | ) | const

This is used only for the print layouts.

double Glom::LayoutItem_Portal::get_print_layout_row_height | ( |  | ) | const

This is used only for the print layouts.

double Glom::LayoutItem_Portal::get_print_layout_row_line_width | ( |  | ) | const

This is used only for the print layouts.

void Glom::LayoutItem_Portal::get_rows_count | ( | gulong & | rows_count_min,
|  | gulong & | rows_count_max
| ) |  | const

Get the number of rows that should be displayed.

void Glom::LayoutItem_Portal::get_suitable_table_to_view_details | ( | Glib::ustring & | table_name,
|  | sharedptr< const UsesRelationship >& | relationship,
|  | const Document* | document
| ) |  | const

Discover what table to show when clicking on a related record.

This table will not necessarily just be the directly related table. The caller should check, in the document, that the returned table_name is not hidden.

Parameters:

  table_name | The table that should be shown.
  relationship | The relationship in the directly related table that should be used to get to that table. If this is empty then we should just show the table directly.

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

Get the title's translation for the current locale.

Reimplemented from Glom::TranslatableItem.

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

Reimplemented from Glom::TranslatableItem.

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

void Glom::LayoutItem_Portal::reset_navigation_relationship | ( |  | ) |

void Glom::LayoutItem_Portal::set_navigation_relationship_specific | ( | const sharedptr< UsesRelationship >& | relationship | ) |

Set the relationship to use for navigation if get_navigation_type() is NAVIGATION_NONE.

void Glom::LayoutItem_Portal::set_navigation_type | ( | navigation_type | type | ) |

Set what type (if any) navigation should be used when the user activates a related record row.

void Glom::LayoutItem_Portal::set_print_layout_column_line_width | ( | double | width | ) |

This is used only for the print layouts.

void Glom::LayoutItem_Portal::set_print_layout_line_color | ( | const Glib::ustring & | color | ) |

This is used only for the print layouts.

void Glom::LayoutItem_Portal::set_print_layout_row_height | ( | double | row_height | ) |

This is used only for the print layouts.

void Glom::LayoutItem_Portal::set_print_layout_row_line_width | ( | double | width | ) |

This is used only for the print layouts.

void Glom::LayoutItem_Portal::set_rows_count | ( | gulong | rows_count_min,
|  | gulong | rows_count_max
| ) |  |

Set the number of rows that should be displayed.

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

- libglom/data_structure/layout/layoutitem_portal.h