Mercurial > octave
annotate libgui/src/gui-preferences-global.h @ 31599:50a225732661 stable
use initializer lists instead of insertion operators
* gui-preferences-cs.h, gui-preferences-ed.h,
gui-preferences-global.h, gui-preferences-ve.h, gui-preferences-ws.h,
main-window.cc: Where possible, use initializer lists ({ a, b, ... })
instead of insertion operators (QStringList () << a << b << ...).
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 01 Dec 2022 12:50:48 -0500 |
parents | 291994766c55 |
children | 6dfaaf8ecf3b 597f3ee61a48 |
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) 2017-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 //////////////////////////////////////////////////////////////////////// |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 #if ! defined (octave_gui_preferences_global_h) |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 #define octave_gui_preferences_global_h 1 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 #include "gui-preferences.h" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 |
29895
744bb06fea2a
avoid connecting non existing signals from variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
31 // Constants |
744bb06fea2a
avoid connecting non existing signals from variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
32 |
744bb06fea2a
avoid connecting non existing signals from variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
33 const QString gui_obj_name_main_window = "MainWindow"; |
744bb06fea2a
avoid connecting non existing signals from variable editor
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29535
diff
changeset
|
34 |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 // Global preferences |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 // Get the default monospaced font |
28777
0d6795d0373d
improved detection of standard fixed witdh font (bug #59128)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28498
diff
changeset
|
38 #if defined (Q_OS_WIN) |
0d6795d0373d
improved detection of standard fixed witdh font (bug #59128)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28498
diff
changeset
|
39 const QString global_font_family = "Courier"; |
0d6795d0373d
improved detection of standard fixed witdh font (bug #59128)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28498
diff
changeset
|
40 #elif defined (Q_OS_MAC) |
0d6795d0373d
improved detection of standard fixed witdh font (bug #59128)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28498
diff
changeset
|
41 const QString global_font_family = "Monaco"; |
0d6795d0373d
improved detection of standard fixed witdh font (bug #59128)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
28498
diff
changeset
|
42 #else |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 const QString global_font_family = "Monospace"; |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 #endif |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 const gui_pref |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 global_mono_font ("monospace_font", global_font_family); |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 |
27805
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
49 // Style |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
50 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
51 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
52 global_style ("style", QVariant ("default")); |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 const QString |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 global_toolbar_style ("QToolBar {" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 "margin-top: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 "margin-bottom: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 "padding-top: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 "padding-bottom: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 "border-top: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 "border-bottom: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 "}"); |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 const QString |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 global_menubar_style ("QMenuBar {" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 "margin-top: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 "margin-bottom: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 "padding-top: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 "padding-bottom: 0px;" |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 "}"); |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 // Icon size (in preferences: values -1, 0, 1) |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 const QStyle::PixelMetric global_icon_sizes[3] = |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 { |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 QStyle::PM_SmallIconSize, |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 QStyle::PM_ToolBarIconSize, |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 QStyle::PM_LargeIconSize |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 }; |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 const gui_pref |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 global_icon_size ("toolbar_icon_size", QVariant (0)); |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 const gui_pref |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 global_icon_theme ("use_system_icon_theme", QVariant (true)); |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 |
30777
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
87 enum |
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
88 { |
30788
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
89 ICON_THEME_SYSTEM = 0, |
30777
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
90 ICON_THEME_OCTAVE, |
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
91 ICON_THEME_TANGO, |
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
92 ICON_THEME_CURSORS |
30788
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
93 } ; |
30777
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
94 |
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
95 const QStringList |
31599
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
96 global_icon_paths = { |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
97 "", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
98 ":/icons/octave/128x128/", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
99 ":/icons/tango/128x128/", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
100 ":/icons/cursors/" |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
101 }; |
30777
439eb9bd4c04
icon fallback concept without QIcon::fallbackSearchPaths (bug #62106)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30564
diff
changeset
|
102 |
30788
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
103 const gui_pref |
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
104 global_icon_theme_index ("icon_theme", QVariant (ICON_THEME_SYSTEM)); |
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
105 const QStringList |
31599
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
106 global_all_icon_themes = { |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
107 "", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
108 "octave", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
109 "tango", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
110 "cursors" |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
111 }; |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
112 |
30788
c11d34f72b3c
provide different icon sets for the GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents:
30777
diff
changeset
|
113 const QStringList |
31599
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
114 global_all_icon_theme_names = { |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
115 "System", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
116 "Octave", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
117 "Tango" |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
118 }; |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 |
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
120 const gui_pref |
27805
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
121 global_status_bar ("show_status_bar", QVariant (true)); |
27570
775412096ae4
use symbolic constants for file dock widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27560
diff
changeset
|
122 |
30965
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
123 |
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
124 enum |
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
125 { |
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
126 EXTRA_STYLE_FUSION_DARK = 0 |
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
127 } ; |
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
128 const QStringList |
31599
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
129 global_extra_styles = { |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
130 "Fusion-Dark" |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
131 }; |
30965
291994766c55
add fusion dark style to gui
Farid Partonia <f.partonia@gmail.com>
parents:
30788
diff
changeset
|
132 |
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
|
133 #if defined (Q_OS_MAC) |
2813ac10ca1e
force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
134 // prevent native file dialogs on MAC by setting the default "false" and |
2813ac10ca1e
force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
135 // setting the flag for ignoring the pref to "true" (3rd argument) |
2813ac10ca1e
force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
136 const gui_pref |
2813ac10ca1e
force non-native file dialogs on Mac ignoring current user pref (bug #52840)
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
137 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false), true); |
28498
2de2b2ddd032
On Windows, change default for "Use native file dialogs" to false (bug #58521).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28497
diff
changeset
|
138 #elif defined (Q_OS_WIN32) |
2de2b2ddd032
On Windows, change default for "Use native file dialogs" to false (bug #58521).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28497
diff
changeset
|
139 const gui_pref |
2de2b2ddd032
On Windows, change default for "Use native file dialogs" to false (bug #58521).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28497
diff
changeset
|
140 global_use_native_dialogs ("use_native_file_dialogs", QVariant (false)); |
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
|
141 #else |
27570
775412096ae4
use symbolic constants for file dock widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27560
diff
changeset
|
142 const gui_pref |
775412096ae4
use symbolic constants for file dock widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27560
diff
changeset
|
143 global_use_native_dialogs ("use_native_file_dialogs", QVariant (true)); |
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
|
144 #endif |
27570
775412096ae4
use symbolic constants for file dock widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27560
diff
changeset
|
145 |
27583
315c35e6037c
use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27570
diff
changeset
|
146 const gui_pref |
315c35e6037c
use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27570
diff
changeset
|
147 global_cursor_blinking ("cursor_blinking", QVariant (true)); |
315c35e6037c
use symbolic constants for command widget preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27570
diff
changeset
|
148 |
27805
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
149 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
150 global_language ("language", QVariant ("SYSTEM")); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
151 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
152 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
153 global_ov_startup_dir ("octave_startup_dir", QVariant (QString ())); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
154 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
155 global_restore_ov_dir ("restore_octave_dir", QVariant (false)); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
156 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
157 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
158 global_use_custom_editor ("useCustomFileEditor", QVariant (false)); |
29511
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
159 |
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
160 #if defined (Q_OS_WIN32) |
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
161 const gui_pref |
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
162 global_custom_editor ("customFileEditor", QVariant ("notepad++ -n%l %f")); |
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
163 #else |
27805
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
164 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
165 global_custom_editor ("customFileEditor", QVariant ("emacs +%l %f")); |
29511
2a4980872234
remove default-qt-settings
Torsten Lilge <ttl-octave@mailbox.org>
parents:
29359
diff
changeset
|
166 #endif |
27805
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
167 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
168 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
169 global_prompt_to_exit ("prompt_to_exit", QVariant (false)); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
170 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
171 // Proxy |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
172 |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
173 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
174 global_proxy_host ("proxyHostName", QVariant (QString ())); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
175 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
176 global_use_proxy ("useProxyServer", QVariant (false)); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
177 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
178 global_proxy_type ("proxyType", QVariant (QString ())); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
179 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
180 global_proxy_port ("proxyPort", QVariant (80)); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
181 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
182 global_proxy_user ("proxyUserName", QVariant (QString ())); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
183 const gui_pref |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
184 global_proxy_pass ("proxyPassword", QVariant (QString ())); |
dccc551aa83b
replace literal strings by symbolic constants for global preferences
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27583
diff
changeset
|
185 |
28409
ed8d11b1027d
reorganize network preferences in settings dialog
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
186 const QStringList |
31599
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
187 global_proxy_all_types = { |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
188 "HttpProxy", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
189 "Socks5Proxy", |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
190 QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables") |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
191 }; |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
192 |
50a225732661
use initializer lists instead of insertion operators
John W. Eaton <jwe@octave.org>
parents:
30965
diff
changeset
|
193 const QList<int> global_proxy_manual_types = { 0, 1 }; |
28409
ed8d11b1027d
reorganize network preferences in settings dialog
Torsten Lilge <ttl-octave@mailbox.org>
parents:
27923
diff
changeset
|
194 |
27560
3fcc650de22f
split gui-preferences.h into one file per widget
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
195 #endif |