GNU Octave 7.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-2022 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
35const gui_pref
36ve_use_terminal_font ("variable_editor/use_terminal_font", QVariant (true));
37
38const gui_pref
39ve_font_name ("variable_editor/font_name", QVariant ());
40
41const gui_pref
42ve_font_size ("variable_editor/font_size", QVariant (10));
43
44const gui_pref
45ve_column_width ("variable_editor/column_width", QVariant (100));
46
47const gui_pref
48ve_row_height ("variable_editor/row_height", QVariant (10));
49
50const gui_pref
51ve_alternate_rows ("variable_editor/alternate_rows", QVariant (false));
52
53const gui_pref
54ve_color_mode ("variable_editor/color_mode", QVariant (0));
55
56const QString ve_color_chars ("fbsha");
57
58const 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
73const QStringList ve_color_names (QStringList ()
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
80const QStringList ve_save_formats (QStringList ()
81 << "ascii"
82 << "binary"
83 << "float-binary"
84 << "hdf5"
85 << "float-hdf5"
86 << "text"
87 << "mat7-binary"
88 << "mat-binary"
89 << "mat4-binary"
90 << "zip");
91
92// The following list is a relation between save format and fiel extension.
93// The format string are case insensitive.
94const QStringList ve_save_formats_ext (QStringList ()
95 << "-ascii" << "dat"
96 << "-hdf5" << "h5"
97 << "-text" << "txt"
98 << "-v7.3" << "mat"
99 << "-7.3" << "mat"
100 << "-v7" << "mat"
101 << "-7" << "mat"
102 << "-mat7-binary" << "mat"
103 << "-v6" << "mat"
104 << "-6" << "mat"
105 << "-mat-binary" << "mat"
106 << "-v4" << "mat"
107 << "-4" << "mat"
108 << "-mat4-binary" << "mat"
109 << "-binary" << "bin" // after other fmt incl. "-binary"
110 << "-z" << "txt.gz" // gzipped -text
111 );
112
113#endif
const gui_pref ve_color_mode("variable_editor/color_mode", QVariant(0))
const int ve_colors_count
const QStringList ve_save_formats(QStringList()<< "ascii"<< "binary"<< "float-binary"<< "hdf5"<< "float-hdf5"<< "text"<< "mat7-binary"<< "mat-binary"<< "mat4-binary"<< "zip")
const gui_pref ve_column_width("variable_editor/column_width", QVariant(100))
const QStringList ve_color_names(QStringList()<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Foreground")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Background")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Selected Foreground")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Selected Background")<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Alternate Background"))
const QString ve_color_chars("fbsha")
const QStringList ve_save_formats_ext(QStringList()<< "-ascii"<< "dat"<< "-hdf5"<< "h5"<< "-text"<< "txt"<< "-v7.3"<< "mat"<< "-7.3"<< "mat"<< "-v7"<< "mat"<< "-7"<< "mat"<< "-mat7-binary"<< "mat"<< "-v6"<< "mat"<< "-6"<< "mat"<< "-mat-binary"<< "mat"<< "-v4"<< "mat"<< "-4"<< "mat"<< "-mat4-binary"<< "mat"<< "-binary"<< "bin"<< "-z"<< "txt.gz")
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 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 QStringList settings_color_modes_ext(QStringList()<< ""<< "_2")