23 #if defined (HAVE_CONFIG_H) 27 #include <QApplication> 30 #include <QTranslator> 32 #include <QStyleFactory> 38 #if defined (HAVE_SYS_IOCTL_H) 39 # include <sys/ioctl.h> 47 #include "builtin-defun-decls.h" 63 #if defined (QTMESSAGEHANDLER_ACCEPTS_QMESSAGELOGCONTEXT) 64 message_handler (QtMsgType,
const QMessageLogContext &,
const QString &)
82 return m_options.gui ();
96 if (show_gui_msgs.empty ())
98 #if defined (HAVE_QINSTALLMESSAGEHANDLER) 109 QTranslator gui_tr, qt_tr, qsci_tr;
112 #if ! defined (Q_OS_WIN32) 113 QTextCodec::setCodecForLocale (QTextCodec::codecForName (
"UTF-8"));
116 #if defined (HAVE_QT4) 117 QTextCodec::setCodecForCStrings (QTextCodec::codecForName (
"UTF-8"));
121 #if defined (Q_OS_WIN32) 122 qt_app.setStyle (QStyleFactory::create (
"Windows"));
134 qt_app.installTranslator (&qt_tr);
135 qt_app.installTranslator (&gui_tr);
136 qt_app.installTranslator (&qsci_tr);
140 if (welcomeWizard.exec () == QDialog::Rejected)
154 qt_app.installTranslator (&qt_tr);
155 qt_app.installTranslator (&gui_tr);
158 qt_app.installTranslator (&qsci_tr);
168 #if defined (OCTAVE_USE_WINDOWS_API) 178 qt_app.setLayoutDirection (Qt::LeftToRight);
188 w.init_terminal_size ();
193 w.connect_visibility_changed ();
195 w.focus_command_window ();
200 qt_app.setQuitOnLastWindowClosed (
false);
202 return qt_app.exec ();
bool gui_running(void) const
static void putenv(const std::string &name, const std::string &value)
static void config_translators(QTranslator *, QTranslator *, QTranslator *)
static void update_network_settings(void)
void set_application_id(void)
gui_application(int argc, char **argv)
static std::string getenv(const std::string &name)
static void init_data(void)
std::complex< double > w(std::complex< double > z, double relerr=0)
void octave_block_interrupt_signal(void)
static void message_handler(QtMsgType, const char *)
static void reload_settings(void)
Represents the main window.
static bool is_first_run(void)
bool start_gui_p(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string