26 #if defined (HAVE_CONFIG_H)
56 if ((up.get_max () - up.get_min ()) > 1)
71 :
BaseControl (oct_qobj, interp, go, edit), m_multiLine (false),
90 up.get_verticalalignment ()));
92 connect (edit, SIGNAL (textEdited (
const QString&)),
103 :
BaseControl (oct_qobj, interp, go, edit), m_multiLine (true),
104 m_textChanged (false)
120 edit->setAcceptRichText (
false);
122 (up.get_string_vector ()).join (
"\n"));
144 bool handled =
false;
170 case uicontrol::properties::ID_STRING:
174 case uicontrol::properties::ID_HORIZONTALALIGNMENT:
175 case uicontrol::properties::ID_VERTICALALIGNMENT:
177 up.get_verticalalignment ()));
180 case uicontrol::properties::ID_MIN:
181 case uicontrol::properties::ID_MAX:
182 if ((up.get_max () - up.get_min ()) > 1)
184 QWidget *container = edit->parentWidget ();
202 TextEdit *edit = qWidget<TextEdit> ();
206 case uicontrol::properties::ID_STRING:
208 (up.get_string_vector ()).join (
"\n"));
211 case uicontrol::properties::ID_MIN:
212 case uicontrol::properties::ID_MAX:
213 if ((up.get_max () - up.get_min ()) <= 1)
215 QWidget *container = edit->parentWidget ();
239 ? qWidget<TextEdit> ()->toPlainText ()
240 : qWidget<QLineEdit> ()->text ());
254 if (txt.length () > 0)
264 ? qWidget<TextEdit> ()->toPlainText ()
265 : qWidget<QLineEdit> ()->text ());
void init(QWidget *w, bool callBase=false)
bool updateMultiLine(int pId)
bool updateSingleLine(int pId)
static EditControl * create(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go)
void initCommon(QWidget *widget)
void init(QLineEdit *edit, bool callBase=false)
EditControl(octave::base_qobject &oct_qobj, octave::interpreter &interp, const graphics_object &go, QLineEdit *edit)
void editingFinished(void)
virtual Container * innerContainer(void)=0
static Object * parentObject(octave::interpreter &interp, const graphics_object &go)
void gh_callback_event(const graphics_handle &h, const std::string &name)
void gh_set_event(const graphics_handle &h, const std::string &name, const octave_value &value)
Base class for Octave interfaces that use Qt.
QStringList fromStringVector(const string_vector &v)
Qt::Alignment fromHVAlign(const std::string &halign, const std::string &valign)
Cell toCellString(const QStringList &l)
QString fromStdString(const std::string &s)
std::string toStdString(const QString &s)