Mercurial > octave-antonio
comparison 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 |
comparison
equal
deleted
inserted
replaced
20036:0e712de0af4d | 20037:76c72314d905 |
---|---|
57 label->setAutoFillBackground (true); | 57 label->setAutoFillBackground (true); |
58 label->setTextFormat (Qt::PlainText); | 58 label->setTextFormat (Qt::PlainText); |
59 label->setWordWrap (false); | 59 label->setWordWrap (false); |
60 label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (), | 60 label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (), |
61 up.get_verticalalignment ())); | 61 up.get_verticalalignment ())); |
62 // FIXME: support string_vector | 62 label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n")); |
63 label->setText (Utils::fromStdString (up.get_string_string ())); | |
64 } | 63 } |
65 | 64 |
66 TextControl::~TextControl (void) | 65 TextControl::~TextControl (void) |
67 { | 66 { |
68 } | 67 } |
74 QLabel* label = qWidget<QLabel> (); | 73 QLabel* label = qWidget<QLabel> (); |
75 | 74 |
76 switch (pId) | 75 switch (pId) |
77 { | 76 { |
78 case uicontrol::properties::ID_STRING: | 77 case uicontrol::properties::ID_STRING: |
79 // FIXME: support string_vector | 78 label->setText(Utils::fromStringVector (up.get_string_vector()).join("\n")); |
80 label->setText (Utils::fromStdString (up.get_string_string ())); | |
81 break; | 79 break; |
82 | 80 |
83 case uicontrol::properties::ID_HORIZONTALALIGNMENT: | 81 case uicontrol::properties::ID_HORIZONTALALIGNMENT: |
84 case uicontrol::properties::ID_VERTICALALIGNMENT: | 82 case uicontrol::properties::ID_VERTICALALIGNMENT: |
85 label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (), | 83 label->setAlignment (Utils::fromHVAlign (up.get_horizontalalignment (), |