GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
gui-preferences-global.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_global_h)
27 #define octave_gui_preferences_global_h 1
28 
29 #include "gui-preferences.h"
30 
31 // Constants
32 
33 const QString gui_obj_name_main_window = "MainWindow";
34 
35 // Global preferences
36 
37 // Get the default monospaced font
38 #if defined (Q_OS_WIN)
39 const QString global_font_family = "Courier";
40 #elif defined (Q_OS_MAC)
41 const QString global_font_family = "Monaco";
42 #else
43 const QString global_font_family = "Monospace";
44 #endif
45 
46 const gui_pref
48 
49 // Style
50 
51 const gui_pref
52 global_style ("style", QVariant ("default"));
53 
54 const QString
55 global_toolbar_style ("QToolBar {"
56  "margin-top: 0px;"
57  "margin-bottom: 0px;"
58  "padding-top: 0px;"
59  "padding-bottom: 0px;"
60  "border-top: 0px;"
61  "border-bottom: 0px;"
62  "}");
63 
64 const QString
65 global_menubar_style ("QMenuBar {"
66  "margin-top: 0px;"
67  "margin-bottom: 0px;"
68  "padding-top: 0px;"
69  "padding-bottom: 0px;"
70  "}");
71 
72 // Icon size (in preferences: values -1, 0, 1)
73 
74 const QStyle::PixelMetric global_icon_sizes[3] =
75 {
76  QStyle::PM_SmallIconSize,
77  QStyle::PM_ToolBarIconSize,
78  QStyle::PM_LargeIconSize
79 };
80 
81 const gui_pref
82 global_icon_size ("toolbar_icon_size", QVariant (0));
83 
84 const gui_pref
85 global_icon_theme ("use_system_icon_theme", QVariant (true));
86 
87 enum
88 {
93 } ;
94 
95 const QStringList
97  "",
98  ":/icons/octave/128x128/",
99  ":/icons/tango/128x128/",
100  ":/icons/cursors/"
101 };
102 
103 const gui_pref
104 global_icon_theme_index ("icon_theme", QVariant (ICON_THEME_SYSTEM));
105 const QStringList
107  "",
108  "octave",
109  "tango",
110  "cursors"
111 };
112 
113 const QStringList
115  "System",
116  "Octave",
117  "Tango"
118 };
119 
120 const gui_pref
121 global_status_bar ("show_status_bar", QVariant (true));
122 
123 
124 enum
125 {
127 } ;
128 const QStringList
130  "Fusion-Dark"
131 };
132 
133 #if defined (Q_OS_MAC)
134 // prevent native file dialogs on MAC by setting the default "false" and
135 // setting the flag for ignoring the pref to "true" (3rd argument)
136 const gui_pref
137 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false), true);
138 #elif defined (Q_OS_WIN32)
139 const gui_pref
140 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false));
141 #else
142 const gui_pref
143 global_use_native_dialogs ("use_native_file_dialogs", QVariant (true));
144 #endif
145 
146 const gui_pref
147 global_cursor_blinking ("cursor_blinking", QVariant (true));
148 
149 const gui_pref
150 global_language ("language", QVariant ("SYSTEM"));
151 
152 const gui_pref
153 global_ov_startup_dir ("octave_startup_dir", QVariant (QString ()));
154 const gui_pref
155 global_restore_ov_dir ("restore_octave_dir", QVariant (false));
156 
157 const gui_pref
158 global_use_custom_editor ("useCustomFileEditor", QVariant (false));
159 
160 #if defined (Q_OS_WIN32)
161 const gui_pref
162 global_custom_editor ("customFileEditor", QVariant ("notepad++ -n%l %f"));
163 #else
164 const gui_pref
165 global_custom_editor ("customFileEditor", QVariant ("emacs +%l %f"));
166 #endif
167 
168 const gui_pref
169 global_prompt_to_exit ("prompt_to_exit", QVariant (false));
170 
171 // Proxy
172 
173 const gui_pref
174 global_proxy_host ("proxyHostName", QVariant (QString ()));
175 const gui_pref
176 global_use_proxy ("useProxyServer", QVariant (false));
177 const gui_pref
178 global_proxy_type ("proxyType", QVariant (QString ()));
179 const gui_pref
180 global_proxy_port ("proxyPort", QVariant (80));
181 const gui_pref
182 global_proxy_user ("proxyUserName", QVariant (QString ()));
183 const gui_pref
184 global_proxy_pass ("proxyPassword", QVariant (QString ()));
185 
186 const QStringList
188  "HttpProxy",
189  "Socks5Proxy",
190  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables")
191 };
192 
194 
195 #endif
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 QString global_menubar_style("QMenuBar {" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "}")
const QStyle::PixelMetric global_icon_sizes[3]
const gui_pref global_proxy_host("proxyHostName", QVariant(QString()))
const QList< int > global_proxy_manual_types
const QString gui_obj_name_main_window
const gui_pref global_prompt_to_exit("prompt_to_exit", QVariant(false))
const QStringList global_icon_paths
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_icon_theme("use_system_icon_theme", QVariant(true))
const gui_pref global_use_custom_editor("useCustomFileEditor", QVariant(false))
const QStringList global_proxy_all_types
@ EXTRA_STYLE_FUSION_DARK
const gui_pref global_ov_startup_dir("octave_startup_dir", QVariant(QString()))
const gui_pref global_custom_editor("customFileEditor", QVariant("emacs +%l %f"))
const QString global_font_family
const QStringList global_extra_styles
const QString global_toolbar_style("QToolBar {" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "border-top: 0px;" "border-bottom: 0px;" "}")
@ ICON_THEME_CURSORS
@ ICON_THEME_SYSTEM
@ ICON_THEME_OCTAVE
@ ICON_THEME_TANGO
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 QStringList global_all_icon_themes
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"))