void MainWindow::writeSettings() { int i; QSettings settings; settings.beginGroup("MainWindow"); settings.setValue("size",size()); settings.setValue("mainSplitter", ui->mainSplitter->saveState()); settings.setValue("infoProfileSplitter", ui->infoProfileSplitter->saveState()); settings.setValue("listGlobeSplitter", ui->listGlobeSplitter->saveState()); settings.endGroup(); settings.beginGroup("ListWidget"); for (i = DiveTripModel::NR; i < DiveTripModel::COLUMNS; i++) if (!ui->ListWidget->isColumnHidden(i)) settings.setValue(QString("colwidth%1").arg(i), ui->ListWidget->columnWidth(i)); settings.endGroup(); settings.beginGroup("Units"); SAVE_VALUE("length", units.length); SAVE_VALUE("pressure", units.pressure); SAVE_VALUE("volume", units.volume); SAVE_VALUE("temperature", units.temperature); SAVE_VALUE("weight", units.weight); settings.endGroup(); settings.beginGroup("DisplayListColumns"); SAVE_VALUE("TEMPERATURE", visible_cols.temperature); SAVE_VALUE("TOTALWEIGHT", visible_cols.totalweight); SAVE_VALUE("SUIT", visible_cols.suit); SAVE_VALUE("CYLINDER", visible_cols.cylinder); SAVE_VALUE("NITROX", visible_cols.nitrox); SAVE_VALUE("SAC", visible_cols.sac); SAVE_VALUE("OTU", visible_cols.otu); SAVE_VALUE("MAXCNS", visible_cols.maxcns); settings.endGroup(); settings.beginGroup("TecDetails"); SAVE_VALUE("po2graph", pp_graphs.po2); SAVE_VALUE("pn2graph", pp_graphs.pn2); SAVE_VALUE("phegraph", pp_graphs.phe); SAVE_VALUE("po2threshold", pp_graphs.po2_threshold); SAVE_VALUE("pn2threshold", pp_graphs.pn2_threshold); SAVE_VALUE("phethreshold", pp_graphs.phe_threshold); SAVE_VALUE("mod", mod); SAVE_VALUE("modppO2", mod_ppO2); SAVE_VALUE("ead", ead); SAVE_VALUE("redceiling", profile_red_ceiling); SAVE_VALUE("calcceiling", profile_calc_ceiling); SAVE_VALUE("calcceiling3m", calc_ceiling_3m_incr); SAVE_VALUE("calcalltissues", calc_all_tissues); SAVE_VALUE("dcceiling", profile_dc_ceiling); SAVE_VALUE("gflow", gflow); SAVE_VALUE("gfhigh", gfhigh); settings.endGroup(); settings.beginGroup("GeneralSettings"); SAVE_VALUE("default_filename", default_filename); settings.endGroup(); }
void GeneralConfiguration::save() // Saves all settings to disk. { vector < ConfigXmlPair > values; #define SAVE_VALUE(item) if (item##_loaded) config_xml_values_set_assemble (values, item##_key(), item) SAVE_VALUE(screen_width); SAVE_VALUE(screen_height); SAVE_VALUE(window_width); SAVE_VALUE(window_height); SAVE_VALUE(window_x_position); SAVE_VALUE(window_y_position); SAVE_VALUE(window_maximized); SAVE_VALUE(window_widths); SAVE_VALUE(window_heights); SAVE_VALUE(window_x_positions); SAVE_VALUE(window_y_positions); SAVE_VALUE(window_ids); SAVE_VALUE(window_titles); SAVE_VALUE(window_shows); SAVE_VALUE(project); SAVE_VALUE(book); SAVE_VALUE(chapter); SAVE_VALUE(verse); SAVE_VALUE(stylesheet); SAVE_VALUE(references_file); SAVE_VALUE(export_to_bibleworks_filename); SAVE_VALUE(export_to_sword_module_path); SAVE_VALUE(export_to_sword_install_path); SAVE_VALUE(paper_format); SAVE_VALUE(paper_width); SAVE_VALUE(paper_height); SAVE_VALUE(paper_inside_margin); SAVE_VALUE(paper_outside_margin); SAVE_VALUE(paper_top_margin); SAVE_VALUE(paper_bottom_margin); SAVE_VALUE(column_spacing); SAVE_VALUE(printdate); SAVE_VALUE(printdraft); SAVE_VALUE(header_font_size); SAVE_VALUE(print_engine_use_intermediate_text); SAVE_VALUE(print_changes_only); SAVE_VALUE(project_to_compare_with); SAVE_VALUE(notes_selection_reference); SAVE_VALUE(notes_selection_edited); SAVE_VALUE(notes_selection_date_from); SAVE_VALUE(notes_selection_date_to); SAVE_VALUE(notes_selection_category); SAVE_VALUE(notes_selection_current_project); SAVE_VALUE(notes_display_project); SAVE_VALUE(notes_display_category); SAVE_VALUE(notes_display_date_created); SAVE_VALUE(notes_display_created_by); SAVE_VALUE(notes_display_summary); SAVE_VALUE(notes_display_reference_text); SAVE_VALUE(check_markers_compare_project); SAVE_VALUE(check_markers_compare_all_markers); SAVE_VALUE(check_markers_compare_include_only); SAVE_VALUE(check_markers_compare_ignore); SAVE_VALUE(check_markers_compare_ignore_verse_zero); SAVE_VALUE(check_capitalization_punctuation); SAVE_VALUE(check_capitalization_ignore); SAVE_VALUE(check_capitalization_allow_any_prefixes); SAVE_VALUE(check_repetition_ignore_case); SAVE_VALUE(check_repetition_show_only_these); SAVE_VALUE(check_repetition_ignore_these); SAVE_VALUE(check_matching_pairs_ignore); SAVE_VALUE(check_words_inventory_not_include_words_count); SAVE_VALUE(check_words_inventory_word_forming_characters); SAVE_VALUE(check_markers_spacing_include); SAVE_VALUE(styles_category_expanded); SAVE_VALUE(insert_footnote_template); SAVE_VALUE(insert_endnote_template); SAVE_VALUE(insert_xref_template); SAVE_VALUE(parallel_bible_keep_verses_together); SAVE_VALUE(parallel_bible_chapters_verses); SAVE_VALUE(parallel_bible_include_verse_zero); SAVE_VALUE(printing_fonts); SAVE_VALUE(parallel_bible_projects); SAVE_VALUE(parallel_bible_enabled); SAVE_VALUE(use_outpost); SAVE_VALUE(mychecks); SAVE_VALUE(tidy_translate); SAVE_VALUE(tidy_books); SAVE_VALUE(tidy_texts); SAVE_VALUE(tidy_normalize_hyphens); SAVE_VALUE(tidy_space_between_chapter_verse); SAVE_VALUE(tidy_space_series_verses); SAVE_VALUE(tidy_full_stop_ends_text); SAVE_VALUE(tidy_ampersand_semicolon); SAVE_VALUE(tidy_space_before_punctuation); SAVE_VALUE(wordlist_process_general); SAVE_VALUE(wordlist_general_asterisk); SAVE_VALUE(wordlist_general_asterisk_first); SAVE_VALUE(wordlist_process_hebrew); SAVE_VALUE(wordlist_hebrew_asterisk); SAVE_VALUE(wordlist_hebrew_asterisk_first); SAVE_VALUE(wordlist_process_greek); SAVE_VALUE(wordlist_greek_asterisk); SAVE_VALUE(wordlist_greek_asterisk_first); SAVE_VALUE(wordlist_process_index); SAVE_VALUE(wordlist_index_asterisk); SAVE_VALUE(wordlist_index_asterisk_first); SAVE_VALUE(text_editor_font_default); SAVE_VALUE(text_editor_font_name); SAVE_VALUE(text_editor_default_color); SAVE_VALUE(text_editor_normal_text_color); SAVE_VALUE(text_editor_background_color); SAVE_VALUE(text_editor_selected_text_color); SAVE_VALUE(text_editor_selection_color); SAVE_VALUE(encoding); SAVE_VALUE(features_mode); SAVE_VALUE(features_list); SAVE_VALUE(remember_verse_per_chapter); SAVE_VALUE(start_program_maximized); SAVE_VALUE(administration_password); SAVE_VALUE(print_references_projects); SAVE_VALUE(dialogpositions_x); SAVE_VALUE(dialogpositions_y); SAVE_VALUE(text_replacement); SAVE_VALUE(text_replacement_originals); SAVE_VALUE(text_replacement_replacements); SAVE_VALUE(pdf_viewer_automatic); SAVE_VALUE(pdf_viewer_path); SAVE_VALUE(pdf_viewer_arguments); SAVE_VALUE(project_tasks_names); SAVE_VALUE(project_tasks_durations); SAVE_VALUE(print_job); SAVE_VALUE(projects_displaying_verses); SAVE_VALUE(compare_disregard_notes); SAVE_VALUE(source_language_names); SAVE_VALUE(reference_window_show_verse_text); SAVE_VALUE(reference_window_show_relevant_bits); SAVE_VALUE(consultation_notes_git_use_remote_repository); SAVE_VALUE(consultation_notes_git_remote_repository_url); SAVE_VALUE(bibledit_web_url); SAVE_VALUE(bibledit_web_user); config_xml_values_set_execute(general_configuration_filename(), values); }
void MainWindow::writeSettings() { int i; QSettings settings; settings.beginGroup("MainWindow"); settings.setValue("size",size()); settings.setValue("mainSplitter", ui.mainSplitter->saveState()); settings.setValue("infoProfileSplitter", ui.infoProfileSplitter->saveState()); settings.setValue("listGlobeSplitter", ui.listGlobeSplitter->saveState()); settings.endGroup(); settings.beginGroup("ListWidget"); for (i = DiveTripModel::NR; i < DiveTripModel::COLUMNS; i++) if (!ui.ListWidget->isColumnHidden(i)) settings.setValue(QString("colwidth%1").arg(i), ui.ListWidget->columnWidth(i)); settings.endGroup(); settings.beginGroup("Units"); SAVE_VALUE("length", units.length); SAVE_VALUE("pressure", units.pressure); SAVE_VALUE("volume", units.volume); SAVE_VALUE("temperature", units.temperature); SAVE_VALUE("weight", units.weight); SAVE_VALUE("vertical_speed_time", units.vertical_speed_time); settings.endGroup(); settings.beginGroup("TecDetails"); SAVE_VALUE("po2graph", pp_graphs.po2); SAVE_VALUE("pn2graph", pp_graphs.pn2); SAVE_VALUE("phegraph", pp_graphs.phe); SAVE_VALUE("po2threshold", pp_graphs.po2_threshold); SAVE_VALUE("pn2threshold", pp_graphs.pn2_threshold); SAVE_VALUE("phethreshold", pp_graphs.phe_threshold); SAVE_VALUE("mod", mod); SAVE_VALUE("modppO2", mod_ppO2); SAVE_VALUE("ead", ead); SAVE_VALUE("redceiling", profile_red_ceiling); SAVE_VALUE("calcceiling", profile_calc_ceiling); SAVE_VALUE("calcceiling3m", calc_ceiling_3m_incr); SAVE_VALUE("calcalltissues", calc_all_tissues); SAVE_VALUE("dcceiling", profile_dc_ceiling); SAVE_VALUE("gflow", gflow); SAVE_VALUE("gfhigh", gfhigh); settings.endGroup(); settings.beginGroup("GeneralSettings"); SAVE_VALUE("default_filename", default_filename); settings.endGroup(); }
void ProjectConfiguration::save() // Saves all settings to disk. { vector < ConfigXmlPair > values; #define SAVE_VALUE(item) if (item##_loaded) config_xml_values_set_assemble (values, item##_key(), item) SAVE_VALUE(versification); SAVE_VALUE(printing_fonts); SAVE_VALUE(text_line_height); SAVE_VALUE(xetex_font_mapping_file); SAVE_VALUE(xetex_shaping_engine); SAVE_VALUE(sword_name); SAVE_VALUE(sword_description); SAVE_VALUE(sword_about); SAVE_VALUE(sword_license); SAVE_VALUE(sword_version); SAVE_VALUE(sword_language); SAVE_VALUE(reordered_books); SAVE_VALUE(reordered_includes); SAVE_VALUE(reordered_portions); SAVE_VALUE(language); SAVE_VALUE(book_order); SAVE_VALUE(editable); SAVE_VALUE(backup_incremental_last_time); SAVE_VALUE(backup_comment); SAVE_VALUE(git_use_remote_repository); SAVE_VALUE(git_remote_repository_url); SAVE_VALUE(changes_last_review); SAVE_VALUE(changes_since); SAVE_VALUE(changes_till); SAVE_VALUE(editor_font_default); SAVE_VALUE(editor_font_name); SAVE_VALUE(editor_default_color); SAVE_VALUE(editor_normal_text_color); SAVE_VALUE(editor_background_color); SAVE_VALUE(editor_selected_text_color); SAVE_VALUE(editor_selection_color); SAVE_VALUE(right_to_left); SAVE_VALUE(planning_project_start); SAVE_VALUE(planning_tasks); SAVE_VALUE(depending_on_switch); SAVE_VALUE(depending_on_project); SAVE_VALUE(depending_on_script); SAVE_VALUE(spelling_check); SAVE_VALUE(spelling_dictionaries); config_xml_values_set_execute(project_configuration_filename(project), values); }