Mercurial > hg > octave-avbm
comparison libinterp/interpfcn/octave-link.h @ 16581:7f8db1942dc0
Add Qt link uigetfile dialog implementation.
* libgui/src/octave-qt-link.cc, libgui/src/octave-qt-link.h,
(octave_qt_link::do_file_dialog): New function.
(make_filter_list): New function.
* libinterp/interpfcn/octave-link.cc
(__octave_link_file_dialog__): New function.
* libinterp/interpfcn/octave-link.h:
(octave_link::file_dialog): New function.
(octave_link::do_file_dialog): New virtual function.
* scripts/plot/uigetfile.m: update to call octave_link file dialog if octave link is present.
* libgui/src/dialog.cc, libgui/src/dialog.h
(class FileDialog): New class.
(QUIWidgetCreator::QUIWidgetCreator): added initialization of new var path_name.
(QUIWidgetCreator::signal_filedialog): New function.
(QUIWidgetCreator::create_filedialog): New function.
(QUIWidgetCreator::filedialog_finished): New function.
(QUIWidgetCreator::get_dialog_path): New function.
* libgui/src/main-window.cc, libgui/src/main-window.h
(main_window::connect_uiwidget_links): Added connect for handle_file_dialog.
(main_window::handle_create_filedialog): New function.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 28 Apr 2013 09:45:19 -0400 |
parents | d5ae5aa80d42 |
children | adc150db1809 |
comparison
equal
deleted
inserted
replaced
16580:0eca6c5657c9 | 16581:7f8db1942dc0 |
---|---|
177 return enabled () | 177 return enabled () |
178 ? instance->do_input_dialog (prompt, title, nr, nc, defaults) | 178 ? instance->do_input_dialog (prompt, title, nr, nc, defaults) |
179 : std::list<std::string> (); | 179 : std::list<std::string> (); |
180 } | 180 } |
181 | 181 |
182 static std::list<std::string> | |
183 file_dialog ( const std::list< std::pair< std::string, std::string > > filter, | |
184 const std::string& title, | |
185 const std::string& filename, | |
186 const std::string& dirname, | |
187 bool multiselect) | |
188 { | |
189 return enabled () | |
190 ? instance->do_file_dialog (filter, title, filename, dirname, multiselect) | |
191 : std::list<std::string> (); | |
192 } | |
193 | |
194 | |
182 static int debug_cd_or_addpath_error (const std::string& file, | 195 static int debug_cd_or_addpath_error (const std::string& file, |
183 const std::string& dir, | 196 const std::string& dir, |
184 bool addpath_option) | 197 bool addpath_option) |
185 { | 198 { |
186 return enabled () | 199 return enabled () |
368 const std::string& title, | 381 const std::string& title, |
369 const std::list<float>& nr, | 382 const std::list<float>& nr, |
370 const std::list<float>& nc, | 383 const std::list<float>& nc, |
371 const std::list<std::string>& defaults) = 0; | 384 const std::list<std::string>& defaults) = 0; |
372 | 385 |
386 virtual std::list<std::string> | |
387 do_file_dialog (const std::list< std::pair< std::string, std::string > > filter, | |
388 const std::string& title, | |
389 const std::string& filename, | |
390 const std::string& dirname, | |
391 bool multiselect) = 0; | |
392 | |
373 virtual int | 393 virtual int |
374 do_debug_cd_or_addpath_error (const std::string& file, | 394 do_debug_cd_or_addpath_error (const std::string& file, |
375 const std::string& dir, | 395 const std::string& dir, |
376 bool addpath_option) = 0; | 396 bool addpath_option) = 0; |
377 | 397 |