GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
gui-preferences-cs.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_cs_h)
27 #define octave_gui_preferences_cs_h 1
28 
29 #include "gui-preferences.h"
30 #include "gui-settings.h"
31 
32 // Console preferences
33 
34 const gui_pref
35 cs_font ("terminal/fontName", QVariant ());
36 
37 const gui_pref
38 cs_font_size ("terminal/fontSize", QVariant (10));
39 
40 const std::vector<std::string> cs_cursor_types =
41 {
42  "ibeam",
43  "block",
44  "underline"
45 };
46 
47 const gui_pref
48 cs_cursor ("terminal/cursorType", QVariant ("ibeam"));
49 
50 const gui_pref
51 cs_cursor_blinking ("terminal/cursorBlinking", QVariant (true));
52 
53 const gui_pref
54 cs_cursor_use_fgcol ("terminal/cursorUseForegroundColor", QVariant (true));
55 
56 const gui_pref
57 cs_hist_buffer ("terminal/history_buffer", QVariant (1000));
58 
59 const gui_pref
60 cs_color_mode ("terminal/color_mode", QVariant (0));
61 
62 const unsigned int cs_colors_count = 4;
64 {
65  {"terminal/color_f" + settings_color_modes_ext[0], QVariant (QPalette::WindowText)},
66  {"terminal/color_b" + settings_color_modes_ext[0], QVariant (QPalette::Base)},
67  {"terminal/color_s" + settings_color_modes_ext[0], QVariant (QPalette::Highlight)},
68  {"terminal/color_c" + settings_color_modes_ext[0], QVariant (QPalette::QPalette::WindowText)},
69  {"terminal/color_f" + settings_color_modes_ext[1], QVariant ()}, // Default colors for 2nd mode empty,
70  {"terminal/color_b" + settings_color_modes_ext[1], QVariant ()}, // since they are determined at runtime
71  {"terminal/color_s" + settings_color_modes_ext[1], QVariant ()}, // by inverting the lightness of the
72  {"terminal/color_c" + settings_color_modes_ext[1], QVariant ()} // default colors in light mode
73 };
74 const QStringList
76  QT_TRANSLATE_NOOP ("octave::settings_dialog", "foreground"),
77  QT_TRANSLATE_NOOP ("octave::settings_dialog", "background"),
78  QT_TRANSLATE_NOOP ("octave::settings_dialog", "selection"),
79  QT_TRANSLATE_NOOP ("octave::settings_dialog", "cursor")
80 };
81 
82 const gui_pref
83 cs_focus_cmd ("terminal/focus_after_command", QVariant (false));
84 
85 const gui_pref
86 cs_dbg_location ("terminal/print_debug_location", QVariant (false));
87 
88 #endif
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 QStringList settings_color_modes_ext(QStringList()<< ""<< "_2")