30 #if defined (HAVE_CONFIG_H)
34 #include <QButtonGroup>
36 #include <QFileDialog>
39 #include <QMessageBox>
41 #include <QStyleFactory>
45 #if defined (HAVE_QSCINTILLA)
48 # include <QScrollArea>
50 # if defined (HAVE_QSCI_QSCILEXEROCTAVE_H)
51 # define HAVE_LEXER_OCTAVE 1
52 # include <Qsci/qscilexeroctave.h>
53 # elif defined (HAVE_QSCI_QSCILEXERMATLAB_H)
54 # define HAVE_LEXER_MATLAB 1
55 # include <Qsci/qscilexermatlab.h>
58 # include <Qsci/qscilexercpp.h>
59 # include <Qsci/qscilexerjava.h>
60 # include <Qsci/qscilexerbash.h>
61 # include <Qsci/qscilexerperl.h>
62 # include <Qsci/qscilexerbatch.h>
63 # include <Qsci/qscilexerdiff.h>
76 const QString& desired_tab)
87 (QMessageBox::Warning, tr (
"Octave Preferences"),
88 tr (
"Unable to save preferences. Missing preferences file or unknown directory."));
97 QDir qm_dir (qm_dir_name);
98 QFileInfoList qm_files = qm_dir.entryInfoList (QStringList (
"*.qm"),
99 QDir::Files | QDir::Readable, QDir::Name);
101 for (
int i = 0; i < qm_files.length (); i++)
102 comboBox_language->addItem (qm_files.at (i).baseName ());
104 comboBox_language->insertItem (0, tr (
"System setting"));
105 comboBox_language->insertSeparator (1);
109 language = tr (
"System setting");
110 int selected = comboBox_language->findText (language);
112 comboBox_language->setCurrentIndex (selected);
114 comboBox_language->setCurrentIndex (0);
117 QStringList styles = QStyleFactory::keys();
119 combo_styles->addItems (styles);
121 combo_styles->insertSeparator (1);
125 selected = combo_styles->findText (current_style);
127 combo_styles->setCurrentIndex (selected);
129 combo_styles->setCurrentIndex (0);
132 QButtonGroup *icon_size_group =
new QButtonGroup (
this);
133 icon_size_group->addButton (icon_size_small);
134 icon_size_group->addButton (icon_size_normal);
135 icon_size_group->addButton (icon_size_large);
137 icon_size_normal->setChecked (
true);
138 icon_size_small->setChecked (icon_size < 0);
139 icon_size_large->setChecked (icon_size > 0);
142 combo_box_icon_theme->setCurrentIndex (theme);
145 QButtonGroup *icon_group =
new QButtonGroup (
this);
146 icon_group->addButton (general_icon_octave);
147 icon_group->addButton (general_icon_graphic);
148 icon_group->addButton (general_icon_letter);
149 QString widget_icon_set =
151 general_icon_octave->setChecked (
true);
152 general_icon_octave->setChecked (widget_icon_set ==
"NONE");
153 general_icon_graphic->setChecked (widget_icon_set ==
"GRAPHIC");
154 general_icon_letter->setChecked (widget_icon_set ==
"LETTER");
159 m_widget_title_bg_color->setEnabled (
false);
160 layout_widget_bgtitle->addWidget (m_widget_title_bg_color, 0);
162 connect (cb_widget_custom_style, &QCheckBox::toggled,
163 m_widget_title_bg_color, &color_picker::setEnabled);
166 m_widget_title_bg_color_active =
new color_picker (bg_color_active);
167 m_widget_title_bg_color_active->setEnabled (
false);
168 layout_widget_bgtitle_active->addWidget (m_widget_title_bg_color_active, 0);
170 connect (cb_widget_custom_style, &QCheckBox::toggled,
171 m_widget_title_bg_color_active, &color_picker::setEnabled);
175 m_widget_title_fg_color->setEnabled (
false);
176 layout_widget_fgtitle->addWidget (m_widget_title_fg_color, 0);
178 connect (cb_widget_custom_style, &QCheckBox::toggled,
179 m_widget_title_fg_color, &color_picker::setEnabled);
182 m_widget_title_fg_color_active =
new color_picker (fg_color_active);
183 m_widget_title_fg_color_active->setEnabled (
false);
184 layout_widget_fgtitle_active->addWidget (m_widget_title_fg_color_active, 0);
186 connect (cb_widget_custom_style, &QCheckBox::toggled,
187 m_widget_title_fg_color_active, &color_picker::setEnabled);
205 cb_cursor_blinking->setChecked (
settings->value
211 cb_cursor_blinking->setChecked (
settings->value
216 cb_focus_follows_mouse->setChecked (
220 cb_prompt_to_exit->setChecked (
224 cb_status_bar->setChecked (
228 cb_restore_octave_dir->setChecked (
233 connect (pb_octave_dir, &QPushButton::pressed,
239 useCustomFileEditor->setChecked (
241 customFileEditor->setText (
252 editor_long_line_marker_line->setChecked (long_line);
255 editor_long_line_marker_background->setChecked (long_back);
256 if (! (long_line || long_back))
257 editor_long_line_marker_line->setChecked (
true);
271 editor_checkbox_ac_builtins->setEnabled (editor_checkbox_ac_keywords->isChecked ());
272 editor_checkbox_ac_functions->setEnabled (editor_checkbox_ac_keywords->isChecked ());
284 editor_combox_tab_pos->insertItem (i,
286 editor_combox_tab_pos->setCurrentIndex
292 int selected_comment_string, selected_uncomment_string;
303 m_rb_comment_strings[i] =
new QRadioButton ();
304 m_rb_uncomment_strings[i] =
new QCheckBox ();
306 connect (m_rb_comment_strings[i], &QRadioButton::clicked,
307 m_rb_uncomment_strings[i], &QCheckBox::setChecked);
308 connect (m_rb_comment_strings[i], &QRadioButton::toggled,
309 m_rb_uncomment_strings[i], &QCheckBox::setDisabled);
312 m_rb_comment_strings[i]->setChecked (i == selected_comment_string);
313 layout_comment_strings->addWidget (m_rb_comment_strings[i]);
316 m_rb_uncomment_strings[i]->setAutoExclusive (
false);
317 m_rb_uncomment_strings[i]->setChecked ( 1 << i & selected_uncomment_string);
318 layout_uncomment_strings->addWidget (m_rb_uncomment_strings[i]);
339 terminal_fontName->setCurrentFont (QFont (
settings->value (
cs_font.
key, default_font).toString ()));
350 items << QString (
"0") << QString (
"1") << QString (
"2");
351 terminal_cursorType->addItems (items);
352 terminal_cursorType->setItemText (0, tr (
"IBeam Cursor"));
353 terminal_cursorType->setItemText (1, tr (
"Block Cursor"));
354 terminal_cursorType->setItemText (2, tr (
"Underline Cursor"));
360 terminal_cursorType->setCurrentIndex (i);
368 connect (sync_octave_directory, &QCheckBox::toggled,
375 connect (pb_file_browser_dir, &QPushButton::pressed,
384 use_proxy_server->setChecked (use_proxy);
390 if (proxy_type->itemText (i) == proxy_type_string)
392 proxy_type->setCurrentIndex (i);
404 connect (use_proxy_server, &QCheckBox::toggled,
407 proxy_items_update ();
419 connect (varedit_useTerminalFont, &QCheckBox::toggled,
420 varedit_font, &QFontComboBox::setDisabled);
421 connect (varedit_useTerminalFont, &QCheckBox::toggled,
422 varedit_fontSize, &QSpinBox::setDisabled);
424 varedit_font->setDisabled (varedit_useTerminalFont->isChecked ());
425 varedit_fontSize->setDisabled (varedit_useTerminalFont->isChecked ());
436 cb_prevent_readline_conflicts->setChecked (
439 cb_prevent_readline_conflicts_menu->setChecked (
447 connect (btn_import_shortcut_set, &QPushButton::clicked,
450 connect (btn_export_shortcut_set, &QPushButton::clicked,
453 connect (btn_default_shortcut_set, &QPushButton::clicked,
456 #if defined (HAVE_QSCINTILLA)
461 group_box_editor_styles);
463 cb_color_mode->setChecked (mode > 0);
475 tr (
"Color of highlighted current line (magenta (255,0,255) for automatic color)")
478 QHBoxLayout *color_mode =
new QHBoxLayout ();
479 color_mode->addWidget (cb_color_mode);
480 color_mode->addItem (
new QSpacerItem (5, 5, QSizePolicy::Expanding));
481 color_mode->addWidget (pb_reload_default_colors);
483 QHBoxLayout *current_line =
new QHBoxLayout ();
484 current_line->addWidget (current_line_color_label);
485 current_line->addWidget (current_line_color);
486 current_line->addItem (
new QSpacerItem (5, 5, QSizePolicy::Expanding));
488 editor_styles_layout->addLayout (color_mode);
489 editor_styles_layout->addLayout (current_line);
492 connect (cb_color_mode, &QCheckBox::stateChanged,
494 connect (pb_reload_default_colors, &QPushButton::clicked,
498 update_editor_lexers ();
503 show_tab (desired_tab);
506 connect (button_box, &QDialogButtonBox::clicked,
513 setGeometry (QRect (10, 50, 1000, 600));
527 QHash <QString, QWidget *> tab_hash;
528 tab_hash[
"editor"] = tab_editor;
529 tab_hash[
"editor_styles"] = tab_editor;
530 tabWidget->setCurrentIndex (tabWidget->indexOf (tab_hash.value (tab)));
531 if (tab ==
"editor_styles")
532 tab_editor_scroll_area->ensureWidgetVisible (group_box_editor_styles);
538 get_dir (le_octave_dir, tr (
"Set Octave Startup Directory"));
543 get_dir (le_file_browser_dir, tr (
"Set File Browser Startup Directory"));
549 int opts = QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks;
553 opts |= QFileDialog::DontUseNativeDialog;
555 QString dir = QFileDialog::getExistingDirectory
556 (
this, title, line_edit->text (), QFileDialog::Option (opts));
558 line_edit->setText (dir);
563 QDialogButtonBox::ButtonRole button_role = button_box->buttonRole (button);
565 if (button_role == QDialogButtonBox::ApplyRole
566 || button_role == QDialogButtonBox::AcceptRole)
572 if (button_role == QDialogButtonBox::RejectRole
573 || button_role == QDialogButtonBox::AcceptRole)
589 cb_restore_file_browser_dir->setDisabled (disable);
593 le_file_browser_dir->setDisabled (cb_restore_file_browser_dir->isChecked ());
594 pb_file_browser_dir->setDisabled (cb_restore_file_browser_dir->isChecked ());
598 le_file_browser_dir->setDisabled (disable);
599 pb_file_browser_dir->setDisabled (disable);
606 bool use_proxy = use_proxy_server->isChecked ();
618 proxy_type->setEnabled (use_proxy);
619 proxy_host_name_label->setEnabled (use_proxy && manual);
620 proxy_host_name->setEnabled (use_proxy && manual);
621 proxy_port_label->setEnabled (use_proxy && manual);
622 proxy_port->setEnabled (use_proxy && manual);
623 proxy_username_label->setEnabled (use_proxy && manual);
624 proxy_username->setEnabled (use_proxy && manual);
625 proxy_password_label->setEnabled (use_proxy && manual);
626 proxy_password->setEnabled (use_proxy && manual);
654 #if defined (HAVE_QSCINTILLA)
659 QCheckBox *cb_color_mode
663 if (cb_color_mode && cb_color_mode->isChecked ())
685 # if defined (HAVE_LEXER_OCTAVE)
686 lexer =
new QsciLexerOctave ();
689 # elif defined (HAVE_LEXER_MATLAB)
690 lexer =
new QsciLexerMatlab ();
695 lexer =
new QsciLexerCPP ();
699 lexer =
new QsciLexerJava ();
703 lexer =
new QsciLexerPerl ();
707 lexer =
new QsciLexerBatch ();
711 lexer =
new QsciLexerDiff ();
715 lexer =
new QsciLexerBash ();
725 octave_unused_parameter (def);
730 #if defined (HAVE_QSCINTILLA)
742 QString lexer_name =
lexer->language ();
745 for (
int i = 0; i < tabs_editor_lexers->count (); i++)
747 if (tabs_editor_lexers->tabText (i) == lexer_name)
765 QWidget *tab = tabs_editor_lexers->widget (index);
766 int default_size = 0;
767 QString default_family;
769 for (
int i = 0; i < max_style; i++)
771 QString actual_name =
lexer->description (styles[i]);
773 = tab->findChild <
color_picker *> (actual_name +
"_bg_color");
781 if (
lexer->paper (styles[i]) ==
lexer->defaultPaper ())
792 QFont font =
lexer->font (styles[i]);
794 QCheckBox *cb = tab->findChild <QCheckBox *> (actual_name +
"_bold");
796 cb->setChecked (font.bold ());
797 cb = tab->findChild <QCheckBox *> (actual_name +
"_italic");
799 cb->setChecked (font.italic ());
800 cb = tab->findChild <QCheckBox *> (actual_name +
"_underline");
802 cb->setChecked (font.underline ());
804 QFontComboBox *fcb = tab->findChild <QFontComboBox *> (actual_name +
"_font");
809 default_family = font.family ();
810 fcb->setEditText (default_family);
814 if (font.family () == default_family)
815 fcb->setEditText (
lexer->description (0));
817 fcb->setEditText (font.family ());
820 QSpinBox *fs = tab->findChild <QSpinBox *> (actual_name +
"_size");
825 default_size = font.pointSize ();
826 fs->setValue (default_size);
829 fs->setValue (font.pointSize () - default_size);
843 QGridLayout *style_grid =
new QGridLayout ();
844 QVector<QLabel *> description (max_style);
845 QVector<QFontComboBox *> select_font (max_style);
846 QVector<QSpinBox *> font_size (max_style);
847 QVector<QCheckBox *> attrib_font (3 * max_style);
848 QVector<color_picker *> color (max_style);
849 QVector<color_picker *> bg_color (max_style);
850 int default_size = 10;
851 QFont default_font = QFont ();
853 QColor default_color = QColor ();
855 for (
int i = 0; i < max_style; i++)
857 QString actual_name =
lexer->description (styles[i]);
858 QFont actual_font =
lexer->font (styles[i]);
859 description[i] =
new QLabel (actual_name);
860 description[i]->setWordWrap (
true);
861 label_width = 24*description[i]->fontMetrics ().averageCharWidth ();
862 description[i]->setMaximumSize (label_width, QWIDGETSIZE_MAX);
863 description[i]->setMinimumSize (label_width, 1);
864 select_font[i] =
new QFontComboBox ();
865 select_font[i]->setObjectName (actual_name +
"_font");
866 select_font[i]->setMaximumSize (label_width, QWIDGETSIZE_MAX);
867 select_font[i]->setMinimumSize (label_width, 1);
868 font_size[i] =
new QSpinBox ();
869 font_size[i]->setObjectName (actual_name +
"_size");
872 select_font[i]->setCurrentFont (actual_font);
873 default_font = actual_font;
874 font_size[i]->setRange (6, 24);
875 default_size = actual_font.pointSize ();
876 font_size[i]->setValue (default_size);
877 default_color =
lexer->defaultPaper ();
882 select_font[i]->setCurrentFont (actual_font);
883 if (actual_font.family () == default_font.family ())
884 select_font[i]->setEditText (
lexer->description (0));
885 font_size[i]->setRange (-4, 4);
886 font_size[i]->setValue (actual_font.pointSize ()-default_size);
887 font_size[i]->setToolTip (QObject::tr (
"Difference to the default size"));
888 if (
lexer->paper (styles[i]) == default_color)
892 bg_color[i]->setToolTip
893 (QObject::tr (
"Background color, magenta (255, 0, 255) means default"));
895 attrib_font[0+3*i] =
new QCheckBox (QObject::tr (
"b",
"short form for bold"));
896 attrib_font[1+3*i] =
new QCheckBox (QObject::tr (
"i",
"short form for italic"));
897 attrib_font[2+3*i] =
new QCheckBox (QObject::tr (
"u",
"short form for underlined"));
898 attrib_font[0+3*i]->setChecked (actual_font.bold ());
899 attrib_font[0+3*i]->setObjectName (actual_name +
"_bold");
900 attrib_font[1+3*i]->setChecked (actual_font.italic ());
901 attrib_font[1+3*i]->setObjectName (actual_name +
"_italic");
902 attrib_font[2+3*i]->setChecked (actual_font.underline ());
903 attrib_font[2+3*i]->setObjectName (actual_name +
"_underline");
905 color[i]->setObjectName (actual_name +
"_color");
906 bg_color[i]->setObjectName (actual_name +
"_bg_color");
908 style_grid->addWidget (description[i], i, column++);
909 style_grid->addWidget (select_font[i], i, column++);
910 style_grid->addWidget (font_size[i], i, column++);
911 style_grid->addWidget (attrib_font[0+3*i], i, column++);
912 style_grid->addWidget (attrib_font[1+3*i], i, column++);
913 style_grid->addWidget (attrib_font[2+3*i], i, column++);
914 style_grid->addWidget (color[i], i, column++);
915 style_grid->addWidget (bg_color[i], i, column++);
919 QScrollArea *scroll_area =
new QScrollArea ();
921 scroll_area_contents->setObjectName (QString (
lexer->language ()) +
"_styles");
922 scroll_area_contents->setLayout (style_grid);
923 scroll_area->setWidget (scroll_area_contents);
924 tabs_editor_lexers->addTab (scroll_area,
lexer->language ());
934 QCheckBox *cb_color_mode
937 if (cb_color_mode && cb_color_mode->isChecked ())
942 QWidget *tab = tabs_editor_lexers->
943 findChild <QWidget *> (QString (
lexer->language ()) +
"_styles");
947 QFontComboBox *select_font;
949 QCheckBox *attrib_font[3];
952 int default_size = 10;
959 QString default_font_name
961 QFont default_font = QFont (default_font_name, 10, -1, 0);
962 QColor default_color = QColor ();
964 for (
int i = 0; i < max_style; i++)
966 QString actual_name =
lexer->description (styles[i]);
967 select_font = tab->findChild <QFontComboBox *> (actual_name +
"_font");
968 font_size = tab->findChild <QSpinBox *> (actual_name +
"_size");
969 attrib_font[0] = tab->findChild <QCheckBox *> (actual_name +
"_bold");
970 attrib_font[1] = tab->findChild <QCheckBox *> (actual_name +
"_italic");
971 attrib_font[2] = tab->findChild <QCheckBox *> (actual_name +
"_underline");
972 color = tab->findChild <
color_picker *> (actual_name +
"_color");
973 bg_color = tab->findChild <
color_picker *> (actual_name +
"_bg_color");
974 QFont new_font = default_font;
977 new_font = select_font->currentFont ();
979 default_font = new_font;
980 else if (select_font->currentText () ==
lexer->description (0))
981 new_font = default_font;
987 default_size = font_size->value ();
988 new_font.setPointSize (font_size->value ());
991 new_font.setPointSize (font_size->value ()+default_size);
994 new_font.setBold (attrib_font[0]->isChecked ());
996 new_font.setItalic (attrib_font[1]->isChecked ());
998 new_font.setUnderline (attrib_font[2]->isChecked ());
999 lexer->setFont (new_font, styles[i]);
1001 lexer->setDefaultFont (new_font);
1003 lexer->setColor (color->color (), styles[i]);
1008 default_color = bg_color->
color ();
1009 lexer->setPaper (default_color, styles[i]);
1010 lexer->setDefaultPaper (default_color);
1015 lexer->setPaper (default_color, styles[i]);
1017 lexer->setPaper (bg_color->
color (), styles[i]);
1022 const std::string
group =
1028 tabs_editor_lexers->currentIndex ());
1040 QString widget_icon_set =
"NONE";
1041 if (general_icon_letter->isChecked ())
1042 widget_icon_set =
"LETTER";
1043 else if (general_icon_graphic->isChecked ())
1044 widget_icon_set =
"GRAPHIC";
1048 QString language = comboBox_language->currentText ();
1049 if (language == tr (
"System setting"))
1054 QString selected_style = combo_styles->currentText ();
1068 int icon_size = icon_size_large->isChecked () - icon_size_small->isChecked ();
1128 int rb_uncomment = 0;
1140 rb_uncomment = rb_uncomment + (1 << i);
1185 QString cursor_type;
1186 unsigned int cursor_int = terminal_cursorType->currentIndex ();
1194 #if defined (HAVE_QSCINTILLA)
1198 #if defined (HAVE_LEXER_OCTAVE)
1200 lexer =
new QsciLexerOctave ();
1204 #elif defined (HAVE_LEXER_MATLAB)
1206 lexer =
new QsciLexerMatlab ();
1212 lexer =
new QsciLexerCPP ();
1216 lexer =
new QsciLexerJava ();
1220 lexer =
new QsciLexerPerl ();
1224 lexer =
new QsciLexerBatch ();
1228 lexer =
new QsciLexerDiff ();
1232 lexer =
new QsciLexerBash ();
1267 QGridLayout *style_grid =
new QGridLayout ();
1272 const int color_columns = 3;
1288 cb_color_mode->setChecked (mode == 1);
1291 cb_color_mode, &QCheckBox::setEnabled);
1292 style_grid->addWidget (cb_color_mode, row, column);
1297 pb_reload_default_colors, &QPushButton::setEnabled);
1298 style_grid->addWidget (pb_reload_default_colors, row+1, column++);
1304 description[i] =
new QLabel (
" "
1306 description[i]->setAlignment (Qt::AlignRight);
1307 description[i]->setEnabled (colors_enabled);
1309 description[i], &QLabel::setEnabled);
1313 color[i]->setObjectName (
ws_colors[i].key);
1314 color[i]->setMinimumSize (30, 10);
1315 color[i]->setEnabled (colors_enabled);
1317 color[i], &color_picker::setEnabled);
1319 style_grid->addWidget (description[i], row, 3*column);
1320 style_grid->addWidget (color[i], row, 3*column+1);
1321 if (++column > color_columns)
1323 style_grid->setColumnStretch (4*column, 10);
1332 cb_color_mode->setEnabled (colors_enabled);
1333 pb_reload_default_colors->setEnabled (colors_enabled);
1336 workspace_colors_box->setLayout (style_grid);
1340 connect (cb_color_mode, &QCheckBox::stateChanged,
1342 connect (pb_reload_default_colors, &QPushButton::clicked,
1348 QCheckBox *cb_color_mode
1352 if (cb_color_mode && cb_color_mode->isChecked ())
1384 QCheckBox *cb_color_mode
1388 if (cb_color_mode && cb_color_mode->isChecked ())
1407 QGridLayout *style_grid =
new QGridLayout ();
1415 cb_color_mode->setChecked (mode == 1);
1417 style_grid->addWidget (cb_color_mode, 0, 0);
1421 style_grid->addWidget (pb_reload_default_colors, 1, 0);
1424 const int color_columns = 2;
1428 description[i] =
new QLabel (
" "
1430 description[i]->setAlignment (Qt::AlignRight);
1433 color[i]->setObjectName (
cs_colors[i].key);
1434 color[i]->setMinimumSize (30, 10);
1435 style_grid->addWidget (description[i], row, 2*column);
1436 style_grid->addWidget (color[i], row, 2*column+1);
1437 if (++column > color_columns)
1439 style_grid->setColumnStretch (3*column, 10);
1446 terminal_colors_box->setLayout (style_grid);
1449 connect (cb_color_mode, &QCheckBox::stateChanged,
1451 connect (pb_reload_default_colors, &QPushButton::clicked,
1457 QCheckBox *cb_color_mode
1461 if (cb_color_mode && cb_color_mode->isChecked ())
1490 QCheckBox *cb_color_mode
1494 if (cb_color_mode && cb_color_mode->isChecked ())
1513 QGridLayout *style_grid =
new QGridLayout ();
1521 cb_color_mode->setChecked (mode == 1);
1523 style_grid->addWidget (cb_color_mode, 0, 0);
1527 style_grid->addWidget (pb_reload_default_colors, 1, 0);
1530 int color_columns = 2;
1534 description[i] =
new QLabel (
" "
1536 description[i]->setAlignment (Qt::AlignRight);
1540 color[i]->setObjectName (
ve_colors[i].key);
1541 color[i]->setMinimumSize (30, 10);
1542 style_grid->addWidget (description[i], row, 2*column);
1543 style_grid->addWidget (color[i], row, 2*column+1);
1544 if (++column > color_columns)
1546 style_grid->setColumnStretch (3*column, 10);
1553 varedit_colors_box->setLayout (style_grid);
1556 connect (cb_color_mode, &QCheckBox::stateChanged,
1558 connect (pb_reload_default_colors, &QPushButton::clicked,
1564 QCheckBox *cb_color_mode
1568 if (cb_color_mode && cb_color_mode->isChecked ())
1597 QCheckBox *cb_color_mode
1601 if (cb_color_mode && cb_color_mode->isChecked ())
Base class for Octave interfaces that use Qt.
resource_manager & get_resource_manager(void)
shortcut_manager & get_shortcut_manager(void)
void set_color(QColor new_color)
gui_settings * get_settings(void) const
void read_lexer_settings(QsciLexer *lexer, gui_settings *settings, int mode=0, int def=0)
QString get_gui_translation_dir(void)
void combo_encoding(QComboBox *combo, const QString ¤t=QString())
int get_valid_lexer_styles(QsciLexer *lexer, int *styles)
void update_terminal_colors(int def=0)
QCheckBox * m_ws_hide_tool_tips
color_picker * m_widget_title_fg_color
void show_tab(const QString &)
void read_workspace_colors(gui_settings *settings)
void write_workspace_colors(gui_settings *settings)
base_qobject & m_octave_qobj
void update_lexer(QsciLexer *lexer, gui_settings *settings, int mode, int def=0)
void apply_new_settings(void)
QCheckBox * m_rb_uncomment_strings[ed_comment_strings_count]
void default_shortcut_set(void)
color_picker * m_widget_title_fg_color_active
void update_editor_lexers(int def=0)
void get_octave_dir(void)
void import_shortcut_set(void)
void get_file_browser_dir(void)
void read_varedit_colors(gui_settings *settings)
void write_changed_settings(bool closing)
void button_clicked(QAbstractButton *button)
color_picker * m_widget_title_bg_color_active
void write_varedit_colors(gui_settings *settings)
void read_terminal_colors(gui_settings *settings)
QCheckBox * m_ws_enable_colors
void export_shortcut_set(void)
void write_terminal_colors(gui_settings *settings)
void proxy_items_update(void)
void set_disabled_pref_file_browser_dir(bool disable)
void get_lexer_settings(QsciLexer *lexer, gui_settings *settings)
color_picker * m_widget_title_bg_color
QRadioButton * m_rb_comment_strings[ed_comment_strings_count]
void get_dir(QLineEdit *, const QString &)
void update_varedit_colors(int def=0)
void write_lexer_settings(QsciLexer *lexer, gui_settings *settings)
void update_workspace_colors(int def=0)
void write_shortcuts(gui_settings *settings, bool closing)
bool import_export(int action)
void fill_treewidget(QTreeWidget *tree_view)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
const gui_pref cs_colors[2 *cs_colors_count]
const unsigned int cs_colors_count
const gui_pref cs_focus_cmd("terminal/focus_after_command", QVariant(false))
const gui_pref cs_color_mode("terminal/color_mode", QVariant(0))
const gui_pref cs_hist_buffer("terminal/history_buffer", QVariant(1000))
const gui_pref cs_font_size("terminal/fontSize", QVariant(10))
const QStringList cs_color_names
const std::vector< std::string > cs_cursor_types
const gui_pref cs_cursor("terminal/cursorType", QVariant("ibeam"))
const gui_pref cs_dbg_location("terminal/print_debug_location", QVariant(false))
const gui_pref cs_cursor_use_fgcol("terminal/cursorUseForegroundColor", QVariant(true))
const gui_pref cs_font("terminal/fontName", QVariant())
const gui_pref cs_cursor_blinking("terminal/cursorBlinking", QVariant(true))
const gui_pref dw_title_3d("DockWidgets/widget_title_3d", QVariant(20))
const gui_pref dw_title_fg_color("DockWidgets/title_fg_color", QVariant(QColor(0, 0, 0)))
const gui_pref dw_title_fg_color_active("DockWidgets/title_fg_color_active", QVariant(QColor(255, 255, 255)))
const gui_pref dw_title_custom_style("DockWidgets/widget_title_custom_style", QVariant(true))
const gui_pref dw_focus_follows_mouse("DockWidgets/focus_follows_mouse", QVariant(false))
const gui_pref dw_title_bg_color_active("DockWidgets/title_bg_color_active", QVariant(QColor(128, 128, 128)))
const gui_pref dw_title_bg_color("DockWidgets/title_bg_color", QVariant(QColor(192, 192, 192)))
const gui_pref dw_icon_set("DockWidgets/widget_icon_set", QVariant("NONE"))
const gui_pref ed_tabs_rotated("editor/tabs_rotated", QVariant(false))
const gui_pref ed_always_reload_changed_files("editor/always_reload_changed_files", QVariant(false))
const gui_pref ed_comment_str_old("editor/octave_comment_string", QVariant(0))
const gui_pref ed_indent_uses_tabs("editor/indent_uses_tabs", QVariant(false))
const gui_pref ed_code_completion("editor/codeCompletion", QVariant(true))
const gui_pref ed_show_hscroll_bar("editor/show_hscroll_bar", QVariant(true))
const gui_pref ed_code_completion_octave_functions("editor/codeCompletion_octave_functions", QVariant(true))
const gui_pref ed_auto_endif("editor/auto_endif", QVariant(1))
const gui_pref ed_show_toolbar("editor/show_toolbar", QVariant(true))
const gui_pref ed_uncomment_str("editor/oct_uncomment_str", QVariant(1+2+4+8))
const gui_pref ed_show_white_space("editor/show_white_space", QVariant(false))
const gui_pref ed_create_new_file("editor/create_new_file", QVariant(false))
const gui_pref ed_color_mode("editor/color_mode", QVariant(0))
const gui_pref ed_line_numbers_size("editor/line_numbers_size", QVariant(0))
const gui_pref ed_wrap_lines("editor/wrap_lines", QVariant(false))
const gui_pref ed_highlight_current_line("editor/highlightCurrentLine", QVariant(true))
const gui_pref ed_tabs_max_width("editor/tabs_max_width", QVariant(0))
const gui_pref ed_break_lines("editor/break_lines", QVariant(false))
const gui_pref ed_break_lines_comments("editor/break_lines_comments", QVariant(false))
const gui_pref ed_highlight_current_line_color("editor/highlightCurrentLineColor", QVariant(settings_color_no_change))
const gui_pref ed_long_line_marker("editor/long_line_marker", QVariant(true))
const gui_pref ed_tab_position("editor/tab_position", QVariant(QTabWidget::North))
const gui_pref ed_tab_indents_line("editor/tab_indents_line", QVariant(false))
const int ed_max_lexer_styles
const gui_pref ed_code_completion_octave_builtins("editor/codeCompletion_octave_builtins", QVariant(true))
const gui_pref ed_show_edit_status_bar("editor/show_edit_status_bar", QVariant(true))
const gui_pref ed_code_completion_threshold("editor/codeCompletion_threshold", QVariant(3))
const gui_pref ed_code_completion_document("editor/codeCompletion_document", QVariant(true))
const gui_pref ed_backspace_unindents_line("editor/backspace_unindents_line", QVariant(false))
const gui_pref ed_restore_session("editor/restoreSession", QVariant(true))
const gui_pref ed_code_completion_case("editor/codeCompletion_case", QVariant(true))
const gui_pref ed_rm_trailing_spaces("editor/rm_trailing_spaces", QVariant(true))
const gui_pref ed_default_enc("editor/default_encoding", QVariant("UTF-8"))
const gui_pref ed_long_line_marker_background("editor/long_line_marker_background", QVariant(false))
const gui_pref ed_show_dbg_file("editor/show_dbg_file", QVariant(true))
const gui_pref ed_show_white_space_indent("editor/show_white_space_indent", QVariant(false))
const gui_pref ed_show_line_numbers("editor/showLineNumbers", QVariant(true))
const gui_pref ed_highlight_all_occurrences("editor/highlight_all_occurrences", QVariant(true))
const gui_pref ed_show_eol_chars("editor/show_eol_chars", QVariant(false))
const QStringList ed_tab_position_names
const gui_pref ed_show_indent_guides("editor/show_indent_guides", QVariant(false))
const gui_pref ed_code_folding("editor/code_folding", QVariant(true))
const gui_pref ed_force_newline("editor/force_newline", QVariant(true))
const QStringList ed_comment_strings
const gui_pref ed_indent_width("editor/indent_width", QVariant(2))
const gui_pref ed_tab_width("editor/tab_width", QVariant(2))
const gui_pref ed_comment_str("editor/oct_comment_str", QVariant(0))
const gui_pref ed_hiding_closes_files("editor/hiding_closes_files", QVariant(false))
const gui_pref ed_long_line_column("editor/long_line_column", QVariant(80))
const gui_pref ed_default_eol_mode("editor/default_eol_mode", QVariant(os_eol_mode))
const gui_pref ed_code_completion_replace("editor/codeCompletion_replace", QVariant(false))
const int ed_comment_strings_count
const gui_pref ed_code_completion_keywords("editor/codeCompletion_keywords", QVariant(true))
const gui_pref ed_auto_indent("editor/auto_indent", QVariant(true))
const gui_pref ed_long_line_marker_line("editor/long_line_marker_line", QVariant(true))
const gui_pref fb_sync_octdir("filesdockwidget/sync_octave_directory", QVariant(true))
const gui_pref fb_startup_dir("filesdockwidget/startup_dir", QVariant(QString()))
const gui_pref fb_txt_file_ext("filesdockwidget/txt_file_extensions", QVariant("m;c;cc;cpp;h;txt"))
const gui_pref fb_restore_last_dir("filesdockwidget/restore_last_dir", QVariant(false))
const gui_pref global_icon_theme_index("icon_theme", QVariant(ICON_THEME_SYSTEM))
const gui_pref global_use_proxy("useProxyServer", QVariant(false))
const gui_pref global_mono_font("monospace_font", global_font_family)
const gui_pref global_restore_ov_dir("restore_octave_dir", QVariant(false))
const gui_pref global_proxy_pass("proxyPassword", QVariant(QString()))
const gui_pref global_status_bar("show_status_bar", QVariant(true))
const gui_pref global_proxy_host("proxyHostName", QVariant(QString()))
const QList< int > global_proxy_manual_types
const gui_pref global_prompt_to_exit("prompt_to_exit", QVariant(false))
const gui_pref global_proxy_type("proxyType", QVariant(QString()))
const gui_pref global_use_native_dialogs("use_native_file_dialogs", QVariant(true))
const gui_pref global_proxy_user("proxyUserName", QVariant(QString()))
const gui_pref global_use_custom_editor("useCustomFileEditor", QVariant(false))
const QStringList global_proxy_all_types
const gui_pref global_ov_startup_dir("octave_startup_dir", QVariant(QString()))
const gui_pref global_custom_editor("customFileEditor", QVariant("emacs +%l %f"))
const QStringList global_extra_styles
const gui_pref global_proxy_port("proxyPort", QVariant(80))
const gui_pref global_icon_size("toolbar_icon_size", QVariant(0))
const QStringList global_all_icon_theme_names
const gui_pref global_language("language", QVariant("SYSTEM"))
const gui_pref global_cursor_blinking("cursor_blinking", QVariant(true))
const gui_pref global_style("style", QVariant("default"))
const gui_pref nr_allow_connection("news/allow_web_connection", QVariant(false))
const gui_pref sc_prevent_rl_conflicts("shortcuts/prevent_readline_conflicts", QVariant(false))
const gui_pref sc_prevent_rl_conflicts_menu("shortcuts/prevent_readline_conflicts_menu", QVariant(false))
const QString settings_reload_colors_tooltip
const QString settings_color_modes_tooltip
const QString settings_color_modes
const gui_pref sd_geometry("settings/geometry", QVariant())
const QString settings_reload_colors
const QString settings_reload_styles_tooltip
const gui_pref sd_last_editor_styles_tab("settings/last_editor_styles_tab", QVariant(0))
const QString settings_reload_styles
const gui_pref sd_last_tab("settings/last_tab", QVariant(0))
const gui_pref ve_color_mode("variable_editor/color_mode", QVariant(0))
const int ve_colors_count
const gui_pref ve_column_width("variable_editor/column_width", QVariant(100))
const gui_pref ve_use_terminal_font("variable_editor/use_terminal_font", QVariant(true))
const gui_pref ve_font_size("variable_editor/font_size", QVariant(10))
const QStringList ve_color_names
const gui_pref ve_alternate_rows("variable_editor/alternate_rows", QVariant(false))
const gui_pref ve_font_name("variable_editor/font_name", QVariant())
const gui_pref ve_colors[2 *ve_colors_count]
const gui_pref ve_row_height("variable_editor/row_height", QVariant(10))
const gui_pref ws_colors[2 *ws_colors_count]
const gui_pref ws_enable_colors("workspaceview/enable_colors", QVariant(false))
const gui_pref ws_color_mode("workspaceview/color_mode", QVariant(0))
const QStringList ws_color_names
const gui_pref ws_hide_tool_tips("workspaceview/hide_tools_tips", QVariant(false))
const int ws_colors_count
const QColor settings_color_no_change(255, 0, 255)
const QStringList settings_color_modes_ext(QStringList()<< ""<< "_2")
const int settings_reload_default_colors_flag