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 :
QDialog (
p), m_page_ctor_list (), m_page_list_iterator (),
55 m_allow_web_connect_state (
false)
63 setWindowTitle (tr (
"Welcome to GNU Octave"));
67 setMinimumSize (QSize (600, 480));
71 #if defined (OCTAVE_USE_WINDOWS_API) 73 ShowWindow (reinterpret_cast<HWND> (winId ()), SW_SHOWNORMAL);
89 QVBoxLayout *new_layout =
new QVBoxLayout ();
90 setLayout (new_layout);
119 settings->setValue (
"news/allow_web_connection",
130 m_title (new QLabel (tr (
"Welcome to Octave!"),
this)),
131 m_message (new QLabel (
this)),
137 ft.setPointSize (20);
141 (tr (
"<html><body>\n" 142 "<p>You seem to be using the Octave graphical interface for the first time on this computer.\n" 143 "Click 'Next' to create a configuration file and launch Octave.</p>\n" 144 "<p>The configuration file is stored in<br>%1.</p>\n" 150 QVBoxLayout *message_layout =
new QVBoxLayout;
152 message_layout->addWidget (
m_title);
155 QHBoxLayout *message_and_logo =
new QHBoxLayout;
157 message_and_logo->addLayout (message_layout);
158 message_and_logo->addStretch (10);
159 message_and_logo->addWidget (
m_logo, 0, Qt::AlignTop);
161 QHBoxLayout *button_bar =
new QHBoxLayout;
163 button_bar->addStretch (10);
164 button_bar->addWidget (
m_next);
167 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
168 setLayout (page_layout);
170 page_layout->addLayout (message_and_logo);
171 page_layout->addStretch (10);
172 page_layout->addLayout (button_bar);
174 m_next->setDefault (
true);
177 connect (
m_next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
178 connect (
m_cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
183 m_title (new QLabel (tr (
"Community News"),
this)),
184 m_message (new QLabel (
this)),
185 m_checkbox (new QCheckBox (
this)),
186 m_checkbox_message (new QLabel (
this)),
193 ft.setPointSize (20);
197 (tr (
"<html><body>\n" 198 "<p>When Octave starts, it will optionally check the Octave web site for current news and information about the Octave community.\n" 199 "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" 200 "<p>You may also view the news by selecting the \"Community News\" item in the \"Help\" menu, or by visiting\n" 201 "<a href=\"https://octave.org/community-news.html\">https://octave.org/community-news.html</a>.</p>\n" 207 QVBoxLayout *message_layout =
new QVBoxLayout;
209 message_layout->addWidget (
m_title);
212 QHBoxLayout *message_and_logo =
new QHBoxLayout;
214 message_and_logo->addLayout (message_layout);
215 message_and_logo->addStretch (10);
216 message_and_logo->addWidget (
m_logo, 0, Qt::AlignTop);
218 QHBoxLayout *checkbox_layout =
new QHBoxLayout;
225 (tr (
"<html><head>\n" 227 "a:link { text-decoration: underline; color: #0000ff; }\n" 230 "<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" 236 checkbox_layout->addWidget (
m_checkbox, 0, Qt::AlignTop);
237 checkbox_layout->addSpacing (20);
239 checkbox_layout->addStretch (10);
241 QVBoxLayout *message_logo_and_checkbox =
new QVBoxLayout;
243 message_logo_and_checkbox->addLayout (message_and_logo);
244 message_logo_and_checkbox->addSpacing (20);
245 message_logo_and_checkbox->addLayout (checkbox_layout);
247 QHBoxLayout *button_bar =
new QHBoxLayout;
249 button_bar->addStretch (10);
251 button_bar->addWidget (
m_next);
254 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
255 setLayout (page_layout);
257 page_layout->addLayout (message_logo_and_checkbox);
258 page_layout->addStretch (10);
259 page_layout->addLayout (button_bar);
261 m_next->setDefault (
true);
264 connect (
m_checkbox, SIGNAL (stateChanged (
int)),
265 wizard, SLOT (handle_web_connect_option (
int)));
267 connect (
m_previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
268 connect (
m_next, SIGNAL (clicked ()), wizard, SLOT (next_page ()));
269 connect (
m_cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
274 m_title (new QLabel (tr (
"Enjoy!"),
this)),
275 m_message (new QLabel (
this)),
277 m_links (new QLabel (
this)),
283 ft.setPointSize (20);
287 (tr (
"<html><body>\n" 288 "<p>We hope you find Octave to be a useful tool.</p>\n" 289 "<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" 290 "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" 296 QVBoxLayout *message_layout =
new QVBoxLayout;
298 message_layout->addWidget (
m_title);
301 QHBoxLayout *message_and_logo =
new QHBoxLayout;
303 message_and_logo->addLayout (message_layout);
304 message_and_logo->addStretch (10);
305 message_and_logo->addWidget (
m_logo, 0, Qt::AlignTop);
308 (tr (
"<html><head>\n" 310 "a:link { text-decoration: underline; color: #0000ff; }\n" 313 "<p>For more information about Octave:</p>\n" 315 "<li>Visit <a href=\"https://octave.org\">https://octave.org</a> (opens in external browser)</li>\n" 316 "<li>Get the documentation online as <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</span></a>-document (opens in external browser)</li>\n" 317 "<li>Open the documentation browser of the Octave GUI with the help menu</li>\n" 321 m_links->setOpenExternalLinks (
true);
323 QHBoxLayout *button_bar =
new QHBoxLayout;
325 button_bar->addStretch (10);
330 QVBoxLayout *page_layout =
new QVBoxLayout (
this);
331 setLayout (page_layout);
333 page_layout->addLayout (message_and_logo);
334 page_layout->addSpacing (20);
335 page_layout->addWidget (
m_links);
336 page_layout->addStretch (10);
337 page_layout->addLayout (button_bar);
342 connect (
m_previous, SIGNAL (clicked ()), wizard, SLOT (previous_page ()));
343 connect (
m_finish, SIGNAL (clicked ()), wizard, SLOT (accept ()));
344 connect (
m_cancel, SIGNAL (clicked ()), wizard, SLOT (reject ()));
static QWidget * create(welcome_wizard *wizard)
welcome_wizard(QWidget *parent=nullptr)
static QLabel * make_octave_logo(QWidget *p=nullptr, int height=100)
QList< page_creator_fptr >::iterator m_page_list_iterator
initial_page(welcome_wizard *wizard)
static QString get_settings_file(void)
QList< page_creator_fptr > m_page_ctor_list
static void reload_settings(void)
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
static uint32_t state[624]
static QWidget * create(welcome_wizard *wizard)
final_page(welcome_wizard *wizard)
void handle_web_connect_option(int state)
bool m_allow_web_connect_state
static QSettings * get_settings(void)