24 #if defined (HAVE_CONFIG_H)
28 #include <QApplication>
29 #include <QPushButton>
30 #include <QHBoxLayout>
31 #include <QVBoxLayout>
33 #if defined (OCTAVE_USE_WINDOWS_API)
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));
53 title (new QLabel (tr (
"Welcome to Octave!"),
this)),
65 "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n"
66 "Click 'Next' to create a configuration file and launch Octave.</p>\n"
67 "<p>The configuration file is stored in<br>%1.</p>\n"
73 QVBoxLayout *message_layout =
new QVBoxLayout;
75 message_layout->addWidget (
title);
76 message_layout->addWidget (
message);
78 QHBoxLayout *message_and_logo =
new QHBoxLayout;
80 message_and_logo->addLayout (message_layout);
81 message_and_logo->addStretch (10);
82 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
84 QHBoxLayout *button_bar =
new QHBoxLayout;
86 button_bar->addStretch (10);
87 button_bar->addWidget (
next);
88 button_bar->addWidget (
cancel);
90 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
91 setLayout (page_layout);
93 page_layout->addLayout (message_and_logo);
94 page_layout->addStretch (10);
95 page_layout->addLayout (button_bar);
97 next->setDefault (
true);
100 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
101 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
106 title (new QLabel (tr (
"Community News"),
this)),
108 checkbox (new QCheckBox (
this)),
109 checkbox_message (new QLabel (
this)),
116 ft.setPointSize (20);
120 (tr (
"<html><body>\n"
121 "<p>When the Octave GUI starts, it will check the Octave web site for current news and information about the Octave community.\n"
122 "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"
123 "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu in the GUI, or by visiting\n"
124 "<a href=\"http://octave.org/community-news.html\">http://octave.org/community-news.html</a>.</p>\n"
127 message->setMinimumWidth (400);
128 message->setOpenExternalLinks (
true);
130 QVBoxLayout *message_layout =
new QVBoxLayout;
132 message_layout->addWidget (
title);
133 message_layout->addWidget (
message);
135 QHBoxLayout *message_and_logo =
new QHBoxLayout;
137 message_and_logo->addLayout (message_layout);
138 message_and_logo->addStretch (10);
139 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
141 QHBoxLayout *checkbox_layout =
new QHBoxLayout;
143 checkbox->setCheckState (Qt::Checked);
146 (tr (
"<html><head>\n"
148 "a:link { text-decoration: underline; color: #0000ff; }\n"
151 "<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"
157 checkbox_layout->addWidget (
checkbox, 0, Qt::AlignTop);
158 checkbox_layout->addSpacing (20);
160 checkbox_layout->addStretch (10);
162 QVBoxLayout *message_logo_and_checkbox =
new QVBoxLayout;
164 message_logo_and_checkbox->addLayout (message_and_logo);
165 message_logo_and_checkbox->addSpacing (20);
166 message_logo_and_checkbox->addLayout (checkbox_layout);
168 QHBoxLayout *button_bar =
new QHBoxLayout;
170 button_bar->addStretch (10);
172 button_bar->addWidget (
next);
173 button_bar->addWidget (
cancel);
175 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
176 setLayout (page_layout);
178 page_layout->addLayout (message_logo_and_checkbox);
179 page_layout->addStretch (10);
180 page_layout->addLayout (button_bar);
182 next->setDefault (
true);
185 connect (
checkbox, SIGNAL (stateChanged (
int)),
186 wizard, SLOT (handle_web_connect_option (
int)));
188 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
189 connect (
next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
190 connect (
cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
195 title (new QLabel (tr (
"Enjoy!"),
this)),
198 links (new QLabel (
this)),
204 ft.setPointSize (20);
208 (tr (
"<html><body>\n"
209 "<p>We hope you find Octave to be a useful tool.</p>\n"
210 "<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"
211 "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"
214 message->setMinimumWidth (400);
215 message->setOpenExternalLinks (
true);
217 QVBoxLayout *message_layout =
new QVBoxLayout;
219 message_layout->addWidget (
title);
220 message_layout->addWidget (
message);
222 QHBoxLayout *message_and_logo =
new QHBoxLayout;
224 message_and_logo->addLayout (message_layout);
225 message_and_logo->addStretch (10);
226 message_and_logo->addWidget (
logo, 0, Qt::AlignTop);
229 (tr (
"<html><head>\n"
231 "a:link { text-decoration: underline; color: #0000ff; }\n"
234 "<p>For more information about Octave:</p>\n"
236 "<li>Visit <a href=\"http://octave.org\">http://octave.org</a> (opens in external browser)</li>\n"
237 "<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"
238 "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n"
241 links->setWordWrap (
true);
242 links->setOpenExternalLinks (
true);
244 QHBoxLayout *button_bar =
new QHBoxLayout;
246 button_bar->addStretch (10);
248 button_bar->addWidget (
finish);
249 button_bar->addWidget (
cancel);
251 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
252 setLayout (page_layout);
254 page_layout->addLayout (message_and_logo);
255 page_layout->addSpacing (20);
256 page_layout->addWidget (
links);
257 page_layout->addStretch (10);
258 page_layout->addLayout (button_bar);
260 finish->setDefault (
true);
263 connect (
previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
264 connect (
finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
265 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));
287 #if defined (OCTAVE_USE_WINDOWS_API)
289 ShowWindow((HWND)winId(), SW_SHOWNORMAL);
307 QVBoxLayout *new_layout =
new QVBoxLayout ();
308 setLayout (new_layout);
340 settings->setValue (
"news/allow_web_connection",
QList< page_creator_fptr > page_ctor_list
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
returns the type of the matrix and caches it for future use Called with more than one the function will not attempt to guess the type if it is still unknown This is useful for debugging purposes The possible matrix types depend on whether the matrix is full or and can be one of the following able sis tem and mark type as unknown tem as the structure of the matrix explicitly gives this(Sparse matrices only) tem code
initial_page(welcome_wizard *wizard)
static QSettings * get_settings(void)
static uint32_t state[624]
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)