Mercurial > octave
diff libgui/graphics/TextControl.cc @ 20037:76c72314d905
QT Text/EditControl: support String cells (Bug 44749)
* libgui/graphics/QtHandlesUtils.cc/h
(toCellString): New function
* libgui/graphics/EditControl.cc
(EditControl::init): set text as string_vector
(EditControl::updateMultiLine): set text as string_vector
(EditControl::returnPressed): set String as cells
(EditControl::editingFinished): set String as cells
* libgui/graphics/TextControl.cc
(TextControl::TextControl): set text as string vector
(TextControl::update): set text as string vector
author | John Donoghue |
---|---|
date | Tue, 07 Apr 2015 12:12:59 -0400 |
parents | f0e61a67ad9f |
children | 710e700cdd7f |
line wrap: on
line diff
--- a/libgui/graphics/TextControl.cc Mon Apr 06 23:06:08 2015 -0400 +++ b/libgui/graphics/TextControl.cc Tue Apr 07 12:12:59 2015 -0400 @@ -59,8 +59,7 @@ label->setWordWrap (false); label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (), up.get_verticalalignment ())); - // FIXME: support string_vector - label->setText (Utils::fromStdString (up.get_string_string ())); + label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n")); } TextControl::~TextControl (void) @@ -76,8 +75,7 @@ switch (pId) { case uicontrol::properties::ID_STRING: - // FIXME: support string_vector - label->setText (Utils::fromStdString (up.get_string_string ())); + label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n")); break; case uicontrol::properties::ID_HORIZONTALALIGNMENT: