GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
gui-preferences-ve.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2017-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_gui_preferences_ve_h)
27 #define octave_gui_preferences_ve_h 1
28 
29 #include "gui-preferences.h"
30 
31 #include <QApplication>
32 
33 // Variable Editor preferences
34 
35 const gui_pref
36 ve_use_terminal_font ("variable_editor/use_terminal_font", QVariant (true));
37 
38 const gui_pref
39 ve_font_name ("variable_editor/font_name", QVariant ());
40 
41 const gui_pref
42 ve_font_size ("variable_editor/font_size", QVariant (10));
43 
44 const gui_pref
45 ve_column_width ("variable_editor/column_width", QVariant (100));
46 
47 const gui_pref
48 ve_row_height ("variable_editor/row_height", QVariant (10));
49 
50 const gui_pref
51 ve_alternate_rows ("variable_editor/alternate_rows", QVariant (false));
52 
53 const gui_pref
54 ve_color_mode ("variable_editor/color_mode", QVariant (0));
55 
56 const QString ve_color_chars ("fbsha");
57 
58 const int ve_colors_count = 5;
60 {
61  {"variable_editor/color_f" + settings_color_modes_ext[0], QVariant (QPalette::WindowText)},
62  {"variable_editor/color_b" + settings_color_modes_ext[0], QVariant (QPalette::Base)},
63  {"variable_editor/color_s" + settings_color_modes_ext[0], QVariant (QPalette::HighlightedText)},
64  {"variable_editor/color_h" + settings_color_modes_ext[0], QVariant (QPalette::Highlight)},
65  {"variable_editor/color_a" + settings_color_modes_ext[0], QVariant (QPalette::AlternateBase)},
66  {"variable_editor/color_f" + settings_color_modes_ext[1], QVariant ()},
67  {"variable_editor/color_b" + settings_color_modes_ext[1], QVariant ()},
68  {"variable_editor/color_s" + settings_color_modes_ext[1], QVariant ()},
69  {"variable_editor/color_h" + settings_color_modes_ext[1], QVariant ()},
70  {"variable_editor/color_a" + settings_color_modes_ext[1], QVariant ()}
71 };
72 
73 const QStringList ve_color_names = {
74  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Foreground"),
75  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Background"),
76  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Selected Foreground"),
77  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Selected Background"),
78  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Alternate Background")
79 };
80 
81 const QStringList ve_save_formats = {
82  "ascii",
83  "binary",
84  "float-binary",
85  "hdf5",
86  "float-hdf5",
87  "text",
88  "mat7-binary",
89  "mat-binary",
90  "mat4-binary",
91  "zip"
92 };
93 
94 // The following list is a relation between save format and fiel extension.
95 // The format string are case insensitive.
96 const QStringList ve_save_formats_ext = {
97  "-ascii", "dat",
98  "-hdf5", "h5",
99  "-text", "txt",
100  "-v7.3", "mat",
101  "-7.3", "mat",
102  "-v7", "mat",
103  "-7", "mat",
104  "-mat7-binary", "mat",
105  "-v6", "mat",
106  "-6", "mat",
107  "-mat-binary", "mat",
108  "-v4", "mat",
109  "-4", "mat",
110  "-mat4-binary", "mat",
111  "-binary", "bin", // after other fmt incl. "-binary"
112  "-z", "txt.gz" // gzipped -text
113 };
114 
115 #endif
const gui_pref ve_color_mode("variable_editor/color_mode", QVariant(0))
const int ve_colors_count
const QStringList ve_save_formats
const gui_pref ve_column_width("variable_editor/column_width", QVariant(100))
const QString ve_color_chars("fbsha")
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 QStringList ve_save_formats_ext
const gui_pref ve_colors[2 *ve_colors_count]
const gui_pref ve_row_height("variable_editor/row_height", QVariant(10))
const QStringList settings_color_modes_ext(QStringList()<< ""<< "_2")