28 #include <QApplication>
29 #include <QPushButton>
30 #include <QHBoxLayout>
31 #include <QVBoxLayout>
34 #define WIN32_LEAN_AND_MEAN
44 QLabel *logo =
new QLabel (p);
45 QPixmap logo_pixmap (
":/actions/icons/logo.png");
46 logo->setPixmap (logo_pixmap.scaledToHeight (height));
54 title (new QLabel (tr (
"Welcome to Octave!"), this)),
66 "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
67 "Click 'Next' to create a configuration file and launch Octave.</p>\n"
68 "<p>The configuration file is stored in<br>%1.</p>\n"
74 QVBoxLayout *message_layout =
new QVBoxLayout;
76 message_layout->addWidget (
title);
77 message_layout->addWidget (
message);
79 QHBoxLayout *message_and_logo =
new QHBoxLayout;
81 message_and_logo->addLayout (message_layout);
82 message_and_logo->addStretch (10);
83 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
85 QHBoxLayout *button_bar =
new QHBoxLayout;
87 button_bar->addStretch (10);
88 button_bar->addWidget (
next);
89 button_bar->addWidget (
cancel);
91 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
92 setLayout (page_layout);
94 page_layout->addLayout (message_and_logo);
95 page_layout->addStretch (10);
96 page_layout->addLayout (button_bar);
98 next->setDefault (
true);
101 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
102 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
109 title (new QLabel (tr (
"Community News"), this)),
111 checkbox (new QCheckBox (this)),
112 checkbox_message (new QLabel (this)),
114 previous (new
QPushButton (tr (
"Previous"), this)),
119 ft.setPointSize (20);
123 (tr (
"<html><body>\n"
124 "<p>When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.\n"
125 "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"
126 "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu in the GUI, or by visiting\n"
127 "<a href=\"http://octave.org/community-news.html\">http://octave.org/community-news.html</a>.</p>\n"
130 message->setMinimumWidth (400);
131 message->setOpenExternalLinks (
true);
133 QVBoxLayout *message_layout =
new QVBoxLayout;
135 message_layout->addWidget (
title);
136 message_layout->addWidget (
message);
138 QHBoxLayout *message_and_logo =
new QHBoxLayout;
140 message_and_logo->addLayout (message_layout);
141 message_and_logo->addStretch (10);
142 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
144 QHBoxLayout *checkbox_layout =
new QHBoxLayout;
146 checkbox->setCheckState (Qt::Checked);
149 (tr (
"<html><head>\n"
151 "a:link { text-decoration: underline; color: #0000ff; }\n"
154 "<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"
160 checkbox_layout->addWidget (
checkbox, 0, Qt::AlignTop);
161 checkbox_layout->addSpacing (20);
163 checkbox_layout->addStretch (10);
165 QVBoxLayout *message_logo_and_checkbox =
new QVBoxLayout;
167 message_logo_and_checkbox->addLayout (message_and_logo);
168 message_logo_and_checkbox->addSpacing (20);
169 message_logo_and_checkbox->addLayout (checkbox_layout);
171 QHBoxLayout *button_bar =
new QHBoxLayout;
173 button_bar->addStretch (10);
175 button_bar->addWidget (
next);
176 button_bar->addWidget (
cancel);
178 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
179 setLayout (page_layout);
181 page_layout->addLayout (message_logo_and_checkbox);
182 page_layout->addStretch (10);
183 page_layout->addLayout (button_bar);
185 next->setDefault (
true);
188 connect (
checkbox, SIGNAL (stateChanged (
int)),
189 wizard, SLOT (handle_web_connect_option (
int)));
191 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
192 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
193 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
199 title (new QLabel (tr (
"Enjoy!"), this)),
202 links (new QLabel (this)),
203 previous (new
QPushButton (tr (
"Previous"), this)),
208 ft.setPointSize (20);
212 (tr (
"<html><body>\n"
213 "<p>We hope you find Octave to be a useful tool.</p>\n"
214 "<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 community-based support channels.\n"
215 "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"
218 message->setMinimumWidth (400);
219 message->setOpenExternalLinks (
true);
221 QVBoxLayout *message_layout =
new QVBoxLayout;
223 message_layout->addWidget (
title);
224 message_layout->addWidget (
message);
226 QHBoxLayout *message_and_logo =
new QHBoxLayout;
228 message_and_logo->addLayout (message_layout);
229 message_and_logo->addStretch (10);
230 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
233 (tr (
"<html><head>\n"
235 "a:link { text-decoration: underline; color: #0000ff; }\n"
238 "<p>For more information about Octave:</p>\n"
240 "<li>Visit <a href=\"http://octave.org\">http://octave.org</a> (opens in external browser)</li>\n"
241 "<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"
242 "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
245 links->setWordWrap (
true);
246 links->setOpenExternalLinks (
true);
248 QHBoxLayout *button_bar =
new QHBoxLayout;
250 button_bar->addStretch (10);
252 button_bar->addWidget (
finish);
253 button_bar->addWidget (
cancel);
255 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
256 setLayout (page_layout);
258 page_layout->addLayout (message_and_logo);
259 page_layout->addSpacing (20);
260 page_layout->addWidget (
links);
261 page_layout->addStretch (10);
262 page_layout->addLayout (button_bar);
264 finish->setDefault (
true);
267 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
268 connect (
finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
269 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
274 :
QDialog (p), page_ctor_list (), page_list_iterator (),
276 allow_web_connect_state (true)
284 setWindowTitle (tr (
"Welcome to GNU Octave"));
288 setMinimumSize (QSize (600, 480));
294 ShowWindow((HWND)winId(), SW_SHOWNORMAL);
312 QVBoxLayout *new_layout =
new QVBoxLayout ();
313 setLayout (new_layout);
345 settings->setValue (
"news/allow_web_connection",
QList< page_creator_fptr > page_ctor_list
static uint32_t state[624]
static QString get_settings_file(void)
final_page(welcome_wizard *wizard)
void message(const char *name, const char *fmt,...)
welcome_wizard(QWidget *parent=0)
static QLabel * make_octave_logo(QWidget *p=0, int height=100)
QList< page_creator_fptr >::iterator page_list_iterator
initial_page(welcome_wizard *wizard)
static QSettings * get_settings(void)
void handle_web_connect_option(int state)
bool allow_web_connect_state
static QWidget * create(welcome_wizard *wizard)
static void reload_settings(void)
static QWidget * create(welcome_wizard *wizard)