28 #include <QApplication>
29 #include <QPushButton>
30 #include <QHBoxLayout>
31 #include <QVBoxLayout>
39 QLabel *logo =
new QLabel (p);
40 QPixmap logo_pixmap (
":/actions/icons/logo.png");
41 logo->setPixmap (logo_pixmap.scaledToHeight (height));
49 title (new QLabel (tr (
"Welcome to Octave!"), this)),
61 "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
62 "Click 'Next' to create a configuration file and launch Octave.</p>\n"
63 "<p>The configuration file is stored in %1. If that file exists, you will not see this dialog when Octave starts.</p>\n"
69 QVBoxLayout *message_layout =
new QVBoxLayout;
71 message_layout->addWidget (
title);
72 message_layout->addWidget (
message);
74 QHBoxLayout *message_and_logo =
new QHBoxLayout;
76 message_and_logo->addLayout (message_layout);
77 message_and_logo->addStretch (10);
78 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
80 QHBoxLayout *button_bar =
new QHBoxLayout;
82 button_bar->addStretch (10);
83 button_bar->addWidget (
next);
84 button_bar->addWidget (
cancel);
86 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
87 setLayout (page_layout);
89 page_layout->addLayout (message_and_logo);
90 page_layout->addStretch (10);
91 page_layout->addLayout (button_bar);
93 next->setDefault (
true);
96 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
97 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
104 title (new QLabel (tr (
"Community News"), this)),
106 checkbox (new QCheckBox (this)),
107 checkbox_message (new QLabel (this)),
109 previous (new
QPushButton (tr (
"Previous"), this)),
114 ft.setPointSize (20);
118 (tr (
"<html><body>\n"
119 "<p>When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.\n"
120 "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"
121 "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu in the GUI, or by visiting\n"
122 "<a href=\"http://octave.org/community-news.html\">http://octave.org/community-news.html</a>.</p>\n"
125 message->setMinimumWidth (400);
126 message->setOpenExternalLinks (
true);
128 QVBoxLayout *message_layout =
new QVBoxLayout;
130 message_layout->addWidget (
title);
131 message_layout->addWidget (
message);
133 QHBoxLayout *message_and_logo =
new QHBoxLayout;
135 message_and_logo->addLayout (message_layout);
136 message_and_logo->addStretch (10);
137 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
139 QHBoxLayout *checkbox_layout =
new QHBoxLayout;
141 checkbox->setCheckState (Qt::Checked);
144 (tr (
"<html><head>\n"
146 "a:link { text-decoration: underline; color: #0000ff; }\n"
149 "<p>Allow Octave to connect to the Octave web site when it starts to display current news and information about the Octave community.</p>\n"
155 checkbox_layout->addWidget (
checkbox, 0, Qt::AlignTop);
156 checkbox_layout->addSpacing (20);
158 checkbox_layout->addStretch (10);
160 QVBoxLayout *message_logo_and_checkbox =
new QVBoxLayout;
162 message_logo_and_checkbox->addLayout (message_and_logo);
163 message_logo_and_checkbox->addSpacing (20);
164 message_logo_and_checkbox->addLayout (checkbox_layout);
166 QHBoxLayout *button_bar =
new QHBoxLayout;
168 button_bar->addStretch (10);
170 button_bar->addWidget (
next);
171 button_bar->addWidget (
cancel);
173 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
174 setLayout (page_layout);
176 page_layout->addLayout (message_logo_and_checkbox);
177 page_layout->addStretch (10);
178 page_layout->addLayout (button_bar);
180 next->setDefault (
true);
183 connect (
checkbox, SIGNAL (stateChanged (
int)),
184 wizard, SLOT (handle_web_connect_option (
int)));
186 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
187 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
188 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
194 title (new QLabel (tr (
"Enjoy!"), this)),
197 links (new QLabel (this)),
198 previous (new
QPushButton (tr (
"Previous"), this)),
203 ft.setPointSize (20);
207 (tr (
"<html><body>\n"
208 "<p>We hope you find Octave to be a useful tool.</p>\n"
209 "<p>If you encounter problems, there are a number of ways to get help including commercial support options, a mailing list, a wiki, and other commnity-based support channels.\n"
210 "You can find more information about each of these by visiting <a href=\"http://octave.org/support.html\">http://octave.org/support.html</a> (opens in external browser).</p>\n"
213 message->setMinimumWidth (400);
214 message->setOpenExternalLinks (
true);
216 QVBoxLayout *message_layout =
new QVBoxLayout;
218 message_layout->addWidget (
title);
219 message_layout->addWidget (
message);
221 QHBoxLayout *message_and_logo =
new QHBoxLayout;
223 message_and_logo->addLayout (message_layout);
224 message_and_logo->addStretch (10);
225 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
228 (tr (
"<html><head>\n"
230 "a:link { text-decoration: underline; color: #0000ff; }\n"
233 "<p>For more information about Octave:</p>\n"
235 "<li>Visit <a href=\"http://octave.org\">http://octave.org</a> (opens in external browser)</li>\n"
236 "<li>Get the documentation online as <a href=\"http://www.gnu.org/software/octave/doc/interpreter/index.html\">html</a>- or <a href=\"http://www.gnu.org/software/octave/octave.pdf\">pdf</span></a>-document (opens in external browser)</li>\n"
237 "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
240 links->setWordWrap (
true);
241 links->setOpenExternalLinks (
true);
243 QHBoxLayout *button_bar =
new QHBoxLayout;
245 button_bar->addStretch (10);
247 button_bar->addWidget (
finish);
248 button_bar->addWidget (
cancel);
250 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
251 setLayout (page_layout);
253 page_layout->addLayout (message_and_logo);
254 page_layout->addSpacing (20);
255 page_layout->addWidget (
links);
256 page_layout->addStretch (10);
257 page_layout->addLayout (button_bar);
259 finish->setDefault (
true);
262 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
263 connect (
finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
264 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
269 :
QDialog (p), page_ctor_list (), page_list_iterator (),
271 allow_web_connect_state (true)
279 setWindowTitle (tr (
"Welcome to GNU Octave"));
283 setMinimumSize (QSize (600, 480));
302 QVBoxLayout *new_layout =
new QVBoxLayout ();
303 setLayout (new_layout);
335 settings->setValue (
"news/allow_web_connection",