GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
settings-dialog.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2011-2017 Jacob Dawid
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if defined (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
27 #include "resource-manager.h"
28 #include "shortcut-manager.h"
29 #include "workspace-model.h"
30 #include "settings-dialog.h"
31 #include "ui-settings-dialog.h"
32 #include <QDir>
33 #include <QFileInfo>
34 #include <QFileDialog>
35 #include <QVector>
36 #include <QHash>
37 #include <QMessageBox>
38 #include <QTextCodec>
39 
40 #if defined (HAVE_QSCINTILLA)
41 # include "octave-qscintilla.h"
42 # include "octave-txt-lexer.h"
43 # include <QScrollArea>
44 
45 # if defined (HAVE_QSCI_QSCILEXEROCTAVE_H)
46 # define HAVE_LEXER_OCTAVE 1
47 # include <Qsci/qscilexeroctave.h>
48 # elif defined (HAVE_QSCI_QSCILEXERMATLAB_H)
49 # define HAVE_LEXER_MATLAB 1
50 # include <Qsci/qscilexermatlab.h>
51 # endif
52 
53 # include <Qsci/qscilexercpp.h>
54 # include <Qsci/qscilexerbash.h>
55 # include <Qsci/qscilexerperl.h>
56 # include <Qsci/qscilexerbatch.h>
57 # include <Qsci/qscilexerdiff.h>
58 #endif
59 
60 #if defined (HAVE_QSCINTILLA)
61 
62 static const int MaxLexerStyles = 64;
63 static const int MaxStyleNumber = 128;
64 
65 static int
67 {
68  int max_style = 0;
69  int actual_style = 0;
70  while (actual_style < MaxStyleNumber && max_style < MaxLexerStyles)
71  {
72  if ((lexer->description (actual_style)) != "") // valid style
73  styles[max_style++] = actual_style;
74  actual_style++;
75  }
76  return max_style;
77 }
78 
79 static void
81  QSettings *settings)
82 {
83  lexer->readSettings (*settings);
84  int styles[MaxLexerStyles]; // array for saving valid styles
85  // (enum is not continuous)
86  int max_style = get_valid_lexer_styles (lexer, styles);
87  QGridLayout *style_grid = new QGridLayout ();
88  QVector<QLabel*> description (max_style);
89  QVector<QFontComboBox*> select_font (max_style);
90  QVector<QSpinBox*> font_size (max_style);
91  QVector<QCheckBox*> attrib_font (3 * max_style);
92  QVector<color_picker*> color (max_style);
93  QVector<color_picker*> bg_color (max_style);
94  int default_size = 10;
95  QFont default_font = QFont ();
96  int label_width;
97  QColor default_color = QColor ();
98  QColor dummy_color = QColor (255,0,255);
99 
100  for (int i = 0; i < max_style; i++) // create dialog elements for all styles
101  {
102  QString actual_name = lexer->description (styles[i]);
103  QFont actual_font = lexer->font (styles[i]);
104  description[i] = new QLabel (actual_name);
105  description[i]->setWordWrap (true);
106  label_width = 24*description[i]->fontMetrics ().averageCharWidth ();
107  description[i]->setMaximumSize (label_width,QWIDGETSIZE_MAX);
108  description[i]->setMinimumSize (label_width,1);
109  select_font[i] = new QFontComboBox ();
110  select_font[i]->setObjectName (actual_name+"_font");
111  select_font[i]->setMaximumSize (label_width,QWIDGETSIZE_MAX);
112  select_font[i]->setMinimumSize (label_width,1);
113  font_size[i] = new QSpinBox ();
114  font_size[i]->setObjectName (actual_name+"_size");
115  if (styles[i] == 0) // the default
116  {
117  select_font[i]->setCurrentFont (actual_font);
118  default_font = actual_font;
119  font_size[i]->setRange (6,24);
120  default_size = actual_font.pointSize ();
121  font_size[i]->setValue (default_size);
122  default_color = lexer->defaultPaper ();
123  bg_color[i] = new color_picker (default_color);
124  }
125  else // other styles
126  {
127  select_font[i]->setCurrentFont (actual_font);
128  if (actual_font.family () == default_font.family ())
129  select_font[i]->setEditText (lexer->description (0));
130  font_size[i]->setRange (-4,4);
131  font_size[i]->setValue (actual_font.pointSize ()-default_size);
132  font_size[i]->setToolTip (QObject::tr ("Difference to the default size"));
133  if (lexer->paper (styles[i]) == default_color)
134  bg_color[i] = new color_picker (dummy_color);
135  else
136  bg_color[i] = new color_picker (lexer->paper (styles[i]));
137  bg_color[i]->setToolTip
138  (QObject::tr ("Background color, pink (255,0,255) means default"));
139  }
140  attrib_font[0+3*i] = new QCheckBox (QObject::tr ("b", "short form for bold"));
141  attrib_font[1+3*i] = new QCheckBox (QObject::tr ("i", "short form for italic"));
142  attrib_font[2+3*i] = new QCheckBox (QObject::tr ("u", "short form for underlined"));
143  attrib_font[0+3*i]->setChecked (Qt::Checked && actual_font.bold ());
144  attrib_font[0+3*i]->setObjectName (actual_name+"_bold");
145  attrib_font[1+3*i]->setChecked (Qt::Checked && actual_font.italic ());
146  attrib_font[1+3*i]->setObjectName (actual_name+"_italic");
147  attrib_font[2+3*i]->setChecked (Qt::Checked && actual_font.underline ());
148  attrib_font[2+3*i]->setObjectName (actual_name+"_underline");
149  color[i] = new color_picker (lexer->color (styles[i]));
150  color[i]->setObjectName (actual_name+"_color");
151  bg_color[i]->setObjectName (actual_name+"_bg_color");
152  int column = 1;
153  style_grid->addWidget (description[i], i, column++);
154  style_grid->addWidget (select_font[i], i, column++);
155  style_grid->addWidget (font_size[i], i, column++);
156  style_grid->addWidget (attrib_font[0+3*i], i, column++);
157  style_grid->addWidget (attrib_font[1+3*i], i, column++);
158  style_grid->addWidget (attrib_font[2+3*i], i, column++);
159  style_grid->addWidget (color[i], i, column++);
160  style_grid->addWidget (bg_color[i], i, column++);
161  }
162  // place grid with elements into the tab
163  QScrollArea *scroll_area = new QScrollArea ();
164  QWidget *scroll_area_contents = new QWidget ();
165  scroll_area_contents->setObjectName (QString (lexer->language ())+"_styles");
166  scroll_area_contents->setLayout (style_grid);
167  scroll_area->setWidget (scroll_area_contents);
168  ui->tabs_editor_lexers->addTab (scroll_area,lexer->language ());
169 
170  ui->tabs_editor_lexers->setCurrentIndex (
171  settings->value ("settings/last_editor_styles_tab",0).toInt ());
172 }
173 
174 static void
176  QSettings *settings)
177 {
178  QWidget *tab = ui->tabs_editor_lexers->
179  findChild <QWidget *>(QString (lexer->language ())+"_styles");
180  int styles[MaxLexerStyles]; // array for saving valid styles
181  // (enum is not continuous)
182  int max_style = get_valid_lexer_styles (lexer, styles);
183  QFontComboBox *select_font;
184  QSpinBox *font_size;
185  QCheckBox *attrib_font[3];
186  color_picker *color;
187  color_picker *bg_color;
188  int default_size = 10;
189  QFont default_font = QFont ("Courier New",10,-1,0);
190  QColor default_color = QColor ();
191  QColor dummy_color = QColor (255,0,255);
192 
193  for (int i = 0; i < max_style; i++) // get dialog elements and their contents
194  {
195  QString actual_name = lexer->description (styles[i]);
196  select_font = tab->findChild <QFontComboBox *>(actual_name+"_font");
197  font_size = tab->findChild <QSpinBox *>(actual_name+"_size");
198  attrib_font[0] = tab->findChild <QCheckBox *>(actual_name+"_bold");
199  attrib_font[1] = tab->findChild <QCheckBox *>(actual_name+"_italic");
200  attrib_font[2] = tab->findChild <QCheckBox *>(actual_name+"_underline");
201  color = tab->findChild <color_picker *>(actual_name+"_color");
202  bg_color = tab->findChild <color_picker *>(actual_name+"_bg_color");
203  QFont new_font = default_font;
204  if (select_font)
205  {
206  new_font = select_font->currentFont ();
207  if (styles[i] == 0)
208  default_font = new_font;
209  else if (select_font->currentText () == lexer->description (0))
210  new_font = default_font;
211  }
212  if (font_size)
213  {
214  if (styles[i] == 0)
215  {
216  default_size = font_size->value ();
217  new_font.setPointSize (font_size->value ());
218  }
219  else
220  new_font.setPointSize (font_size->value ()+default_size);
221  }
222  if (attrib_font[0])
223  new_font.setBold (attrib_font[0]->isChecked ());
224  if (attrib_font[1])
225  new_font.setItalic (attrib_font[1]->isChecked ());
226  if (attrib_font[2])
227  new_font.setUnderline (attrib_font[2]->isChecked ());
228  lexer->setFont (new_font,styles[i]);
229  if (styles[i] == 0)
230  lexer->setDefaultFont (new_font);
231  if (color)
232  lexer->setColor (color->color (),styles[i]);
233  if (bg_color)
234  {
235  if (styles[i] == 0)
236  {
237  default_color = bg_color->color ();
238  lexer->setPaper (default_color,styles[i]);
239  lexer->setDefaultPaper (default_color);
240  }
241  else
242  {
243  if (bg_color->color () == dummy_color)
244  lexer->setPaper (default_color,styles[i]);
245  else
246  lexer->setPaper (bg_color->color (),styles[i]);
247  }
248  }
249  }
250 
251  lexer->writeSettings (*settings);
252 
253  settings->setValue (
254  "settings/last_editor_styles_tab",ui->tabs_editor_lexers->currentIndex ());
255  settings->sync ();
256 }
257 
258 #endif
259 
260 settings_dialog::settings_dialog (QWidget *p, const QString& desired_tab):
261  QDialog (p), ui (new Ui::settings_dialog)
262 {
263  ui->setupUi (this);
264 
265  QSettings *settings = resource_manager::get_settings ();
266 
267  if (! settings)
268  {
269  QMessageBox msgBox (QMessageBox::Warning, tr ("Octave Settings"),
270  tr ("Unable to save settings. Missing settings "
271  "file or unknown directory."));
272  msgBox.exec ();
273  return;
274  }
275 
276  // restore last geometry
277  restoreGeometry (settings->value("settings/geometry").toByteArray ());
278 
279  // look for available language files and the actual settings
280  QString qm_dir_name = resource_manager::get_gui_translation_dir ();
281  QDir qm_dir (qm_dir_name);
282  QFileInfoList qm_files = qm_dir.entryInfoList (QStringList ("*.qm"),
283  QDir::Files | QDir::Readable,
284  QDir::Name);
285  for (int i = 0; i < qm_files.length (); i++) // insert available languages
286  ui->comboBox_language->addItem (qm_files.at (i).baseName ());
287  // System at beginning
288  ui->comboBox_language->insertItem (0,tr ("System setting"));
289  ui->comboBox_language->insertSeparator (1); // separator after System
290  QString language = settings->value ("language","SYSTEM").toString ();
291  if (language == "SYSTEM")
292  language = tr ("System setting");
293  int selected = ui->comboBox_language->findText (language);
294  if (selected >= 0)
295  ui->comboBox_language->setCurrentIndex (selected);
296  else
297  ui->comboBox_language->setCurrentIndex (0); // System is default
298 
299  // icon size
300  QButtonGroup *icon_size_group = new QButtonGroup (this);
301  icon_size_group->addButton (ui->icon_size_small);
302  icon_size_group->addButton (ui->icon_size_normal);
303  icon_size_group->addButton (ui->icon_size_large);
304  int icon_size = settings->value ("toolbar_icon_size", 0).toInt ();
305  ui->icon_size_normal->setChecked (true); // the default
306  ui->icon_size_small->setChecked (icon_size == -1);
307  ui->icon_size_large->setChecked (icon_size == 1);
308 
309  // which icon has to be selected
310  QButtonGroup *icon_group = new QButtonGroup (this);
311  icon_group->addButton (ui->general_icon_octave);
312  icon_group->addButton (ui->general_icon_graphic);
313  icon_group->addButton (ui->general_icon_letter);
314  QString widget_icon_set =
315  settings->value ("DockWidgets/widget_icon_set","NONE").toString ();
316  ui->general_icon_octave-> setChecked (true); // the default (if invalid set)
317  ui->general_icon_octave-> setChecked (widget_icon_set == "NONE");
318  ui->general_icon_graphic-> setChecked (widget_icon_set == "GRAPHIC");
319  ui->general_icon_letter-> setChecked (widget_icon_set == "LETTER");
320 
321  // custom title bar of dock widget
322  QVariant default_var = QColor (255,255,255);
323  QColor bg_color = settings->value ("Dockwidgets/title_bg_color",
324  default_var).value<QColor> ();
325  _widget_title_bg_color = new color_picker (bg_color);
326  _widget_title_bg_color->setEnabled (false);
327  ui->layout_widget_bgtitle->addWidget (_widget_title_bg_color,0);
328  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
329  _widget_title_bg_color, SLOT (setEnabled (bool)));
330 
331  default_var = QColor (192,192,192);
332  QColor bg_color_active = settings->value ("Dockwidgets/title_bg_color_active",
333  default_var).value<QColor> ();
334  _widget_title_bg_color_active = new color_picker (bg_color_active);
335  _widget_title_bg_color_active->setEnabled (false);
336  ui->layout_widget_bgtitle_active->addWidget (_widget_title_bg_color_active,0);
337  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
338  _widget_title_bg_color_active, SLOT (setEnabled (bool)));
339 
340  default_var = QColor (0,0,0);
341  QColor fg_color = settings->value ("Dockwidgets/title_fg_color",
342  default_var).value<QColor> ();
343  _widget_title_fg_color = new color_picker (fg_color);
344  _widget_title_fg_color->setEnabled (false);
345  ui->layout_widget_fgtitle->addWidget (_widget_title_fg_color,0);
346  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
347  _widget_title_fg_color, SLOT (setEnabled (bool)));
348 
349  default_var = QColor (0,0,0);
350  QColor fg_color_active = settings->value ("Dockwidgets/title_fg_color_active",
351  default_var).value<QColor> ();
352  _widget_title_fg_color_active = new color_picker (fg_color_active);
353  _widget_title_fg_color_active->setEnabled (false);
354  ui->layout_widget_fgtitle_active->addWidget (_widget_title_fg_color_active,0);
355  connect (ui->cb_widget_custom_style, SIGNAL (toggled (bool)),
356  _widget_title_fg_color_active, SLOT (setEnabled (bool)));
357 
358  ui->sb_3d_title->setValue (
359  settings->value ("DockWidgets/widget_title_3d", 50).toInt ());
360  ui->cb_widget_custom_style->setChecked (
361  settings->value ("DockWidgets/widget_title_custom_style",false).toBool ());
362 
363  // prompt on exit
364  ui->cb_prompt_to_exit->setChecked (
365  settings->value ("prompt_to_exit",false).toBool ());
366 
367  // Main status bar
368  ui->cb_status_bar->setChecked (
369  settings->value ("show_status_bar",true).toBool ());
370 
371  // Octave startup
372  ui->cb_restore_octave_dir->setChecked (
373  settings->value ("restore_octave_dir",false).toBool ());
374  ui->le_octave_dir->setText (
375  settings->value ("octave_startup_dir").toString ());
376  connect (ui->pb_octave_dir, SIGNAL (pressed ()),
377  this, SLOT (get_octave_dir ()));
378 
379  //
380  // editor
381  //
382  ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor",
383  false).toBool ());
384  ui->customFileEditor->setText (
385  settings->value ("customFileEditor").toString ());
386  ui->editor_showLineNumbers->setChecked (
387  settings->value ("editor/showLineNumbers",true).toBool ());
388 
390 
391  default_var = QColor (240, 240, 240);
392  QColor setting_color = settings->value ("editor/highlight_current_line_color",
393  default_var).value<QColor> ();
394  _editor_current_line_color = new color_picker (setting_color);
395  ui->editor_grid_current_line->addWidget (_editor_current_line_color,0,3);
396  _editor_current_line_color->setMinimumSize (50,10);
397  _editor_current_line_color->setEnabled (false);
398  connect (ui->editor_highlightCurrentLine, SIGNAL (toggled (bool)),
399  _editor_current_line_color, SLOT (setEnabled (bool)));
400  ui->editor_highlightCurrentLine->setChecked (
401  settings->value ("editor/highlightCurrentLine",true).toBool ());
402  ui->editor_long_line_marker->setChecked (
403  settings->value ("editor/long_line_marker",true).toBool ());
404  ui->editor_long_line_column->setValue (
405  settings->value ("editor/long_line_column",80).toInt ());
406  ui->cb_edit_status_bar->setChecked (
407  settings->value ("editor/show_edit_status_bar",true).toBool ());
408  ui->cb_edit_tool_bar->setChecked (
409  settings->value ("editor/show_toolbar",true).toBool ());
410  ui->cb_code_folding->setChecked (
411  settings->value ("editor/code_folding",true).toBool ());
412 
413  ui->editor_codeCompletion->setChecked (
414  settings->value ("editor/codeCompletion", true).toBool ());
415  ui->editor_spinbox_ac_threshold->setValue (
416  settings->value ("editor/codeCompletion_threshold",2).toInt ());
417  ui->editor_checkbox_ac_keywords->setChecked (
418  settings->value ("editor/codeCompletion_keywords",true).toBool ());
419  ui->editor_checkbox_ac_builtins->setEnabled (
420  ui->editor_checkbox_ac_keywords->isChecked ());
421  ui->editor_checkbox_ac_functions->setEnabled (
422  ui->editor_checkbox_ac_keywords->isChecked ());
423  ui->editor_checkbox_ac_builtins->setChecked (
424  settings->value ("editor/codeCompletion_octave_builtins",true).toBool ());
425  ui->editor_checkbox_ac_functions->setChecked (
426  settings->value ("editor/codeCompletion_octave_functions",true).toBool ());
427  ui->editor_checkbox_ac_document->setChecked (
428  settings->value ("editor/codeCompletion_document",false).toBool ());
429  ui->editor_checkbox_ac_case->setChecked (
430  settings->value ("editor/codeCompletion_case",true).toBool ());
431  ui->editor_checkbox_ac_replace->setChecked (
432  settings->value ("editor/codeCompletion_replace",false).toBool ());
433  ui->editor_ws_checkbox->setChecked (
434  settings->value ("editor/show_white_space", false).toBool ());
435  ui->editor_ws_indent_checkbox->setChecked (
436  settings->value ("editor/show_white_space_indent",false).toBool ());
437  ui->cb_show_eol->setChecked (
438  settings->value ("editor/show_eol_chars",false).toBool ());
439  ui->cb_show_hscrollbar->setChecked (
440  settings->value ("editor/show_hscroll_bar",true).toBool ());
441 
442 #if defined (HAVE_QSCINTILLA)
443 # if defined (Q_OS_WIN32)
444  int eol_mode = QsciScintilla::EolWindows;
445 #elif defined (Q_OS_MAC)
446  int eol_mode = QsciScintilla::EolMac;
447 #else
448  int eol_mode = QsciScintilla::EolUnix;
449 #endif
450 #else
451  int eol_mode = 2;
452 #endif
453  ui->combo_eol_mode->setCurrentIndex (
454  settings->value ("editor/default_eol_mode",eol_mode).toInt ());
455  ui->editor_auto_ind_checkbox->setChecked (
456  settings->value ("editor/auto_indent", true).toBool ());
457  ui->editor_tab_ind_checkbox->setChecked (
458  settings->value ("editor/tab_indents_line",false).toBool ());
459  ui->editor_bs_unind_checkbox->setChecked (
460  settings->value ("editor/backspace_unindents_line",false).toBool ());
461  ui->editor_ind_guides_checkbox->setChecked (
462  settings->value ("editor/show_indent_guides",false).toBool ());
463  ui->editor_ind_width_spinbox->setValue (
464  settings->value ("editor/indent_width", 2).toInt ());
465  ui->editor_ind_uses_tabs_checkbox->setChecked (
466  settings->value ("editor/indent_uses_tabs", false).toBool ());
467  ui->editor_tab_width_spinbox->setValue (
468  settings->value ("editor/tab_width", 2).toInt ());
469  ui->editor_longWindowTitle->setChecked (
470  settings->value ("editor/longWindowTitle",false).toBool ());
471  ui->editor_notebook_tab_width_min->setValue (
472  settings->value ("editor/notebook_tab_width_min", 160).toInt ());
473  ui->editor_notebook_tab_width_max->setValue (
474  settings->value ("editor/notebook_tab_width_max", 300).toInt ());
475  ui->editor_restoreSession->setChecked (
476  settings->value ("editor/restoreSession", true).toBool ());
477  ui->editor_create_new_file->setChecked (
478  settings->value ("editor/create_new_file",false).toBool ());
479  ui->editor_reload_changed_files->setChecked (
480  settings->value ("editor/always_reload_changed_files",false).toBool ());
481 
482  // terminal
483  ui->terminal_fontName->setCurrentFont (QFont (
484  settings->value ("terminal/fontName","Courier New").toString ()));
485  ui->terminal_fontSize->setValue (
486  settings->value ("terminal/fontSize", 10).toInt ());
487  ui->terminal_history_buffer->setValue (
488  settings->value ("terminal/history_buffer",1000).toInt ());
489  ui->terminal_cursorBlinking->setChecked (
490  settings->value ("terminal/cursorBlinking",true).toBool ());
492  settings->value ("terminal/cursorUseForegroundColor",true).toBool ());
493  ui->terminal_focus_command->setChecked (
494  settings->value ("terminal/focus_after_command",false).toBool ());
495  ui->terminal_print_dbg_location->setChecked (
496  settings->value ("terminal/print_debug_location",false).toBool ());
497 
498  QString cursorType
499  = settings->value ("terminal/cursorType", "ibeam").toString ();
500 
501  QStringList items;
502  items << QString ("0") << QString ("1") << QString ("2");
503  ui->terminal_cursorType->addItems (items);
504  ui->terminal_cursorType->setItemText (0, tr ("IBeam Cursor"));
505  ui->terminal_cursorType->setItemText (1, tr ("Block Cursor"));
506  ui->terminal_cursorType->setItemText (2, tr ("Underline Cursor"));
507 
508  if (cursorType == "ibeam")
509  ui->terminal_cursorType->setCurrentIndex (0);
510  else if (cursorType == "block")
511  ui->terminal_cursorType->setCurrentIndex (1);
512  else if (cursorType == "underline")
513  ui->terminal_cursorType->setCurrentIndex (2);
514 
515  // file browser
516  connect (ui->sync_octave_directory, SIGNAL (toggled (bool)),
517  this, SLOT (set_disabled_pref_file_browser_dir (bool)));
518  ui->sync_octave_directory->setChecked (
519  settings->value ("filesdockwidget/sync_octave_directory",true).toBool ());
520  ui->cb_restore_file_browser_dir->setChecked (
521  settings->value ("filesdockwidget/restore_last_dir",false).toBool ());
522  ui->le_file_browser_dir->setText (
523  settings->value ("filesdockwidget/startup_dir").toString ());
524  connect (ui->pb_file_browser_dir, SIGNAL (pressed ()),
525  this, SLOT (get_file_browser_dir ()));
526  ui->le_file_browser_extensions->setText (
527  settings->value ("filesdockwidget/txt_file_extensions", "m;c;cc;cpp;h;txt")
528  .toString ());
529 
530  ui->checkbox_allow_web_connect->setChecked (
531  settings->value ("news/allow_web_connection",false).toBool ());
532  ui->useProxyServer->setChecked (
533  settings->value ("useProxyServer", false).toBool ());
534  ui->proxyHostName->setText (settings->value ("proxyHostName").toString ());
535 
536  int currentIndex = 0;
537  QString proxyTypeString = settings->value ("proxyType").toString ();
538  while ((currentIndex < ui->proxyType->count ())
539  && (ui->proxyType->currentText () != proxyTypeString))
540  {
541  currentIndex++;
542  ui->proxyType->setCurrentIndex (currentIndex);
543  }
544 
545  ui->proxyPort->setText (settings->value ("proxyPort").toString ());
546  ui->proxyUserName->setText (settings->value ("proxyUserName").toString ());
547  ui->proxyPassword->setText (settings->value ("proxyPassword").toString ());
548 
549  // Workspace
550  // colors
551  read_workspace_colors (settings);
552  // hide tool tips
553  ui->cb_hide_tool_tips->setChecked (
554  settings->value ("workspaceview/hide_tool_tips",false).toBool ());
555 
556  // terminal colors
557  read_terminal_colors (settings);
558 
559  // shortcuts
560 
561  ui->cb_prevent_readline_conflicts->setChecked (
562  settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ());
563 
564  // initialize the tree view with all shortcut data
566 
567  // connect the buttons for import/export of the shortcut sets
568  connect (ui->btn_import_shortcut_set, SIGNAL (clicked ()),
569  this, SLOT (import_shortcut_set ()));
570  connect (ui->btn_export_shortcut_set, SIGNAL (clicked ()),
571  this, SLOT (export_shortcut_set ()));
572  connect (ui->btn_default_shortcut_set, SIGNAL (clicked ()),
573  this, SLOT (default_shortcut_set ()));
574 
575 #if defined (HAVE_QSCINTILLA)
576  // editor styles: create lexer, read settings, and create dialog elements
577  QsciLexer *lexer;
578 #if defined (HAVE_LEXER_OCTAVE)
579  lexer = new QsciLexerOctave ();
580  read_lexer_settings (ui, lexer, settings);
581  delete lexer;
582 #elif defined (HAVE_LEXER_MATLAB)
583  lexer = new QsciLexerMatlab ();
584  read_lexer_settings (ui, lexer, settings);
585  delete lexer;
586 #endif
587  lexer = new QsciLexerCPP ();
588  read_lexer_settings (ui, lexer, settings);
589  delete lexer;
590  lexer = new QsciLexerPerl ();
591  read_lexer_settings (ui, lexer, settings);
592  delete lexer;
593  lexer = new QsciLexerBatch ();
594  read_lexer_settings (ui, lexer, settings);
595  delete lexer;
596  lexer = new QsciLexerDiff ();
597  read_lexer_settings (ui, lexer, settings);
598  delete lexer;
599  lexer = new QsciLexerBash ();
600  read_lexer_settings (ui, lexer, settings);
601  delete lexer;
602  lexer = new octave_txt_lexer ();
603  read_lexer_settings (ui, lexer, settings);
604  delete lexer;
605 #endif
606 
607  // which tab is the desired one?
608  show_tab (desired_tab);
609 
610  // connect button box signal
611  connect (ui->button_box, SIGNAL (clicked (QAbstractButton *)),
612  this, SLOT (button_clicked (QAbstractButton *)));
613 }
614 
616 {
617  delete ui;
618 }
619 
620 void
621 settings_dialog::show_tab (const QString& tab)
622 {
623  if (tab.isEmpty ())
624  {
625  QSettings *settings = resource_manager::get_settings ();
626  if (settings)
627  ui->tabWidget->setCurrentIndex (settings->value ("settings/last_tab",
628  0).toInt ());
629  }
630  else
631  {
632  QHash <QString, QWidget*> tab_hash;
633  tab_hash["editor"] = ui->tab_editor;
634  tab_hash["editor_styles"] = ui->tab_editor_styles;
635  ui->tabWidget->setCurrentIndex (
636  ui->tabWidget->indexOf (tab_hash.value (tab)));
637  }
638 }
639 
640 void
642 {
643 
644  QList<QColor> default_colors =
646  QStringList class_names = resource_manager::storage_class_names ();
647  QString class_chars = resource_manager::storage_class_chars ();
648  int nr_of_classes = class_chars.length ();
649 
650  QGridLayout *style_grid = new QGridLayout ();
651  QVector<QLabel*> description (nr_of_classes);
652  QVector<color_picker*> color (nr_of_classes);
653 
654  int column = 0;
655  int row = 0;
656  for (int i = 0; i < nr_of_classes; i++)
657  {
658  description[i] = new QLabel (" " + class_names.at (i));
659  description[i]->setAlignment (Qt::AlignRight);
660  QVariant default_var = default_colors.at (i);
661  QColor setting_color = settings->value ("workspaceview/color_"
662  + class_chars.mid (i,1),
663  default_var).value<QColor> ();
664  color[i] = new color_picker (setting_color);
665  color[i]->setObjectName ("color_"+class_chars.mid (i, 1));
666  color[i]->setMinimumSize (30, 10);
667  style_grid->addWidget (description[i], row, 3*column);
668  style_grid->addWidget (color[i], row, 3*column+1);
669  if (++column == 3)
670  {
671  style_grid->setColumnStretch (4*column, 10);
672  row++;
673  column = 0;
674  }
675  }
676 
677  // place grid with elements into the tab
678  ui->workspace_colors_box->setLayout (style_grid);
679 }
680 
681 void
683 {
684 
686  QStringList class_names = resource_manager::terminal_color_names ();
687  QString class_chars = resource_manager::terminal_color_chars ();
688  int nr_of_classes = class_chars.length ();
689 
690  QGridLayout *style_grid = new QGridLayout ();
691  QVector<QLabel*> description (nr_of_classes);
692  QVector<color_picker*> color (nr_of_classes);
693 
694  int column = 0;
695  int row = 0;
696  for (int i = 0; i < nr_of_classes; i++)
697  {
698  description[i] = new QLabel (" " + class_names.at (i));
699  description[i]->setAlignment (Qt::AlignRight);
700  QVariant default_var = default_colors.at (i);
701  QColor setting_color = settings->value ("terminal/color_"
702  + class_chars.mid (i,1),
703  default_var).value<QColor> ();
704  color[i] = new color_picker (setting_color);
705  color[i]->setObjectName ("terminal_color_"+class_chars.mid (i, 1));
706  color[i]->setMinimumSize (30, 10);
707  style_grid->addWidget (description[i], row, 2*column);
708  style_grid->addWidget (color[i], row, 2*column+1);
709  if (++column == 2)
710  {
711  style_grid->setColumnStretch (3*column, 10);
712  row++;
713  column = 0;
714  }
715  }
716 
717  // place grid with elements into the tab
718  ui->terminal_colors_box->setLayout (style_grid);
719 }
720 
721 void
723 {
724  QSettings *settings = resource_manager::get_settings ();
725 
726  // the icon set
727  QString widget_icon_set = "NONE";
728  if (ui->general_icon_letter->isChecked ())
729  widget_icon_set = "LETTER";
730  else if (ui->general_icon_graphic->isChecked ())
731  widget_icon_set = "GRAPHIC";
732  settings->setValue ("DockWidgets/widget_icon_set",widget_icon_set);
733 
734  // language
735  QString language = ui->comboBox_language->currentText ();
736  if (language == tr ("System setting"))
737  language = "SYSTEM";
738  settings->setValue ("language", language);
739 
740  // dock widget title bar
741  settings->setValue ("DockWidgets/widget_title_custom_style",
742  ui->cb_widget_custom_style->isChecked ());
743  settings->setValue ("DockWidgets/widget_title_3d",
744  ui->sb_3d_title->value ());
745  settings->setValue ("Dockwidgets/title_bg_color",
747  settings->setValue ("Dockwidgets/title_bg_color_active",
749  settings->setValue ("Dockwidgets/title_fg_color",
751  settings->setValue ("Dockwidgets/title_fg_color_active",
753 
754  // icon size
755  int icon_size = 0;
756  if (ui->icon_size_small->isChecked ())
757  icon_size = -1;
758  else if (ui->icon_size_large->isChecked ())
759  icon_size = 1;
760  settings->setValue ("toolbar_icon_size", icon_size);
761 
762  // promp to exit
763  settings->setValue ("prompt_to_exit", ui->cb_prompt_to_exit->isChecked ());
764 
765  // status bar
766  settings->setValue ("show_status_bar", ui->cb_status_bar->isChecked ());
767 
768  // Octave startup
769  settings->setValue ("restore_octave_dir",
770  ui->cb_restore_octave_dir->isChecked ());
771  settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ());
772 
773  //editor
774  settings->setValue ("useCustomFileEditor",
775  ui->useCustomFileEditor->isChecked ());
776  settings->setValue ("customFileEditor", ui->customFileEditor->text ());
777  settings->setValue ("editor/showLineNumbers",
778  ui->editor_showLineNumbers->isChecked ());
779  settings->setValue ("editor/highlightCurrentLine",
780  ui->editor_highlightCurrentLine->isChecked ());
781  settings->setValue ("editor/highlight_current_line_color",
783  settings->setValue ("editor/long_line_marker",
784  ui->editor_long_line_marker->isChecked ());
785  settings->setValue ("editor/long_line_column",
786  ui->editor_long_line_column->value ());
787  settings->setValue ("editor/code_folding",
788  ui->cb_code_folding->isChecked ());
789  settings->setValue ("editor/show_edit_status_bar",
790  ui->cb_edit_status_bar->isChecked ());
791  settings->setValue ("editor/show_toolbar",
792  ui->cb_edit_tool_bar->isChecked ());
793  settings->setValue ("editor/codeCompletion",
794  ui->editor_codeCompletion->isChecked ());
795  settings->setValue ("editor/codeCompletion_threshold",
796  ui->editor_spinbox_ac_threshold->value ());
797  settings->setValue ("editor/codeCompletion_keywords",
798  ui->editor_checkbox_ac_keywords->isChecked ());
799  settings->setValue ("editor/codeCompletion_octave_builtins",
800  ui->editor_checkbox_ac_builtins->isChecked ());
801  settings->setValue ("editor/codeCompletion_octave_functions",
802  ui->editor_checkbox_ac_functions->isChecked ());
803  settings->setValue ("editor/codeCompletion_document",
804  ui->editor_checkbox_ac_document->isChecked ());
805  settings->setValue ("editor/codeCompletion_case",
806  ui->editor_checkbox_ac_case->isChecked ());
807  settings->setValue ("editor/codeCompletion_replace",
808  ui->editor_checkbox_ac_replace->isChecked ());
809  settings->setValue ("editor/show_white_space",
810  ui->editor_ws_checkbox->isChecked ());
811  settings->setValue ("editor/show_white_space_indent",
812  ui->editor_ws_indent_checkbox->isChecked ());
813  settings->setValue ("editor/show_eol_chars",
814  ui->cb_show_eol->isChecked ());
815  settings->setValue ("editor/show_hscroll_bar",
816  ui->cb_show_hscrollbar->isChecked ());
817  settings->setValue ("editor/default_eol_mode",
818  ui->combo_eol_mode->currentIndex ());
819  settings->setValue ("editor/default_encoding",
820  ui->editor_combo_encoding->currentText ());
821  settings->setValue ("editor/auto_indent",
822  ui->editor_auto_ind_checkbox->isChecked ());
823  settings->setValue ("editor/tab_indents_line",
824  ui->editor_tab_ind_checkbox->isChecked ());
825  settings->setValue ("editor/backspace_unindents_line",
826  ui->editor_bs_unind_checkbox->isChecked ());
827  settings->setValue ("editor/show_indent_guides",
828  ui->editor_ind_guides_checkbox->isChecked ());
829  settings->setValue ("editor/indent_width",
830  ui->editor_ind_width_spinbox->value ());
831  settings->setValue ("editor/indent_uses_tabs",
832  ui->editor_ind_uses_tabs_checkbox->isChecked ());
833  settings->setValue ("editor/tab_width",
834  ui->editor_tab_width_spinbox->value ());
835  settings->setValue ("editor/longWindowTitle",
836  ui->editor_longWindowTitle->isChecked ());
837  settings->setValue ("editor/notebook_tab_width_min",
838  ui->editor_notebook_tab_width_min->value ());
839  settings->setValue ("editor/notebook_tab_width_max",
840  ui->editor_notebook_tab_width_max->value ());
841  settings->setValue ("editor/restoreSession",
842  ui->editor_restoreSession->isChecked ());
843  settings->setValue ("editor/create_new_file",
844  ui->editor_create_new_file->isChecked ());
845  settings->setValue ("editor/always_reload_changed_files",
846  ui->editor_reload_changed_files->isChecked ());
847  settings->setValue ("terminal/fontSize", ui->terminal_fontSize->value ());
848  settings->setValue ("terminal/fontName",
849  ui->terminal_fontName->currentFont ().family ());
850 
851  // file browser
852  settings->setValue ("filesdockwidget/sync_octave_directory",
853  ui->sync_octave_directory->isChecked ());
854  settings->setValue ("filesdockwidget/restore_last_dir",
855  ui->cb_restore_file_browser_dir->isChecked ());
856  settings->setValue ("filesdockwidget/startup_dir",
857  ui->le_file_browser_dir->text ());
858  settings->setValue ("filesdockwidget/txt_file_extensions",
859  ui->le_file_browser_extensions->text ());
860 
861  settings->setValue ("news/allow_web_connection",
862  ui->checkbox_allow_web_connect->isChecked ());
863  settings->setValue ("useProxyServer", ui->useProxyServer->isChecked ());
864  settings->setValue ("proxyType", ui->proxyType->currentText ());
865  settings->setValue ("proxyHostName", ui->proxyHostName->text ());
866  settings->setValue ("proxyPort", ui->proxyPort->text ());
867  settings->setValue ("proxyUserName", ui->proxyUserName->text ());
868  settings->setValue ("proxyPassword", ui->proxyPassword->text ());
869  settings->setValue ("terminal/cursorBlinking",
870  ui->terminal_cursorBlinking->isChecked ());
871  settings->setValue ("terminal/cursorUseForegroundColor",
872  ui->terminal_cursorUseForegroundColor->isChecked ());
873  settings->setValue ("terminal/focus_after_command",
874  ui->terminal_focus_command->isChecked ());
875  settings->setValue ("terminal/print_debug_location",
876  ui->terminal_print_dbg_location->isChecked ());
877  settings->setValue ("terminal/history_buffer",
878  ui->terminal_history_buffer->value ());
879 
880  // the cursor
881  QString cursorType;
882  switch (ui->terminal_cursorType->currentIndex ())
883  {
884  case 0: cursorType = "ibeam"; break;
885  case 1: cursorType = "block"; break;
886  case 2: cursorType = "underline"; break;
887  }
888  settings->setValue ("terminal/cursorType", cursorType);
889 
890 #if defined (HAVE_QSCINTILLA)
891  // editor styles: create lexer, get dialog contents, and write settings
892  QsciLexer *lexer;
893 #if defined (HAVE_LEXER_OCTAVE)
894  lexer = new QsciLexerOctave ();
895  write_lexer_settings (ui, lexer, settings);
896  delete lexer;
897 #elif defined (HAVE_LEXER_MATLAB)
898  lexer = new QsciLexerMatlab ();
899  write_lexer_settings (ui, lexer, settings);
900  delete lexer;
901 #endif
902  lexer = new QsciLexerCPP ();
903  write_lexer_settings (ui, lexer, settings);
904  delete lexer;
905  lexer = new QsciLexerPerl ();
906  write_lexer_settings (ui, lexer, settings);
907  delete lexer;
908  lexer = new QsciLexerBatch ();
909  write_lexer_settings (ui, lexer, settings);
910  delete lexer;
911  lexer = new QsciLexerDiff ();
912  write_lexer_settings (ui, lexer, settings);
913  delete lexer;
914  lexer = new QsciLexerBash ();
915  write_lexer_settings (ui, lexer, settings);
916  delete lexer;
917  lexer = new octave_txt_lexer ();
918  write_lexer_settings (ui, lexer, settings);
919  delete lexer;
920 #endif
921 
922  // Workspace
923  write_workspace_colors (settings);
924  // hide tool tips
925  settings->setValue ("workspaceview/hide_tool_tips",
926  ui->cb_hide_tool_tips->isChecked ());
927 
928  // Terminal
929  write_terminal_colors (settings);
930 
931  // shortcuts
932  settings->setValue ("shortcuts/prevent_readline_conflicts",
933  ui->cb_prevent_readline_conflicts->isChecked ());
934  shortcut_manager::write_shortcuts (settings, closing);
935 
936  // settings dialog's geometry
937  settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ());
938  settings->setValue ("settings/geometry",saveGeometry ());
939 
940  settings->sync ();
941 }
942 
943 void
945 {
946 
947  QString class_chars = resource_manager::storage_class_chars ();
948  color_picker *color;
949 
950  for (int i = 0; i < class_chars.length (); i++)
951  {
952  color = ui->workspace_colors_box->findChild <color_picker *>(
953  "color_"+class_chars.mid (i,1));
954  if (color)
955  settings->setValue ("workspaceview/color_"+class_chars.mid (i,1),
956  color->color ());
957  }
958  settings->sync ();
959 }
960 
961 void
963 {
964  QString class_chars = resource_manager::terminal_color_chars ();
965  color_picker *color;
966 
967  for (int i = 0; i < class_chars.length (); i++)
968  {
969  color = ui->terminal_colors_box->findChild <color_picker *>(
970  "terminal_color_"+class_chars.mid (i,1));
971  if (color)
972  settings->setValue ("terminal/color_"+class_chars.mid (i,1),
973  color->color ());
974  }
975  settings->sync ();
976 }
977 
978 // internal slots
979 
980 void
981 settings_dialog::button_clicked (QAbstractButton *button)
982 {
983  QDialogButtonBox::ButtonRole button_role = ui->button_box->buttonRole (button);
984 
985  if (button_role == QDialogButtonBox::ApplyRole ||
986  button_role == QDialogButtonBox::AcceptRole)
987  {
988  write_changed_settings (button_role == QDialogButtonBox::AcceptRole);
989  emit apply_new_settings ();
990  }
991 
992  if (button_role == QDialogButtonBox::RejectRole ||
993  button_role == QDialogButtonBox::AcceptRole)
994  close ();
995 }
996 
997 void
998 settings_dialog::get_dir (QLineEdit *line_edit, const QString& title)
999 {
1000  QString dir = QFileDialog::getExistingDirectory(this,
1001  title, line_edit->text (),
1002  QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
1003  line_edit->setText (dir);
1004 }
1005 
1006 void
1008 {
1009  get_dir (ui->le_octave_dir, tr ("Set Octave Startup Directory"));
1010 }
1011 
1012 void
1014 {
1015  get_dir (ui->le_file_browser_dir, tr ("Set File Browser Startup Directory"));
1016 }
1017 
1018 void
1020 {
1021  ui->cb_restore_file_browser_dir->setDisabled (disable);
1022 
1023  if (! disable)
1024  {
1025  ui->le_file_browser_dir->setDisabled (
1026  ui->cb_restore_file_browser_dir->isChecked ());
1027  ui->pb_file_browser_dir->setDisabled (
1028  ui->cb_restore_file_browser_dir->isChecked ());
1029  }
1030  else
1031  {
1032  ui->le_file_browser_dir->setDisabled (disable);
1033  ui->pb_file_browser_dir->setDisabled (disable);
1034  }
1035 }
1036 
1037 // slots for import/export of shortcut sets
1038 void
1040 {
1042 }
1043 
1044 void
1046 {
1048 }
1049 
1050 void
1052 {
1054 }
QHBoxLayout * layout_widget_fgtitle
static const int MaxLexerStyles
settings_dialog(QWidget *parent, const QString &desired_tab=QString())
QComboBox * comboBox_language
QCheckBox * terminal_cursorBlinking
QLineEdit * le_file_browser_dir
OCTAVE_EXPORT octave_value_list column
Definition: sparse.cc:123
static void import_export(int action)
QCheckBox * cb_prevent_readline_conflicts
QRadioButton * general_icon_octave
QSpinBox * terminal_history_buffer
QCheckBox * editor_checkbox_ac_document
QCheckBox * editor_tab_ind_checkbox
QSpinBox * editor_ind_width_spinbox
static int get_valid_lexer_styles(QsciLexer *lexer, int styles[])
static void write_lexer_settings(Ui::settings_dialog *ui, QsciLexer *lexer, QSettings *settings)
QCheckBox * editor_highlightCurrentLine
QCheckBox * cb_hide_tool_tips
QCheckBox * useCustomFileEditor
QCheckBox * cb_show_hscrollbar
static QString terminal_color_chars(void)
QCheckBox * cb_restore_octave_dir
QPushButton * btn_import_shortcut_set
QCheckBox * editor_reload_changed_files
void set_disabled_pref_file_browser_dir(bool disable)
static void write_shortcuts(QSettings *settings, bool closing)
static void combo_encoding(QComboBox *combo, QString current=QString())
QCheckBox * cb_widget_custom_style
Name
Definition: ov-struct.cc:1958
QCheckBox * editor_checkbox_ac_replace
static QString get_gui_translation_dir(void)
QCheckBox * editor_ws_indent_checkbox
static QStringList terminal_color_names(void)
Ui::settings_dialog * ui
QRadioButton * general_icon_graphic
void read_terminal_colors(QSettings *settings)
QCheckBox * editor_bs_unind_checkbox
QTreeWidget * shortcuts_treewidget
QCheckBox * editor_auto_ind_checkbox
QCheckBox * editor_checkbox_ac_functions
QCheckBox * editor_showLineNumbers
static void read_lexer_settings(Ui::settings_dialog *ui, QsciLexer *lexer, QSettings *settings)
QCheckBox * editor_create_new_file
color_picker * _widget_title_fg_color
static QList< QColor > storage_class_default_colors(void)
QCheckBox * editor_longWindowTitle
QHBoxLayout * layout_widget_fgtitle_active
QPushButton * btn_export_shortcut_set
color_picker * _widget_title_bg_color
QCheckBox * editor_ind_guides_checkbox
QCheckBox * cb_edit_tool_bar
color_picker * _widget_title_fg_color_active
#define lexer
Definition: oct-parse.cc:152
void write_workspace_colors(QSettings *settings)
static void fill_treewidget(QTreeWidget *tree_view)
QCheckBox * editor_long_line_marker
QRadioButton * icon_size_normal
QHBoxLayout * layout_widget_bgtitle_active
QLineEdit * le_file_browser_extensions
QFontComboBox * terminal_fontName
QHBoxLayout * layout_widget_bgtitle
QCheckBox * cb_restore_file_browser_dir
QSpinBox * editor_notebook_tab_width_max
QCheckBox * editor_ws_checkbox
QCheckBox * editor_checkbox_ac_keywords
QSpinBox * editor_tab_width_spinbox
QCheckBox * terminal_focus_command
QPushButton * btn_default_shortcut_set
QSpinBox * editor_spinbox_ac_threshold
QCheckBox * checkbox_allow_web_connect
static QSettings * get_settings(void)
QCheckBox * editor_checkbox_ac_builtins
QCheckBox * terminal_print_dbg_location
void setupUi(QDialog *settings_dialog)
void write_changed_settings(bool closing)
static QList< QColor > terminal_default_colors(void)
QPushButton * pb_octave_dir
QCheckBox * terminal_cursorUseForegroundColor
QTabWidget * tabs_editor_lexers
QCheckBox * editor_restoreSession
void show_tab(const QString &)
QCheckBox * editor_ind_uses_tabs_checkbox
QCheckBox * editor_checkbox_ac_case
=val(i)}if ode{val(i)}occurs in table i
Definition: lookup.cc:239
p
Definition: lu.cc:138
QComboBox * editor_combo_encoding
color_picker * _widget_title_bg_color_active
color_picker * _editor_current_line_color
QPushButton * pb_file_browser_dir
QSpinBox * editor_long_line_column
static QString storage_class_chars(void)
QColor color() const
Definition: color-picker.h:39
static QStringList storage_class_names(void)
QGroupBox * terminal_colors_box
QComboBox * terminal_cursorType
void write_terminal_colors(QSettings *settings)
QLineEdit * customFileEditor
void get_dir(QLineEdit *, const QString &)
void button_clicked(QAbstractButton *button)
QRadioButton * icon_size_small
QRadioButton * general_icon_letter
QCheckBox * editor_codeCompletion
QDialogButtonBox * button_box
QCheckBox * sync_octave_directory
void read_workspace_colors(QSettings *settings)
QGridLayout * editor_grid_current_line
QRadioButton * icon_size_large
QGroupBox * workspace_colors_box
where the brackets indicate optional arguments and and character or cell array For character arrays the conversion is repeated for every row
Definition: str2double.cc:342
static const int MaxStyleNumber
QCheckBox * cb_prompt_to_exit
QCheckBox * cb_edit_status_bar
QSpinBox * editor_notebook_tab_width_min