Mercurial > hg > octave-nkf
comparison libgui/src/octave-qt-link.cc @ 17790:86c6ae5f969e
Use GNU style coding conventions for code in libgui/
* libgui/qterminal/libqterminal/QTerminal.h, libgui/src/color-picker.cc,
libgui/src/color-picker.h, libgui/src/dialog.cc, libgui/src/dialog.h,
libgui/src/documentation-dock-widget.cc, libgui/src/files-dock-widget.cc,
libgui/src/files-dock-widget.h, libgui/src/find-files-dialog.cc,
libgui/src/find-files-dialog.h, libgui/src/find-files-model.cc,
libgui/src/find-files-model.h, libgui/src/history-dock-widget.cc,
libgui/src/history-dock-widget.h, libgui/src/m-editor/file-editor-interface.h,
libgui/src/m-editor/file-editor-tab.cc, libgui/src/m-editor/file-editor-tab.h,
libgui/src/m-editor/file-editor.cc, libgui/src/m-editor/find-dialog.cc,
libgui/src/m-editor/find-dialog.h, libgui/src/m-editor/octave-qscintilla.cc,
libgui/src/main-window.cc, libgui/src/main-window.h,
libgui/src/news-dock-widget.h, libgui/src/octave-dock-widget.cc,
libgui/src/octave-dock-widget.h, libgui/src/octave-gui.cc,
libgui/src/octave-qt-link.cc, libgui/src/octave-qt-link.h,
libgui/src/qtinfo/parser.cc, libgui/src/qtinfo/parser.h,
libgui/src/qtinfo/webinfo.cc, libgui/src/qtinfo/webinfo.h,
libgui/src/resource-manager.cc, libgui/src/settings-dialog.cc,
libgui/src/settings-dialog.h, libgui/src/terminal-dock-widget.cc,
libgui/src/welcome-wizard.cc, libgui/src/workspace-model.cc,
libgui/src/workspace-model.h, libgui/src/workspace-view.cc,
libgui/src/workspace-view.h:
Use GNU style coding conventions for code in libgui/
author | Rik <rik@octave.org> |
---|---|
date | Tue, 29 Oct 2013 09:54:40 -0700 |
parents | d63878346099 |
children | 86e8dbccf7c7 |
comparison
equal
deleted
inserted
replaced
17789:f2b047f9b605 | 17790:86c6ae5f969e |
---|---|
112 | 112 |
113 // Wait while the user is responding to message box. | 113 // Wait while the user is responding to message box. |
114 uiwidget_creator.wait (); | 114 uiwidget_creator.wait (); |
115 | 115 |
116 // The GUI has sent a signal and the process has been awakened. | 116 // The GUI has sent a signal and the process has been awakened. |
117 return uiwidget_creator.get_dialog_button().toStdString (); | 117 return uiwidget_creator.get_dialog_button ().toStdString (); |
118 } | 118 } |
119 | 119 |
120 static QStringList | 120 static QStringList |
121 make_qstring_list (const std::list<std::string>& lst) | 121 make_qstring_list (const std::list<std::string>& lst) |
122 { | 122 { |
151 // list. | 151 // list. |
152 | 152 |
153 name.replace (QRegExp ("\\(.*\\)"), ""); | 153 name.replace (QRegExp ("\\(.*\\)"), ""); |
154 ext.replace (";", " "); | 154 ext.replace (";", " "); |
155 | 155 |
156 if (name.length() == 0) | 156 if (name.length () == 0) |
157 { | 157 { |
158 // No name field. Build one from the extensions. | 158 // No name field. Build one from the extensions. |
159 name = ext.toUpper() + " Files"; | 159 name = ext.toUpper () + " Files"; |
160 } | 160 } |
161 | 161 |
162 retval.append (name + " (" + ext + ")"); | 162 retval.append (name + " (" + ext + ")"); |
163 } | 163 } |
164 | 164 |
248 for (QStringList::const_iterator it = inputLine->begin (); | 248 for (QStringList::const_iterator it = inputLine->begin (); |
249 it != inputLine->end (); it++) | 249 it != inputLine->end (); it++) |
250 retval.push_back (it->toStdString ()); | 250 retval.push_back (it->toStdString ()); |
251 | 251 |
252 retval.push_back (uiwidget_creator.get_dialog_path ()->toStdString ()); | 252 retval.push_back (uiwidget_creator.get_dialog_path ()->toStdString ()); |
253 retval.push_back ((QString ("%1").arg (uiwidget_creator.get_dialog_result ())).toStdString ()); | 253 retval.push_back ((QString ("%1").arg ( |
254 uiwidget_creator.get_dialog_result ())).toStdString ()); | |
254 | 255 |
255 return retval; | 256 return retval; |
256 } | 257 } |
257 | 258 |
258 int | 259 int |
265 QString qdir = QString::fromStdString (dir); | 266 QString qdir = QString::fromStdString (dir); |
266 QString qfile = QString::fromStdString (file); | 267 QString qfile = QString::fromStdString (file); |
267 | 268 |
268 QString msg | 269 QString msg |
269 = (addpath_option | 270 = (addpath_option |
270 ? tr ("The file %1 does not exist in the load path. To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.").arg(qfile).arg(qdir) | 271 ? tr ("The file %1 does not exist in the load path. To debug the function you are editing, you must either change to the directory %2 or add that directory to the load path.").arg (qfile).arg (qdir) |
271 : tr ("The file %1 is shadowed by a file with the same name in the load path. To debug the function you are editing, change to the directory %2.").arg(qfile).arg(qdir)); | 272 : tr ("The file %1 is shadowed by a file with the same name in the load path. To debug the function you are editing, change to the directory %2.").arg (qfile).arg (qdir)); |
272 | 273 |
273 QString title = tr ("Change Directory or Add Directory to Load Path"); | 274 QString title = tr ("Change Directory or Add Directory to Load Path"); |
274 | 275 |
275 QString cd_txt = tr ("Change Directory"); | 276 QString cd_txt = tr ("Change Directory"); |
276 QString addpath_txt = tr ("Add Directory to Load Path"); | 277 QString addpath_txt = tr ("Add Directory to Load Path"); |
400 | 401 |
401 void | 402 void |
402 octave_qt_link::do_update_breakpoint (bool insert, | 403 octave_qt_link::do_update_breakpoint (bool insert, |
403 const std::string& file, int line) | 404 const std::string& file, int line) |
404 { | 405 { |
405 emit update_breakpoint_marker_signal (insert, QString::fromStdString (file), line); | 406 emit update_breakpoint_marker_signal (insert, QString::fromStdString (file), |
407 line); | |
406 } | 408 } |
407 | 409 |
408 void | 410 void |
409 octave_qt_link::do_set_default_prompts (std::string& ps1, std::string& ps2, | 411 octave_qt_link::do_set_default_prompts (std::string& ps1, std::string& ps2, |
410 std::string& ps4) | 412 std::string& ps4) |