qse  0.5.4
Public Member Functions | Protected Attributes | List of all members
QseIntParameterEditor Class Reference

#include <qseintparametereditor.h>

Inheritance diagram for QseIntParameterEditor:
Inheritance graph

Public Member Functions

 QseIntParameterEditor (QseOperatorEditor *ed, QseIntParameter *param, QObject *parent=0)
 
void setEditors (QLineEdit *value, QPushButton *apply, QPushButton *cancel)
 
virtual bool editorValidate ()
 
virtual void editorApply ()
 
virtual void editorCancel ()
 
- Public Member Functions inherited from QseParameterEditor
 QseParameterEditor (QseOperatorEditor *ed, QseParameter *param, QObject *parent=0)
 
void setEditors (QPushButton *apply, QPushButton *cancel)
 

Protected Attributes

QseIntParameterm_IntParameter
 
QLineEdit * m_LineEdit
 
- Protected Attributes inherited from QseParameterEditor
QseOperatorEditorm_OperatorEditor
 
QseParameterm_Parameter
 
QPushButton * m_ApplyButton
 
QPushButton * m_CancelButton
 

Additional Inherited Members

- Protected Slots inherited from QseParameterEditor
void editorChanged ()
 

Detailed Description

Definition at line 10 of file qseintparametereditor.h.

Constructor & Destructor Documentation

QseIntParameterEditor::QseIntParameterEditor ( QseOperatorEditor ed,
QseIntParameter param,
QObject *  parent = 0 
)

Definition at line 9 of file qseintparametereditor.cpp.

10  : QseParameterEditor(ed, param, parent),
11  m_IntParameter(param),
12  m_LineEdit(NULL)
13 {
14 }
QseIntParameter * m_IntParameter
QseParameterEditor(QseOperatorEditor *ed, QseParameter *param, QObject *parent=0)

Member Function Documentation

void QseIntParameterEditor::editorApply ( )
virtual

Implements QseParameterEditor.

Definition at line 36 of file qseintparametereditor.cpp.

References m_LineEdit, QseParameterEditor::m_Parameter, and QseParameter::setValue().

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 }
QseParameter * m_Parameter
void setValue(const QVariant &value)
void QseIntParameterEditor::editorCancel ( )
virtual

Implements QseParameterEditor.

Definition at line 48 of file qseintparametereditor.cpp.

References m_LineEdit, QseParameterEditor::m_Parameter, and QseParameter::value().

49 {
50  m_LineEdit->setText(m_Parameter->value().toString());
51 }
QVariant value() const
QseParameter * m_Parameter
bool QseIntParameterEditor::editorValidate ( )
virtual

Implements QseParameterEditor.

Definition at line 28 of file qseintparametereditor.cpp.

References m_LineEdit.

29 {
30  bool ok;
31  int i = m_LineEdit -> text().toInt(&ok);
32 
33  return ok;
34 }
void QseIntParameterEditor::setEditors ( QLineEdit *  value,
QPushButton *  apply,
QPushButton *  cancel 
)

Definition at line 17 of file qseintparametereditor.cpp.

References QseParameterEditor::setEditors().

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 }
void setEditors(QPushButton *apply, QPushButton *cancel)

Member Data Documentation

QseIntParameter* QseIntParameterEditor::m_IntParameter
protected

Definition at line 27 of file qseintparametereditor.h.

QLineEdit* QseIntParameterEditor::m_LineEdit
protected

Definition at line 28 of file qseintparametereditor.h.

Referenced by editorApply(), editorCancel(), and editorValidate().


The documentation for this class was generated from the following files: