Mercurial > octave-nkf
diff libgui/src/octave-qt-link.cc @ 18309:024940bd5b77 gui-release
gui: provide prefernces for the octave directory at startup
* settings-dialog.ui: add check box for restoring previous octave directory and
line edit / file dialog for setting startup directory
* settings-dialog.cc (constructor): init new input widgets from settings;
(write_changed_settings): wirte values from new widgets into settings file;
(get_octave_directory): new slot for settings octave dir in a file dialog
* main-window.h: new slot handle_octave_ready
* main-window.cc (handle_octave_ready): depending on settings set octave
directory to the last one from the previous session, the one set in the
settings or the current one;
(construct): do not set dir here but in handle_octave_ready;
(construct_octave_qt_link): pass 'this' to octave link as parent;
* octave-interpreter.h: new signal inidication interpreter is initialized
* octave-interpreter.cc (constructor): emit new signal after init of interpreter
* octave-qt-link.cc (constructor): connect new signal with slot in main window
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 19 Jan 2014 11:30:15 +0100 |
parents | 5c3f22dd0bbb |
children | dfc6ef6ac455 |
line wrap: on
line diff
--- a/libgui/src/octave-qt-link.cc Sat Jan 18 08:50:03 2014 -0500 +++ b/libgui/src/octave-qt-link.cc Sun Jan 19 11:30:15 2014 +0100 @@ -43,13 +43,16 @@ #include "resource-manager.h" -octave_qt_link::octave_qt_link (void) +octave_qt_link::octave_qt_link (QWidget *p) : octave_link (), main_thread (new QThread ()), command_interpreter (new octave_interpreter ()) { connect (this, SIGNAL (execute_interpreter_signal (void)), command_interpreter, SLOT (execute (void))); + connect (command_interpreter, SIGNAL (octave_ready_signal ()), + p, SLOT (handle_octave_ready ())); + command_interpreter->moveToThread (main_thread); main_thread->start ();