qse  0.5.4
qsestringparametereditor.cpp
Go to the documentation of this file.
2 #include "qsestringparameter.h"
3 #include <QLineEdit>
4 #include <QString>
5 
6 #include <stdio.h>
7 
9 (QseOperatorEditor* ed, QseStringParameter* param, QObject* parent)
10  : QseParameterEditor(ed, param, parent),
11  m_StringParameter(param),
12  m_LineEdit(NULL)
13 {
14 }
15 
17 (QLineEdit* value, QPushButton* apply, QPushButton* cancel)
18 {
19  QseParameterEditor::setEditors(apply, cancel);
20  m_LineEdit = value;
21 
22  connect(m_LineEdit, SIGNAL(textChanged(const QString&)),
23  this, SLOT(editorChanged()));
24 
25  editorCancel();
26 }
27 
29 {
30  return true;
31 }
32 
34 {
35  QString s = m_LineEdit -> text();
36 
38 
39 // printf("QseStringParameterEditor::editorApply: %s = %s\n",
40 // qPrintable(m_Parameter->name()),
41 // qPrintable(m_Parameter->value().toString()));
42 }
43 
45 {
46  m_LineEdit->setText(m_Parameter->value().toString());
47 }
QVariant value() const
QseParameter * m_Parameter
QseStringParameterEditor(QseOperatorEditor *ed, QseStringParameter *param, QObject *parent=0)
void setEditors(QLineEdit *value, QPushButton *apply, QPushButton *cancel)
void setValue(const QVariant &value)
void setEditors(QPushButton *apply, QPushButton *cancel)