GNU Octave 7.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-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_global_h)
27#define octave_gui_preferences_global_h 1
28
29#include "gui-preferences.h"
30
31// Constants
32
33const QString gui_obj_name_main_window = "MainWindow";
34
35// Global preferences
36
37// Get the default monospaced font
38#if defined (Q_OS_WIN)
39const QString global_font_family = "Courier";
40#elif defined (Q_OS_MAC)
41const QString global_font_family = "Monaco";
42#else
43const QString global_font_family = "Monospace";
44#endif
45
46const gui_pref
48
49// Style
50
51const gui_pref
52global_style ("style", QVariant ("default"));
53
54const QString
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
64const QString
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
74const QStyle::PixelMetric global_icon_sizes[3] =
75{
76 QStyle::PM_SmallIconSize,
77 QStyle::PM_ToolBarIconSize,
78 QStyle::PM_LargeIconSize
79};
80
81const gui_pref
82global_icon_size ("toolbar_icon_size", QVariant (0));
83
84const gui_pref
85global_icon_theme ("use_system_icon_theme", QVariant (true));
86
87// Other
88
89const gui_pref
90global_status_bar ("show_status_bar", QVariant (true));
91
92#if defined (Q_OS_MAC)
93// prevent native file dialogs on MAC by setting the default "false" and
94// setting the flag for ignoring the pref to "true" (3rd argument)
95const gui_pref
96global_use_native_dialogs ("use_native_file_dialogs", QVariant (false), true);
97#elif defined (Q_OS_WIN32)
98const gui_pref
99global_use_native_dialogs ("use_native_file_dialogs", QVariant (false));
100#else
101const gui_pref
102global_use_native_dialogs ("use_native_file_dialogs", QVariant (true));
103#endif
104
105const gui_pref
106global_cursor_blinking ("cursor_blinking", QVariant (true));
107
108const gui_pref
109global_language ("language", QVariant ("SYSTEM"));
110
111const gui_pref
112global_ov_startup_dir ("octave_startup_dir", QVariant (QString ()));
113const gui_pref
114global_restore_ov_dir ("restore_octave_dir", QVariant (false));
115
116const gui_pref
117global_use_custom_editor ("useCustomFileEditor", QVariant (false));
118
119#if defined (Q_OS_WIN32)
120const gui_pref
121global_custom_editor ("customFileEditor", QVariant ("notepad++ -n%l %f"));
122#else
123const gui_pref
124global_custom_editor ("customFileEditor", QVariant ("emacs +%l %f"));
125#endif
126
127const gui_pref
128global_prompt_to_exit ("prompt_to_exit", QVariant (false));
129
130// Proxy
131
132const gui_pref
133global_proxy_host ("proxyHostName", QVariant (QString ()));
134const gui_pref
135global_use_proxy ("useProxyServer", QVariant (false));
136const gui_pref
137global_proxy_type ("proxyType", QVariant (QString ()));
138const gui_pref
139global_proxy_port ("proxyPort", QVariant (80));
140const gui_pref
141global_proxy_user ("proxyUserName", QVariant (QString ()));
142const gui_pref
143global_proxy_pass ("proxyPassword", QVariant (QString ()));
144
145const QStringList
147 << "HttpProxy"
148 << "Socks5Proxy"
149 << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables")
150 );
151const QList<int>
153
154#endif
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 QStringList global_proxy_all_types(QStringList()<< "HttpProxy"<< "Socks5Proxy"<< QT_TRANSLATE_NOOP("octave::settings_dialog", "Environment Variables"))
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 QString gui_obj_name_main_window
const gui_pref global_prompt_to_exit("prompt_to_exit", QVariant(false))
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 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 QString global_toolbar_style("QToolBar {" "margin-top: 0px;" "margin-bottom: 0px;" "padding-top: 0px;" "padding-bottom: 0px;" "border-top: 0px;" "border-bottom: 0px;" "}")
const gui_pref global_proxy_port("proxyPort", QVariant(80))
const gui_pref global_icon_size("toolbar_icon_size", QVariant(0))
const gui_pref global_language("language", QVariant("SYSTEM"))
const QList< int > global_proxy_manual_types(QList< int >()<< 0<< 1)
const gui_pref global_cursor_blinking("cursor_blinking", QVariant(true))
const gui_pref global_style("style", QVariant("default"))