qse  0.5.4
qseintparametereditor.cpp
Go to the documentation of this file.
2 #include "qseintparameter.h"
3 
4 #include <QLineEdit>
5 
6 #include <stdio.h>
7 
9 (QseOperatorEditor* ed, QseIntParameter* param, QObject* parent)
10  : QseParameterEditor(ed, param, parent),
11  m_IntParameter(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  bool ok;
31  int i = m_LineEdit -> text().toInt(&ok);
32 
33  return ok;
34 }
35 
37 {
38  bool ok;
39  int i = m_LineEdit -> text().toInt(&ok);
40 
42 
43 // printf("QseIntParameterEditor::editorApply: %s = %s\n",
44 // qPrintable(m_Parameter->name()),
45 // qPrintable(m_Parameter->value().toString()));
46 }
47 
49 {
50  m_LineEdit->setText(m_Parameter->value().toString());
51 }
QVariant value() const
QseParameter * m_Parameter
QseIntParameterEditor(QseOperatorEditor *ed, QseIntParameter *param, QObject *parent=0)
void setValue(const QVariant &value)
void setEditors(QLineEdit *value, QPushButton *apply, QPushButton *cancel)
void setEditors(QPushButton *apply, QPushButton *cancel)