libglom-1.30
1.30.4
|
Public Member Functions | |
Document () | |
virtual | ~Document () |
virtual void | set_modified (bool value=true) |
virtual void | set_file_uri (const Glib::ustring& file_uri, bool bEnforceFileExtension=false) |
Set the file URI that will be used in future calls to load() and save(). More... | |
bool | load (int& failure_code) |
void | set_opened_from_browse (bool val=true) |
Whether the document was opened from another networked glom instance, instead of via a URI. More... | |
bool | get_opened_from_browse () const |
void | set_allow_autosave (bool value=true) |
The document usually saves itself when you call set_modified(). More... | |
bool | get_is_example_file () const |
void | set_is_example_file (bool value=true) |
bool | get_is_backup_file () const |
void | set_is_backup_file (bool value=true) |
guint | get_document_format_version () |
void | set_hosting_mode (HostingMode mode) |
Set the hosting mode of the database. More... | |
HostingMode | get_hosting_mode () const |
This returns how the database is hosted. More... | |
void | set_network_shared (bool shared=true) |
Whether the database (and document) is shared over the network. More... | |
bool | get_network_shared () const |
See set_network_shared(). More... | |
void | set_connection_server (const Glib::ustring& strVal) |
void | set_connection_database (const Glib::ustring& strVal) |
void | set_connection_port (unsigned int port_number) |
void | set_connection_try_other_ports (bool val) |
void | set_connection_user (const Glib::ustring& strVal) |
Temporarily set a username in the document. More... | |
std::string | get_connection_self_hosted_directory_uri () const |
If the database should be hosted, this provides the path to the directory that contains all the files needed to do that. More... | |
Glib::ustring | get_connection_server () const |
Glib::ustring | get_connection_database () const |
unsigned int | get_connection_port () const |
bool | get_connection_try_other_ports () const |
Glib::ustring | get_connection_user () const |
Retrieve a username previously set in the document. More... | |
void | set_translation_original_locale (const Glib::ustring& locale) |
Set the language/locale used by original titles. More... | |
Glib::ustring | get_translation_original_locale () const |
Get the language/locale used by original titles. More... | |
std::vector< Glib::ustring > | get_translation_available_locales () const |
Get a list of locales for which at least one string is translated. More... | |
type_vec_relationships | get_relationships (const Glib::ustring& table_name, bool plus_system_prefs=false) const |
Get relationships used by this table. More... | |
void | set_relationships (const Glib::ustring& table_name, const type_vec_relationships& vecRelationships) |
std::shared_ptr< Relationship > | get_relationship (const Glib::ustring& table_name, const Glib::ustring& relationship_name) const |
void | set_relationship (const Glib::ustring& table_name, const std::shared_ptr< Relationship >& relationship) |
void | remove_relationship (const std::shared_ptr< const Relationship >& relationship) |
bool | get_relationship_is_to_one (const Glib::ustring& table_name, const Glib::ustring& relationship_name) const |
Returns whether the relationship's to-field is a primary key or unique field, meaning that there can be only one related record for each value of the from-field. More... | |
std::shared_ptr< const Relationship > | get_field_used_in_relationship_to_one (const Glib::ustring& table_name, const std::shared_ptr< const LayoutItem_Field >& layout_field) const |
Returns whether the field is the from-field in a to-one relationship. More... | |
type_vec_fields | get_table_fields (const Glib::ustring& table_name) const |
void | set_table_fields (const Glib::ustring& table_name, const type_vec_fields& vecFields) |
std::shared_ptr< Field > | get_field (const Glib::ustring& table_name, const Glib::ustring& strFieldName) const |
std::shared_ptr< Field > | get_field_primary_key (const Glib::ustring& table_name) const |
void | remove_field (const Glib::ustring& table_name, const Glib::ustring& field_name) |
Use this after removing a field from a table, so that it is not used anymore in relationships, layouts, reports, etc. More... | |
type_list_lookups | get_lookup_fields (const Glib::ustring& table_name, const Glib::ustring& field_name) const |
Get the fields whose values should be looked up when field_name changes, with the relationship used to lookup the value. More... | |
type_list_layout_groups | get_data_layout_groups (const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform=Glib::ustring()) const |
Get the layout groups for a layout. More... | |
bool | get_data_layout_groups_have_any_fields (const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform=Glib::ustring()) const |
Discover whether there are any fields in the layout. More... | |
void | set_data_layout_groups (const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform, const type_list_layout_groups& groups) |
Set the layout groups for a layout. More... | |
type_list_layout_groups | get_data_layout_groups_plus_new_fields (const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform=Glib::ustring()) const |
type_list_layout_groups | get_data_layout_groups_default (const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform=Glib::ustring()) const |
type_list_translatables | get_translatable_items () |
void | fill_layout_field_details (const Glib::ustring& parent_table_name, const std::shared_ptr< LayoutGroup >& layout_group) const |
void | fill_layout_field_details (const Glib::ustring& parent_table_name, type_list_layout_groups& groups) const |
void | change_field_name (const Glib::ustring& table_name, const Glib::ustring& strFieldNameOld, const Glib::ustring& strFieldNameNew) |
When a field name is changed, change it in the relationships, layouts, reports, and fields data: More... | |
void | change_table_name (const Glib::ustring& table_name_old, const Glib::ustring& table_name_new) |
When a table name is changed, change it in the relationships and tables data: More... | |
void | change_relationship_name (const Glib::ustring& table_name, const Glib::ustring& name, const Glib::ustring& name_new) |
When a relationship name is changed, change it in layouts and reports: More... | |
type_listTableInfo | get_tables (bool plus_system_prefs=false) |
type_listConstTableInfo | get_tables (bool plus_system_prefs=false) const |
std::vector< Glib::ustring > | get_table_names (bool plus_system_prefs=false) const |
void | set_tables (const type_listTableInfo& tables) |
std::shared_ptr< TableInfo > | get_table (const Glib::ustring& table_name) const |
void | add_table (const std::shared_ptr< TableInfo >& table_name) |
void | remove_table (const Glib::ustring& table_name) |
Use this after DROPing the table. More... | |
bool | get_table_is_known (const Glib::ustring& table_name) const |
bool | get_table_is_hidden (const Glib::ustring& table_name) const |
Glib::ustring | get_table_title (const Glib::ustring& table_name, const Glib::ustring& locale) const |
Glib::ustring | get_table_title_original (const Glib::ustring& table_name) const |
void | set_table_title (const Glib::ustring& table_name, const Glib::ustring& value, const Glib::ustring& locale) |
Glib::ustring | get_table_title_singular (const Glib::ustring& table_name, const Glib::ustring& locale) const |
Glib::ustring | get_table_title_singular_original (const Glib::ustring& table_name) const |
void | set_table_example_data (const Glib::ustring& table_name, const type_example_rows& rows) |
Save example data into the document, for use when creating the example database on the server. More... | |
type_example_rows | get_table_example_data (const Glib::ustring& table_name) const |
virtual Glib::ustring | get_name () const override |
Gets filename part of file_uri, or 'untitled'. More... | |
Glib::ustring | get_default_table () const |
Glib::ustring | get_first_table () const |
Glib::ustring | get_database_title_original () const |
Glib::ustring | get_database_title (const Glib::ustring& locale) const |
void | set_database_title_original (const Glib::ustring& title) |
std::vector< Glib::ustring > | get_library_module_names () const |
void | set_library_module (const Glib::ustring& name, const Glib::ustring& script) |
Glib::ustring | get_library_module (const Glib::ustring& name) const |
void | remove_library_module (const Glib::ustring& name) |
Glib::ustring | get_startup_script () const |
Get a Python script that should be run when the document is opened. More... | |
void | set_startup_script (const Glib::ustring& script) |
See get_startup_script(). More... | |
type_list_groups | get_groups () const |
void | set_group (GroupInfo& group) |
This adds the group if necessary. More... | |
void | remove_group (const Glib::ustring& group_name) |
std::vector< Glib::ustring > | get_report_names (const Glib::ustring& table_name) const |
void | set_report (const Glib::ustring& table_name, const std::shared_ptr< Report >& report) |
std::shared_ptr< Report > | get_report (const Glib::ustring& table_name, const Glib::ustring& report_name) const |
void | remove_report (const Glib::ustring& table_name, const Glib::ustring& report_name) |
std::vector< Glib::ustring > | get_print_layout_names (const Glib::ustring& table_name) const |
void | set_print_layout (const Glib::ustring& table_name, const std::shared_ptr< PrintLayout >& print_layout) |
std::shared_ptr< PrintLayout > | get_print_layout (const Glib::ustring& table_name, const Glib::ustring& print_layout_name) const |
void | remove_print_layout (const Glib::ustring& table_name, const Glib::ustring& print_layout_name) |
void | set_layout_record_viewed (const Glib::ustring& table_name, const Glib::ustring& layout_name, const Gnome::Gda::Value& primary_key_value) |
void | forget_layout_record_viewed (const Glib::ustring& table_name) |
Gnome::Gda::Value | get_layout_record_viewed (const Glib::ustring& table_name, const Glib::ustring& layout_name) const |
void | set_layout_current (const Glib::ustring& table_name, const Glib::ustring& layout_name) |
Temporarily save (but not in the document) the last-viewed layout for the table, so we can show the same layout when navigating back to this table later. More... | |
void | set_criteria_current (const Glib::ustring& table_name, const FoundSet& found_set) |
Temporarily save (but not in the document) the last-viewed criteria for the table, so we can show the same criteria (sort order, where clause) when navigating back to this table later. More... | |
Glib::ustring | get_layout_current (const Glib::ustring& table_name) const |
FoundSet | get_criteria_current (const Glib::ustring& table_name) const |
bool | get_table_overview_position (const Glib::ustring& table_name, float& x, float& y) const |
Retrieve the x and y coordinates for the given table position in the relationship overview dialog. More... | |
void | set_table_overview_position (const Glib::ustring& utable_name, float x, float y) |
Set the position of a table in the relationship overview dialog. More... | |
AppState::userlevels | get_userlevel (userLevelReason& reason) const |
AppState::userlevels | get_userlevel () const |
bool | set_userlevel (AppState::userlevels userlevel) |
This is transitory information, not saved to disk. More... | |
type_signal_userlevel_changed | signal_userlevel_changed () |
void | emit_userlevel_changed () |
Glib::ustring | get_active_layout_platform () const |
This is transitory information, not saved to disk. More... | |
void | set_active_layout_platform (const Glib::ustring& layout_platform=Glib::ustring()) |
This is transitory information, not saved to disk. More... | |
Glib::ustring | build_and_get_contents () const |
Glib::ustring | save_backup_file (const Glib::ustring& uri, const SlotProgress& slot_progress) |
Save a copy of the document as a backup. More... | |
![]() | |
Document_XML () | |
virtual | ~Document_XML () |
void | set_dtd_name (const std::string& strVal) |
std::string | get_dtd_name () const |
void | set_dtd_root_node_name (const Glib::ustring& strVal, const Glib::ustring& xmlns=Glib::ustring()) |
Set the root node name and (optionally) the xmlns ID to be written when writing the document. More... | |
Glib::ustring | get_dtd_root_node_name () const |
Glib::ustring | get_xml () const |
![]() | |
Document () | |
bool | save () |
bool | load (int& failure_code) |
bool | load_from_data (const guchar* data, std::size_t length, int& failure_code) |
bool | get_modified () const |
bool | get_is_new () const |
Whether this just a default document. More... | |
void | set_is_new (bool bVal) |
Called by AppWindow_WithDoc::init_create_document(). More... | |
Glib::ustring | get_contents () const |
Glib::ustring | get_file_uri_with_extension (const Glib::ustring& uri) |
Glib::ustring | get_file_uri () const |
bool | get_read_only () const |
void | set_read_only (bool bVal) |
void | set_view (ViewBase* pView) |
If you don't want to use a View, then don't use set_view(). More... | |
ViewBase* | get_view () |
void | set_file_extension (const Glib::ustring& strVal) |
Glib::ustring | get_file_extension () const |
type_signal_modified& | signal_modified () |
This signal is emitted when the document has been modified. More... | |
type_signal_forget& | signal_forget () |
This signal is emitted when the view should forget the document. More... | |
Static Public Member Functions | |
static guint | get_latest_known_document_format_version () |
static void | fill_translatable_custom_choices (Formatting& formatting, type_list_translatables& the_list, const Glib::ustring& hint) |
static Glib::ustring | extract_backup_file (const Glib::ustring& backup_uri, std::string& backup_path, const SlotProgress& slot_progress) |
Extract the .glom file and backup data from a .tar.gz archive. More... | |
static std::shared_ptr< TableInfo > | create_table_system_preferences () |
static std::shared_ptr< TableInfo > | create_table_system_preferences (type_vec_fields& fields) |
static std::shared_ptr< Relationship > | create_relationship_system_preferences (const Glib::ustring& table_name) |
static bool | get_relationship_is_system_properties (const std::shared_ptr< const Relationship >& relationship) |
![]() | |
static Glib::ustring | util_file_uri_get_name (const Glib::ustring& file_uri, const Glib::ustring& file_extension) |
typedef std::pair< std::shared_ptr<TranslatableItem>, Glib::ustring> Glom::Document::pair_translatable_item_and_hint |
The translatable item and a hint about what it is.
typedef std::function<void()> Glom::Document::SlotProgress |
This callback should show UI to indicate that work is still happening.
For instance, a pulsing ProgressBar.
These are only used when recreating a database from an example file. The actualy access-control is on the server, of course.
typedef std::vector< std::shared_ptr<const TableInfo> > Glom::Document::type_listConstTableInfo |
typedef std::pair< std::shared_ptr<LayoutItem_Field>, std::shared_ptr<Relationship> > Glom::Document::type_pairFieldTrigger |
typedef std::vector< Gnome::Gda::Value > Glom::Document::type_row_data |
|
strong |
How the database is hosted.
|
strong |
|
strong |
Glom::Document::Document | ( | ) |
|
virtual |
Reimplemented from GlomBakery::Document.
void Glom::Document::add_table | ( | const std::shared_ptr< TableInfo >& | table_name | ) |
Glib::ustring Glom::Document::build_and_get_contents | ( | ) | const |
void Glom::Document::change_field_name | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | strFieldNameOld, | ||
const Glib::ustring & | strFieldNameNew | ||
) |
When a field name is changed, change it in the relationships, layouts, reports, and fields data:
void Glom::Document::change_relationship_name | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | name, | ||
const Glib::ustring & | name_new | ||
) |
When a relationship name is changed, change it in layouts and reports:
void Glom::Document::change_table_name | ( | const Glib::ustring & | table_name_old, |
const Glib::ustring & | table_name_new | ||
) |
When a table name is changed, change it in the relationships and tables data:
|
static |
|
static |
|
static |
void Glom::Document::emit_userlevel_changed | ( | ) |
|
static |
Extract the .glom file and backup data from a .tar.gz archive.
The backup data must be stored temporarily on disk because pg_restore requires a file on disk.
backup_uri | The URI of a .tar.gz backup file. |
backup_path | This will be set to the path of a temporary file for use with pg_restore. |
void Glom::Document::fill_layout_field_details | ( | const Glib::ustring & | parent_table_name, |
const std::shared_ptr< LayoutGroup >& | layout_group | ||
) | const |
void Glom::Document::fill_layout_field_details | ( | const Glib::ustring & | parent_table_name, |
type_list_layout_groups& | groups | ||
) | const |
|
static |
void Glom::Document::forget_layout_record_viewed | ( | const Glib::ustring & | table_name | ) |
Glib::ustring Glom::Document::get_active_layout_platform | ( | ) | const |
This is transitory information, not saved to disk.
Glib::ustring Glom::Document::get_connection_database | ( | ) | const |
unsigned int Glom::Document::get_connection_port | ( | ) | const |
std::string Glom::Document::get_connection_self_hosted_directory_uri | ( | ) | const |
If the database should be hosted, this provides the path to the directory that contains all the files needed to do that.
This is usually a specifically-named directory at the same level as the .glom file. If the database is a sqlite database, this specifies the directory in which the database file is in.
Glib::ustring Glom::Document::get_connection_server | ( | ) | const |
bool Glom::Document::get_connection_try_other_ports | ( | ) | const |
Glib::ustring Glom::Document::get_connection_user | ( | ) | const |
Retrieve a username previously set in the document.
Note that this is not saved in the document's file.
TODO: Remove this, and just store it in ConnectionPool?
FoundSet Glom::Document::get_criteria_current | ( | const Glib::ustring & | table_name | ) | const |
type_list_layout_groups Glom::Document::get_data_layout_groups | ( | const Glib::ustring & | layout_name, |
const Glib::ustring & | parent_table_name, | ||
const Glib::ustring & | layout_platform = Glib::ustring() |
||
) | const |
Get the layout groups for a layout.
layout_name | The name of the layout, such as list or details. |
parent_table_name | The name of the table for which this layout should appear. |
layout_platform | The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". |
type_list_layout_groups Glom::Document::get_data_layout_groups_default | ( | const Glib::ustring & | layout_name, |
const Glib::ustring & | parent_table_name, | ||
const Glib::ustring & | layout_platform = Glib::ustring() |
||
) | const |
bool Glom::Document::get_data_layout_groups_have_any_fields | ( | const Glib::ustring & | layout_name, |
const Glib::ustring & | parent_table_name, | ||
const Glib::ustring & | layout_platform = Glib::ustring() |
||
) | const |
Discover whether there are any fields in the layout.
layout_name | The name of the layout, such as list or details. |
parent_table_name | The name of the table for which this layout should appear. |
layout_platform | The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". |
type_list_layout_groups Glom::Document::get_data_layout_groups_plus_new_fields | ( | const Glib::ustring & | layout_name, |
const Glib::ustring & | parent_table_name, | ||
const Glib::ustring & | layout_platform = Glib::ustring() |
||
) | const |
The | layout_name, such as "details", "list". |
parent_table_name | The name of the table on whose layout the layout appears. |
layout_platform | The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". |
Glib::ustring Glom::Document::get_database_title | ( | const Glib::ustring & | locale | ) | const |
Glib::ustring Glom::Document::get_database_title_original | ( | ) | const |
Glib::ustring Glom::Document::get_default_table | ( | ) | const |
guint Glom::Document::get_document_format_version | ( | ) |
std::shared_ptr<Field> Glom::Document::get_field | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | strFieldName | ||
) | const |
std::shared_ptr<Field> Glom::Document::get_field_primary_key | ( | const Glib::ustring & | table_name | ) | const |
std::shared_ptr<const Relationship> Glom::Document::get_field_used_in_relationship_to_one | ( | const Glib::ustring & | table_name, |
const std::shared_ptr< const LayoutItem_Field >& | layout_field | ||
) | const |
Returns whether the field is the from-field in a to-one relationship.
Glib::ustring Glom::Document::get_first_table | ( | ) | const |
type_list_groups Glom::Document::get_groups | ( | ) | const |
HostingMode Glom::Document::get_hosting_mode | ( | ) | const |
This returns how the database is hosted.
bool Glom::Document::get_is_backup_file | ( | ) | const |
bool Glom::Document::get_is_example_file | ( | ) | const |
|
static |
Glib::ustring Glom::Document::get_layout_current | ( | const Glib::ustring & | table_name | ) | const |
Gnome::Gda::Value Glom::Document::get_layout_record_viewed | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | layout_name | ||
) | const |
Glib::ustring Glom::Document::get_library_module | ( | const Glib::ustring & | name | ) | const |
std::vector<Glib::ustring> Glom::Document::get_library_module_names | ( | ) | const |
type_list_lookups Glom::Document::get_lookup_fields | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | field_name | ||
) | const |
Get the fields whose values should be looked up when field_name changes, with the relationship used to lookup the value.
|
overridevirtual |
Gets filename part of file_uri, or 'untitled'.
Reimplemented from GlomBakery::Document.
bool Glom::Document::get_network_shared | ( | ) | const |
See set_network_shared().
bool Glom::Document::get_opened_from_browse | ( | ) | const |
std::shared_ptr<PrintLayout> Glom::Document::get_print_layout | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | print_layout_name | ||
) | const |
std::vector<Glib::ustring> Glom::Document::get_print_layout_names | ( | const Glib::ustring & | table_name | ) | const |
std::shared_ptr<Relationship> Glom::Document::get_relationship | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | relationship_name | ||
) | const |
|
static |
bool Glom::Document::get_relationship_is_to_one | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | relationship_name | ||
) | const |
Returns whether the relationship's to-field is a primary key or unique field, meaning that there can be only one related record for each value of the from-field.
type_vec_relationships Glom::Document::get_relationships | ( | const Glib::ustring & | table_name, |
bool | plus_system_prefs = false |
||
) | const |
Get relationships used by this table.
std::shared_ptr<Report> Glom::Document::get_report | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | report_name | ||
) | const |
std::vector<Glib::ustring> Glom::Document::get_report_names | ( | const Glib::ustring & | table_name | ) | const |
Glib::ustring Glom::Document::get_startup_script | ( | ) | const |
Get a Python script that should be run when the document is opened.
std::shared_ptr<TableInfo> Glom::Document::get_table | ( | const Glib::ustring & | table_name | ) | const |
type_example_rows Glom::Document::get_table_example_data | ( | const Glib::ustring & | table_name | ) | const |
type_vec_fields Glom::Document::get_table_fields | ( | const Glib::ustring & | table_name | ) | const |
bool Glom::Document::get_table_is_hidden | ( | const Glib::ustring & | table_name | ) | const |
bool Glom::Document::get_table_is_known | ( | const Glib::ustring & | table_name | ) | const |
std::vector<Glib::ustring> Glom::Document::get_table_names | ( | bool | plus_system_prefs = false | ) | const |
bool Glom::Document::get_table_overview_position | ( | const Glib::ustring & | table_name, |
float & | x, | ||
float & | y | ||
) | const |
Retrieve the x and y coordinates for the given table position in the relationship overview dialog.
table_name | The name of the table to query. |
x | The x coordinate of the table position. |
y | The y coordinate of the table position. |
Glib::ustring Glom::Document::get_table_title | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | locale | ||
) | const |
Glib::ustring Glom::Document::get_table_title_original | ( | const Glib::ustring & | table_name | ) | const |
Glib::ustring Glom::Document::get_table_title_singular | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | locale | ||
) | const |
Glib::ustring Glom::Document::get_table_title_singular_original | ( | const Glib::ustring & | table_name | ) | const |
type_listTableInfo Glom::Document::get_tables | ( | bool | plus_system_prefs = false | ) |
type_listConstTableInfo Glom::Document::get_tables | ( | bool | plus_system_prefs = false | ) | const |
type_list_translatables Glom::Document::get_translatable_items | ( | ) |
std::vector<Glib::ustring> Glom::Document::get_translation_available_locales | ( | ) | const |
Get a list of locales for which at least one string is translated.
The result will include the original, from get_translation_original_locale().
Glib::ustring Glom::Document::get_translation_original_locale | ( | ) | const |
Get the language/locale used by original titles.
Title translations are translations of the text in this language.
AppState::userlevels Glom::Document::get_userlevel | ( | userLevelReason& | reason | ) | const |
reason | The reason that the user is not a developer, if he is not. |
AppState::userlevels Glom::Document::get_userlevel | ( | ) | const |
bool Glom::Document::load | ( | int & | failure_code | ) |
void Glom::Document::remove_field | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | field_name | ||
) |
Use this after removing a field from a table, so that it is not used anymore in relationships, layouts, reports, etc.
void Glom::Document::remove_group | ( | const Glib::ustring & | group_name | ) |
void Glom::Document::remove_library_module | ( | const Glib::ustring & | name | ) |
void Glom::Document::remove_print_layout | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | print_layout_name | ||
) |
void Glom::Document::remove_relationship | ( | const std::shared_ptr< const Relationship >& | relationship | ) |
void Glom::Document::remove_report | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | report_name | ||
) |
void Glom::Document::remove_table | ( | const Glib::ustring & | table_name | ) |
Use this after DROPing the table.
It removes information about the table, including fields and layouts, and any place that parts of the table are used.
Glib::ustring Glom::Document::save_backup_file | ( | const Glib::ustring & | uri, |
const SlotProgress& | slot_progress | ||
) |
Save a copy of the document as a backup.
This document (and its URI) will not be changed.
The | location at which to save the backup Glom file. |
void Glom::Document::set_active_layout_platform | ( | const Glib::ustring & | layout_platform = Glib::ustring() | ) |
This is transitory information, not saved to disk.
the active platform name - see get_data_layout_groups().
void Glom::Document::set_allow_autosave | ( | bool | value = true | ) |
The document usually saves itself when you call set_modified().
Pass false to this function to prevent that temporarily. The document will be saved, if necessary, after you call this function with true.
void Glom::Document::set_connection_database | ( | const Glib::ustring & | strVal | ) |
void Glom::Document::set_connection_port | ( | unsigned int | port_number | ) |
void Glom::Document::set_connection_server | ( | const Glib::ustring & | strVal | ) |
void Glom::Document::set_connection_try_other_ports | ( | bool | val | ) |
void Glom::Document::set_connection_user | ( | const Glib::ustring & | strVal | ) |
Temporarily set a username in the document.
Note that this is not saved in the document's file.
TODO: Remove this, and just store it in ConnectionPool?
void Glom::Document::set_criteria_current | ( | const Glib::ustring & | table_name, |
const FoundSet& | found_set | ||
) |
Temporarily save (but not in the document) the last-viewed criteria for the table, so we can show the same criteria (sort order, where clause) when navigating back to this table later.
table_name | The table. |
found_set | Additional information about the last use of that layout, such as the sort order or where clause. |
void Glom::Document::set_data_layout_groups | ( | const Glib::ustring & | layout_name, |
const Glib::ustring & | parent_table_name, | ||
const Glib::ustring & | layout_platform, | ||
const type_list_layout_groups& | groups | ||
) |
Set the layout groups for a layout.
layout_name | The name of the layout, such as list or details. |
parent_table_name | The name of the table for which this layout should appear. |
layout_platform | The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". |
groups | A list of layout groups at the top-level of the requested layout. |
void Glom::Document::set_database_title_original | ( | const Glib::ustring & | title | ) |
|
virtual |
Set the file URI that will be used in future calls to load() and save().
Note that the document will not be saved immediately to the new URI. It will be saved either after the next change (if using autosave) or when calling save() explicitly. Likewise, the document at the URI will not be loaded until load() is called explicitly. That is unlike in the base class's implementation.
Reimplemented from GlomBakery::Document.
void Glom::Document::set_group | ( | GroupInfo& | group | ) |
This adds the group if necessary.
void Glom::Document::set_hosting_mode | ( | HostingMode | mode | ) |
Set the hosting mode of the database.
void Glom::Document::set_is_backup_file | ( | bool | value = true | ) |
void Glom::Document::set_is_example_file | ( | bool | value = true | ) |
void Glom::Document::set_layout_current | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | layout_name | ||
) |
Temporarily save (but not in the document) the last-viewed layout for the table, so we can show the same layout when navigating back to this table later.
table_name | The table. |
layout_name | The layout name, such as "list" or "details". |
void Glom::Document::set_layout_record_viewed | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | layout_name, | ||
const Gnome::Gda::Value & | primary_key_value | ||
) |
void Glom::Document::set_library_module | ( | const Glib::ustring & | name, |
const Glib::ustring & | script | ||
) |
|
virtual |
Reimplemented from GlomBakery::Document.
void Glom::Document::set_network_shared | ( | bool | shared = true | ) |
Whether the database (and document) is shared over the network.
This setting is saved in the file, allowing the database to be shared immediately after opening the document.
shared | true if the database should be shared. |
void Glom::Document::set_opened_from_browse | ( | bool | val = true | ) |
Whether the document was opened from another networked glom instance, instead of via a URI.
void Glom::Document::set_print_layout | ( | const Glib::ustring & | table_name, |
const std::shared_ptr< PrintLayout >& | print_layout | ||
) |
void Glom::Document::set_relationship | ( | const Glib::ustring & | table_name, |
const std::shared_ptr< Relationship >& | relationship | ||
) |
void Glom::Document::set_relationships | ( | const Glib::ustring & | table_name, |
const type_vec_relationships& | vecRelationships | ||
) |
void Glom::Document::set_report | ( | const Glib::ustring & | table_name, |
const std::shared_ptr< Report >& | report | ||
) |
void Glom::Document::set_startup_script | ( | const Glib::ustring & | script | ) |
See get_startup_script().
void Glom::Document::set_table_example_data | ( | const Glib::ustring & | table_name, |
const type_example_rows& | rows | ||
) |
Save example data into the document, for use when creating the example database on the server.
Don't use this for large amounts of data.
table_name | The table that should contain this example data. |
rows | Each row is separated by a newline. Each line has comma-separated field values, in SQL format. |
void Glom::Document::set_table_fields | ( | const Glib::ustring & | table_name, |
const type_vec_fields& | vecFields | ||
) |
void Glom::Document::set_table_overview_position | ( | const Glib::ustring & | utable_name, |
float | x, | ||
float | y | ||
) |
Set the position of a table in the relationship overview dialog.
table_name | The name of the table to modify. |
x | The x coordinate of the table position. |
y | The y coordinate of the table position. |
void Glom::Document::set_table_title | ( | const Glib::ustring & | table_name, |
const Glib::ustring & | value, | ||
const Glib::ustring & | locale | ||
) |
void Glom::Document::set_tables | ( | const type_listTableInfo& | tables | ) |
void Glom::Document::set_translation_original_locale | ( | const Glib::ustring & | locale | ) |
Set the language/locale used by original titles.
Title translations are translations of the text in this language.
locale | For instance, "en_US.UTF-8". |
bool Glom::Document::set_userlevel | ( | AppState::userlevels | userlevel | ) |
This is transitory information, not saved to disk.
type_signal_userlevel_changed Glom::Document::signal_userlevel_changed | ( | ) |