Mercurial > hg > octave-lyh
comparison scripts/plot/uiputfile.m @ 16581:fa4a035e0cf4
Add octave_link uiputfile implementation
* libgui/src/dialog.cc, libgui/src/dialog.h
(FileDialog::FileDialog): Change bool multiselect to QString multimode, add mode option of 'create' and set options accordingly.
(QUIWidgetCreator::signal_filedialog): Change bool multiselect to QString multimode.
(QUIWidgetCreator::create_filedialog): Change bool multiselect to QString multimode.
* libgui/src/main-window.cc, libgui/src/main-window.h
(main_window::connect_uiwidget_links): update bool multiselect to QString multimode.
(main_window::handle_create_filedialog): update bool multiselect to QString multimode.
* libgui/src/octave-qt-link.h
(octave_qt_link::do_file_dialog): update bool multiselect to std::string multimode.
* libinterp/interpfcn/octave-link.h
(octave_link::do_file_dialog): update bool multiselect to std::string multimode.
(octave_link::file_dialog): update bool multiselect to std::string multimode.
* scripts/plot/uiputfile.m
(uiputfile): update to call __octave_link_file_dialog__ if octave_link is present.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Sun, 28 Apr 2013 17:00:00 -0400 |
parents | 95d7475a0a89 |
children | bc924baa2c4e |
comparison
equal
deleted
inserted
replaced
16580:adc150db1809 | 16581:fa4a035e0cf4 |
---|---|
54 | 54 |
55 ## Author: Kai Habel | 55 ## Author: Kai Habel |
56 | 56 |
57 function [retfile, retpath, retindex] = uiputfile (varargin) | 57 function [retfile, retpath, retindex] = uiputfile (varargin) |
58 | 58 |
59 defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__"); | 59 if (! __octave_link_enabled__ ()) |
60 funcname = ["__uiputfile_", defaulttoolkit, "__"]; | 60 defaulttoolkit = get (0, "defaultfigure__graphics_toolkit__"); |
61 functype = exist (funcname); | 61 funcname = ["__uiputfile_", defaulttoolkit, "__"]; |
62 if (! __is_function__ (funcname)) | 62 functype = exist (funcname); |
63 funcname = "__uiputfile_fltk__"; | |
64 if (! __is_function__ (funcname)) | 63 if (! __is_function__ (funcname)) |
65 error ("uiputfile: fltk graphics toolkit required"); | 64 funcname = "__uiputfile_fltk__"; |
66 elseif (! strcmp (defaulttoolkit, "gnuplot")) | 65 if (! __is_function__ (funcname)) |
67 warning ("uiputfile: no implementation for toolkit '%s', using 'fltk' instead", | 66 error ("uiputfile: fltk graphics toolkit required"); |
67 elseif (! strcmp (defaulttoolkit, "gnuplot")) | |
68 warning ("uiputfile: no implementation for toolkit '%s', using 'fltk' instead", | |
68 defaulttoolkit); | 69 defaulttoolkit); |
70 endif | |
69 endif | 71 endif |
70 endif | 72 endif |
71 | 73 |
72 if (nargin > 3) | 74 if (nargin > 3) |
73 print_usage (); | 75 print_usage (); |
115 elseif (! isempty (varargin{3})) | 117 elseif (! isempty (varargin{3})) |
116 print_usage (); | 118 print_usage (); |
117 endif | 119 endif |
118 endif | 120 endif |
119 | 121 |
120 [retfile, retpath, retindex] = feval (funcname, outargs{:}); | 122 if (__octave_link_enabled__ ()) |
123 [retfile, retpath, retindex] = __octave_link_file_dialog__ (outargs{:}); | |
124 else | |
125 [retfile, retpath, retindex] = feval (funcname, outargs{:}); | |
126 endif | |
121 | 127 |
122 endfunction | 128 endfunction |
123 | 129 |
124 | 130 |
125 %!demo | 131 %!demo |