annotate libgui/src/gui-settings.h @ 31646:c6d54dd31a7e stable

maint: Use macros to begin/end C++ namespaces. * BaseControl.cc, BaseControl.h, ButtonControl.cc, ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h, CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h, ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc, Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h, GenericEventNotify.h, KeyMap.cc, KeyMap.h, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, Object.cc, Object.h, ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc, PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc, PushTool.h, QtHandlesUtils.cc, QtHandlesUtils.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc, SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, TextEdit.cc, TextEdit.h, ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h, ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, annotation-dialog.cc, annotation-dialog.h, gl-select.cc, gl-select.h, qopengl-functions.h, qt-graphics-toolkit.cc, qt-graphics-toolkit.h, QTerminal.h, color-picker.cc, color-picker.h, command-widget.cc, command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc, documentation.h, dw-main-window.cc, dw-main-window.h, external-editor-interface.cc, external-editor-interface.h, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc, find-files-dialog.h, find-files-model.cc, find-files-model.h, graphics-init.cc, graphics-init.h, gui-settings.cc, gui-settings.h, gui-utils.cc, gui-utils.h, history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc, interpreter-qobject.h, led-indicator.cc, led-indicator.h, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h, octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h, news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h, qt-interpreter-events.cc, qt-interpreter-events.h, qt-utils.h, release-notes.cc, release-notes.h, resource-manager.cc, resource-manager.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc, set-path-model.h, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, tab-bar.cc, tab-bar.h, terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc, variable-editor-model.h, variable-editor.cc, variable-editor.h, welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h, workspace-view.cc, workspace-view.h: Use new macros to begin/end C++ namespaces.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Dec 2022 14:37:51 -0500
parents 69c8979f8b2c
children 431f80aba37a 29d734430e5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30398
diff changeset
3 // Copyright (C) 2019-2022 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 #if ! defined (octave_gui_settings_h)
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 #define octave_gui_settings_h 1
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 31558
diff changeset
29 #include "octave-config.h"
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 31558
diff changeset
30
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 #include <QSettings>
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32
27672
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
33 #include "gui-preferences.h"
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
34
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 31558
diff changeset
35 OCTAVE_BEGIN_NAMESPACE(octave)
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 31558
diff changeset
36
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 class gui_settings : public QSettings
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 {
27672
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
39 Q_OBJECT
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
40
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 public:
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 gui_settings (const QString& file_name, QSettings::Format format,
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 QObject *parent = nullptr)
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 : QSettings (file_name, format, parent)
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 { }
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 gui_settings (QSettings::Format format, QSettings::Scope scope,
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 const QString& organization,
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 const QString& application = QString (),
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 QObject *parent = nullptr)
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 : QSettings (format, scope, organization, application, parent)
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 { }
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 // No copying!
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 gui_settings (const gui_settings&) = delete;
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59 gui_settings& operator = (const gui_settings&) = delete;
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 ~gui_settings (void) = default;
27672
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
62
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
63 using QSettings::value;
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
64
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
65 QVariant value (const gui_pref& pref) const
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
66 {
28497
2813ac10ca1e force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27923
diff changeset
67 if (pref.ignore)
2813ac10ca1e force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27923
diff changeset
68 return pref.def; // ignore the current pref and always use default
2813ac10ca1e force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27923
diff changeset
69
27672
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
70 return value (pref.key, pref.def);
a36443e94f8a simplify gui_settings->value (PREF.key, PREF.def) calls
John W. Eaton <jwe@octave.org>
parents: 27611
diff changeset
71 }
27724
19e80f22aa47 provide structure and settings value method for shortcut key sequences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27672
diff changeset
72
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
73 /*!
29498
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
74 Reading a color from the given QVaraitn @p def taking different
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
75 color modes into account. The default value for a second color mode
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
76 @p mode=1 is deterimined from the standard default value @p mode=0
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
77 by inverting the lightness
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
78 \f{eqnarray*}{
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
79 H_1 &=& H_0\\
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
80 S_1 &=& S_0\\
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
81 L_1 &=& 1.0 - 0.85 L_0 L_0 > 0.3
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
82 L_1 &=& 1.0 - 0.70 L_0 L_0 < 0.3
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
83 \f}
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
84
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
85 @param def Color default value given by a QVariant of QColor
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
86 or QPalette::ColorRole
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
87 @param mode Color mode (currently 0 or 1, default is 0)
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
88
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
89 @return Color as QColor
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
90 */
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
91 QColor get_color_value (const QVariant& def, int mode = 0) const;
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
92
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
93 /*!
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
94 Reading a color from the gui_settings taking possible color modes
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
95 into account. The default value for a second color mode @p mode=1 is
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
96 deterimined from the standard default value @p mode=0 by inverting
29498
5384bb4efc51 rearrange default lexer settings and add second color mode to gui editor
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29487
diff changeset
97 the lightness (see get_color_value())
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
98
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
99 @param pref gui preference (key string, default value); the default
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
100 value can be given by QColor or QPalette::ColorRole
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
101 @param mode Color mode (currently 0 or 1, default is 0)
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
102
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
103 @return Color as QColor
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
104 */
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
105 QColor color_value (const gui_pref& pref, int mode = 0) const;
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
106
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
107 /*!
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
108 Writing a color to the gui_settings taking possible color modes
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
109 into account. When @p mode is not zero (standard mode), the
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
110 extension related to the mode is appended to the settings key string
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
111
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
112 @param pref gui preference where the color should be written
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
113 @param color QColor to write to the settings
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
114 @param mode Color mode (currently 0 or 1, default is 0)
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
115
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
116 */
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
117 void set_color_value (const gui_pref& pref, const QColor& color,
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
118 int mode = 0);
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
119
27818
fa0582694fda replace literal strings by symbolic constants for shortcut preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27724
diff changeset
120 QString sc_value (const sc_pref& pref) const;
fa0582694fda replace literal strings by symbolic constants for shortcut preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27724
diff changeset
121
fa0582694fda replace literal strings by symbolic constants for shortcut preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27724
diff changeset
122 QKeySequence sc_def_value (const sc_pref& pref) const;
27724
19e80f22aa47 provide structure and settings value method for shortcut key sequences
Torsten Lilge <ttl-octave@mailbox.org>
parents: 27672
diff changeset
123
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
124 };
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
125
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 31558
diff changeset
126 OCTAVE_END_NAMESPACE(octave)
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
127
31558
69c8979f8b2c fix missing trnaslation for new strings in settings dialog (bug #63404)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 31304
diff changeset
128 // Some constants used in the preferences of several widgets and therefore
69c8979f8b2c fix missing trnaslation for new strings in settings dialog (bug #63404)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 31304
diff changeset
129 // defined globally here
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
130
31558
69c8979f8b2c fix missing trnaslation for new strings in settings dialog (bug #63404)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 31304
diff changeset
131 // Constants for handling different color schemes
69c8979f8b2c fix missing trnaslation for new strings in settings dialog (bug #63404)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 31304
diff changeset
132 const QColor settings_color_no_change (255, 0, 255);
29484
bed2fd5b8263 allow a second color theme for the console window (dark mode)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29358
diff changeset
133 const QStringList settings_color_modes_ext (QStringList () << "" << "_2");
29524
730cac3d6d5a allow reloading default colors and styles in the preferences dialog
Torsten Lilge <ttl-octave@mailbox.org>
parents: 29498
diff changeset
134 const int settings_reload_default_colors_flag = -1;
31558
69c8979f8b2c fix missing trnaslation for new strings in settings dialog (bug #63404)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 31304
diff changeset
135
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
136 #endif
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents:
diff changeset
137