annotate libgui/src/welcome-wizard.cc @ 33634:4a70f390c85e default tip @

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 28 May 2024 15:25:54 +0200
parents 4b601ca024d5
children
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 //
32632
2e484f9f1f18 maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 32519
diff changeset
3 // Copyright (C) 2011-2024 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 ////////////////////////////////////////////////////////////////////////
13674
c0e66d6e3dc8 Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13668
diff changeset
25
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21301
diff changeset
26 #if defined (HAVE_CONFIG_H)
21301
40de9f8f23a6 Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents: 21203
diff changeset
27 # include "config.h"
15286
ae9079bbc627 Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents: 15204
diff changeset
28 #endif
ae9079bbc627 Add '#include <config.h>' to C++ files in libgui/src
Rik <rik@octave.org>
parents: 15204
diff changeset
29
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
30 #include <QApplication>
27412
da1f59fe04b3 try to use consitent ordering for include files in libgui sources
John W. Eaton <jwe@octave.org>
parents: 27101
diff changeset
31 #include <QHBoxLayout>
17937
f87a7e161710 * welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents: 17935
diff changeset
32 #include <QPushButton>
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
33 #include <QVBoxLayout>
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
34
21979
d04da18a407a use OCTAVE_USE_WINDOWS_API more consistently
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
35 #if defined (OCTAVE_USE_WINDOWS_API)
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
36 #define WIN32_LEAN_AND_MEAN
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
37 #include <windows.h>
19886
17d21d68888d GUI: force show of welcome wizard when displayed (Bug #41074)
John Donoghue
parents: 19861
diff changeset
38 #endif
17d21d68888d GUI: force show of welcome wizard when displayed (Bug #41074)
John Donoghue
parents: 19861
diff changeset
39
30964
04601f6c47f4 fix broken icon path after new icon structure in GUI
Torsten Lilge <ttl-octave@mailbox.org>
parents: 30690
diff changeset
40 #include "gui-preferences-dw.h"
27620
45bb5bbaf291 don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents: 27613
diff changeset
41 #include "gui-preferences-nr.h"
31619
ad014fc78bd6 use individual local gui_settings objects
John W. Eaton <jwe@octave.org>
parents: 30964
diff changeset
42 #include "gui-settings.h"
14707
674740c44c09 Changed various files to matche file naming conventions.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 14703
diff changeset
43 #include "welcome-wizard.h"
13668
421afeae929b Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
44
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30964
diff changeset
45 OCTAVE_BEGIN_NAMESPACE(octave)
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30964
diff changeset
46
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
47 static QLabel *
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
48 make_octave_logo (QWidget *p = nullptr, int height = 100)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
49 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
50 QLabel *logo = new QLabel (p);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
51 QPixmap logo_pixmap (dw_icon_set_names["NONE"]);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
52 logo->setPixmap (logo_pixmap.scaledToHeight (height));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
53 return logo;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
54 };
27101
097774bed4ed move some static functions inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 27087
diff changeset
55
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
56 welcome_wizard::welcome_wizard (QWidget *p)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
57 : QDialog (p), m_page_ctor_list (), m_page_list_iterator (),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
58 m_current_page (initial_page::create (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
59 m_allow_web_connect_state (false),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
60 m_max_height (0), m_max_width (0)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
61 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
62 m_page_ctor_list.push_back (initial_page::create);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
63 m_page_ctor_list.push_back (setup_community_news::create);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
64 m_page_ctor_list.push_back (final_page::create);
17937
f87a7e161710 * welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents: 17935
diff changeset
65
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
66 m_page_list_iterator = m_page_ctor_list.begin ();
17937
f87a7e161710 * welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents: 17935
diff changeset
67
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
68 setWindowTitle (tr ("Welcome to GNU Octave"));
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
69
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
70 setEnabled (true);
26643
5d1f413ff746 adapt initial window sizes to the screen resolution (bug #55498)
Torsten <mttl@mailbox.org>
parents: 26376
diff changeset
71
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
72 setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
26643
5d1f413ff746 adapt initial window sizes to the screen resolution (bug #55498)
Torsten <mttl@mailbox.org>
parents: 26376
diff changeset
73
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
74 // Create all pages for pre-setting the minimal required size for all pages
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
75 show_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
76 adjust_size ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
77 next_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
78 adjust_size ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
79 next_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
80 adjust_size ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
81 // now go back to the first page
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
82 previous_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
83 previous_page ();
26643
5d1f413ff746 adapt initial window sizes to the screen resolution (bug #55498)
Torsten <mttl@mailbox.org>
parents: 26376
diff changeset
84
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
85 // Set the size determined above
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
86 resize (m_max_width, m_max_height);
19886
17d21d68888d GUI: force show of welcome wizard when displayed (Bug #41074)
John Donoghue
parents: 19861
diff changeset
87
21979
d04da18a407a use OCTAVE_USE_WINDOWS_API more consistently
John W. Eaton <jwe@octave.org>
parents: 21724
diff changeset
88 #if defined (OCTAVE_USE_WINDOWS_API)
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
89 // HACK to forceshow of dialog if started minimized
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
90 ShowWindow (reinterpret_cast<HWND> (winId ()), SW_SHOWNORMAL);
19886
17d21d68888d GUI: force show of welcome wizard when displayed (Bug #41074)
John Donoghue
parents: 19861
diff changeset
91 #endif
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
92 }
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
93
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
94 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
95 welcome_wizard::adjust_size ()
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
96 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
97 // Get adjusted size for the current page
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
98 adjustSize ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
99 QSize sz = size ();
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
100
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
101 // Update the max. size of the three pages if required
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
102
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
103 if (sz.height () > m_max_height)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
104 m_max_height = sz.height ();
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
105
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
106 if (sz.width () > m_max_width)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
107 m_max_width = sz.width ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
108 }
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
109
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
110 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
111 welcome_wizard::handle_web_connect_option (int state)
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
112 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
113 m_allow_web_connect_state = state == Qt::Checked;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
114 }
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
115
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
116 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
117 welcome_wizard::show_page ()
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
118 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
119 delete m_current_page;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
120 delete layout ();
17940
b3e4ee8f4d6d respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents: 17937
diff changeset
121
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
122 m_current_page = (*m_page_list_iterator) (this);
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
123
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
124 QVBoxLayout *new_layout = new QVBoxLayout ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
125 setLayout (new_layout);
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
126
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
127 new_layout->addWidget (m_current_page);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
128 }
13668
421afeae929b Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
129
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
130 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
131 welcome_wizard::previous_page ()
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
132 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
133 --m_page_list_iterator;
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
134
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
135 show_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
136 }
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
137
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
138 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
139 welcome_wizard::next_page ()
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
140 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
141 ++m_page_list_iterator;
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
142
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
143 show_page ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
144 }
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
145
32592
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
146 void
094a296b3ba1 maint: C++ style check for libgui/ directory.
Rik <rik@octave.org>
parents: 32519
diff changeset
147 welcome_wizard::accept ()
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
148 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
149 // Create default settings file.
17611
0dd2cf2e3174 don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents: 17515
diff changeset
150
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
151 gui_settings settings;
17940
b3e4ee8f4d6d respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents: 17937
diff changeset
152
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
153 settings.setValue (nr_allow_connection.settings_key (), m_allow_web_connect_state);
17940
b3e4ee8f4d6d respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents: 17937
diff changeset
154
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
155 settings.sync ();
17940
b3e4ee8f4d6d respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents: 17937
diff changeset
156
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
157 QDialog::accept ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
158 }
17940
b3e4ee8f4d6d respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents: 17937
diff changeset
159
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
160 initial_page::initial_page (welcome_wizard *wizard)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
161 : QWidget (wizard),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
162 m_title (new QLabel (tr ("Welcome to Octave!"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
163 m_message (new QLabel (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
164 m_logo (make_octave_logo (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
165 m_next (new QPushButton (tr ("Next"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
166 m_cancel (new QPushButton (tr ("Cancel"), this))
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
167 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
168 QFont ft;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
169 ft.setPointSize (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
170 m_title->setFont (ft);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
171
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
172 gui_settings settings;
27620
45bb5bbaf291 don't use singleton pattern for resource manager in GUI
John W. Eaton <jwe@octave.org>
parents: 27613
diff changeset
173
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
174 m_message->setText
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
175 (tr ("<html><body>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
176 "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
177 "Click 'Next' to create a configuration file and launch Octave.</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
178 "<p>The configuration file is stored in<br>%1.</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
179 "</body></html>").
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
180 arg (settings.file_name ()));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
181 m_message->setWordWrap (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
182 m_message->setMinimumWidth (400);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
183
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
184 QVBoxLayout *message_layout = new QVBoxLayout;
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
185
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
186 message_layout->addWidget (m_title);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
187 message_layout->addWidget (m_message);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
188
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
189 QHBoxLayout *message_and_logo = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
190
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
191 message_and_logo->addLayout (message_layout);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
192 message_and_logo->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
193 message_and_logo->addWidget (m_logo, 0, Qt::AlignTop);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
194
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
195 QHBoxLayout *button_bar = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
196
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
197 button_bar->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
198 button_bar->addWidget (m_next);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
199 button_bar->addWidget (m_cancel);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
200
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
201 QVBoxLayout *page_layout = new QVBoxLayout (this);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
202 setLayout (page_layout);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
203
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
204 page_layout->addLayout (message_and_logo);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
205 page_layout->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
206 page_layout->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
207 page_layout->addLayout (button_bar);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
208
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
209 setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
210
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
211 m_next->setDefault (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
212 m_next->setFocus ();
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
213
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
214 connect (m_next, &QPushButton::clicked, wizard, &welcome_wizard::next_page);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
215 connect (m_cancel, &QPushButton::clicked, wizard, &welcome_wizard::reject);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
216 }
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
217
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
218 setup_community_news::setup_community_news (welcome_wizard *wizard)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
219 : QWidget (wizard),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
220 m_title (new QLabel (tr ("Community News"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
221 m_message (new QLabel (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
222 m_checkbox (new QCheckBox (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
223 m_checkbox_message (new QLabel (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
224 m_logo (make_octave_logo (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
225 m_previous (new QPushButton (tr ("Previous"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
226 m_next (new QPushButton (tr ("Next"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
227 m_cancel (new QPushButton (tr ("Cancel"), this))
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
228 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
229 QFont ft;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
230 ft.setPointSize (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
231 m_title->setFont (ft);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
232
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
233 m_message->setText
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
234 (tr ("<html><body>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
235 "<p>When Octave starts, it will optionally check the Octave web site for current news and information about the Octave community.\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
236 "The check will happen at most once each day and news will only be displayed if there is something new since the last time you viewed the news.</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
237 "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu, or by visiting\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
238 "<a href=\"https://octave.org/community-news.html\">https://octave.org/community-news.html</a>.</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
239 "</body></html>"));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
240 m_message->setWordWrap (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
241 m_message->setMinimumWidth (400);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
242 m_message->setOpenExternalLinks (true);
24718
ea1c88bd4430 move more GUI classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents: 24534
diff changeset
243
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
244 QVBoxLayout *message_layout = new QVBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
245
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
246 message_layout->addWidget (m_title);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
247 message_layout->addWidget (m_message);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
248
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
249 QHBoxLayout *message_and_logo = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
250
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
251 message_and_logo->addLayout (message_layout);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
252 message_and_logo->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
253 message_and_logo->addWidget (m_logo, 0, Qt::AlignTop);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
254
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
255 QHBoxLayout *checkbox_layout = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
256
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
257 bool allow_connection = nr_allow_connection.def ().toBool ();
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
258 if (allow_connection)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
259 m_checkbox->setCheckState (Qt::Checked);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
260 else
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
261 m_checkbox->setCheckState (Qt::Unchecked);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
262
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
263 m_checkbox_message->setText
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
264 (tr ("<html><head>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
265 "</head><body>\n"
32517
38318e51f27f maint: Changes to wording of GUI strings and NEWS for clarity.
Rik <rik@octave.org>
parents: 31808
diff changeset
266 "<p>Allow Octave to connect to the Octave web site when it starts in order to display current news and information about the Octave community.</p>\n"
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
267 "</body></html>"));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
268 m_checkbox_message->setWordWrap (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
269 m_checkbox_message->setOpenExternalLinks (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
270 m_checkbox_message->setMinimumWidth (500);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
271
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
272 checkbox_layout->addWidget (m_checkbox, 0, Qt::AlignTop);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
273 checkbox_layout->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
274 checkbox_layout->addWidget (m_checkbox_message, 0, Qt::AlignTop);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
275 checkbox_layout->addStretch (10);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
276
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
277 QVBoxLayout *message_logo_and_checkbox = new QVBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
278
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
279 message_logo_and_checkbox->addLayout (message_and_logo);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
280 message_logo_and_checkbox->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
281 message_logo_and_checkbox->addLayout (checkbox_layout);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
282
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
283 QHBoxLayout *button_bar = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
284
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
285 button_bar->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
286 button_bar->addWidget (m_previous);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
287 button_bar->addWidget (m_next);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
288 button_bar->addWidget (m_cancel);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
289
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
290 QVBoxLayout *page_layout = new QVBoxLayout (this);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
291 setLayout (page_layout);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
292
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
293 page_layout->addLayout (message_logo_and_checkbox);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
294 page_layout->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
295 page_layout->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
296 page_layout->addLayout (button_bar);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
297
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
298 setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
299
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
300 m_next->setDefault (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
301 m_next->setFocus ();
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
302
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
303 connect (m_checkbox, &QCheckBox::stateChanged,
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
304 wizard, &welcome_wizard::handle_web_connect_option);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
305
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
306 connect (m_previous, &QPushButton::clicked, wizard, &welcome_wizard::previous_page);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
307 connect (m_next, &QPushButton::clicked, wizard, &welcome_wizard::next_page);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
308 connect (m_cancel, &QPushButton::clicked, wizard, &welcome_wizard::reject);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
309 }
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
310
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
311 final_page::final_page (welcome_wizard *wizard)
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
312 : QWidget (wizard),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
313 m_title (new QLabel (tr ("Enjoy!"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
314 m_message (new QLabel (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
315 m_logo (make_octave_logo (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
316 m_links (new QLabel (this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
317 m_previous (new QPushButton (tr ("Previous"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
318 m_finish (new QPushButton (tr ("Finish"), this)),
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
319 m_cancel (new QPushButton (tr ("Cancel"), this))
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
320 {
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
321 QFont ft;
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
322 ft.setPointSize (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
323 m_title->setFont (ft);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
324
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
325 m_message->setText
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
326 (tr ("<html><body>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
327 "<p>We hope you find Octave to be a useful tool.</p>\n"
32519
6ff63f154144 maint: Review and update strings that appear in GUI.
Rik <rik@octave.org>
parents: 32517
diff changeset
328 "<p>If you encounter problems, there are a number of ways to get help, including commercial support options, a discussion board, a wiki, and other community-based support channels.\n"
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
329 "You can find more information about each of these by visiting <a href=\"https://octave.org/support.html\">https://octave.org/support.html</a> (opens in external browser).</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
330 "</body></html>"));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
331 m_message->setWordWrap (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
332 m_message->setMinimumWidth (400);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
333 m_message->setOpenExternalLinks (true);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
334
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
335 QVBoxLayout *message_layout = new QVBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
336
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
337 message_layout->addWidget (m_title);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
338 message_layout->addWidget (m_message);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
339
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
340 QHBoxLayout *message_and_logo = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
341
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
342 message_and_logo->addLayout (message_layout);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
343 message_and_logo->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
344 message_and_logo->addWidget (m_logo, 0, Qt::AlignTop);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
345
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
346 m_links->setText
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
347 (tr ("<html><head>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
348 "</head><body>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
349 "<p>For more information about Octave:</p>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
350 "<ul>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
351 "<li>Visit <a href=\"https://octave.org\">https://octave.org</a> (opens in external browser)</li>\n"
32517
38318e51f27f maint: Changes to wording of GUI strings and NEWS for clarity.
Rik <rik@octave.org>
parents: 31808
diff changeset
352 "<li>Get the documentation online in <a href=\"https://www.gnu.org/software/octave/doc/interpreter/index.html\">HTML</a> or <a href=\"https://www.gnu.org/software/octave/octave.pdf\">PDF</a> format (links open in external browser)</li>\n"
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
353 "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
354 "</ul>\n"
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
355 "</body></html>"));
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
356 m_links->setWordWrap (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
357 m_links->setOpenExternalLinks (true);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
358
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
359 QHBoxLayout *button_bar = new QHBoxLayout;
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
360
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
361 button_bar->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
362 button_bar->addWidget (m_previous);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
363 button_bar->addWidget (m_finish);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
364 button_bar->addWidget (m_cancel);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
365
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
366 QVBoxLayout *page_layout = new QVBoxLayout (this);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
367 setLayout (page_layout);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
368
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
369 page_layout->addLayout (message_and_logo);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
370 page_layout->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
371 page_layout->addWidget (m_links);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
372 page_layout->addStretch (10);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
373 page_layout->addSpacing (20);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
374 page_layout->addLayout (button_bar);
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
375
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
376 setSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
27087
4092ffc1e43c fix size of the welcome wizard (bug #56265)
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26786
diff changeset
377
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
378 m_finish->setDefault (true);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
379 m_finish->setFocus ();
24014
bffd7d826887 style fixes for some GUI source files
John W. Eaton <jwe@octave.org>
parents: 23457
diff changeset
380
31808
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
381 connect (m_previous, &QPushButton::clicked,
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
382 wizard, &welcome_wizard::previous_page);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
383 connect (m_finish, &QPushButton::clicked, wizard, &welcome_wizard::accept);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
384 connect (m_cancel, &QPushButton::clicked, wizard, &welcome_wizard::reject);
90621682cc03 maint: Remove unnecessary indent after OCTAVE_BEGIN_NAMESPACE in libgui/
Rik <rik@octave.org>
parents: 31771
diff changeset
385 }
31646
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30964
diff changeset
386
c6d54dd31a7e maint: Use macros to begin/end C++ namespaces.
John W. Eaton <jwe@octave.org>
parents: 30964
diff changeset
387 OCTAVE_END_NAMESPACE(octave)