QseIntParameterEditor Class Reference

#include <qseintparametereditor.h>

Inheritance diagram for QseIntParameterEditor:

Inheritance graph
[legend]
Collaboration diagram for QseIntParameterEditor:

Collaboration graph
[legend]

List of all members.

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 ()

Protected Attributes

QseIntParameterm_IntParameter
QLineEdit * m_LineEdit


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 7 of file qseintparametereditor.cpp.

00008   : QseParameterEditor(ed, param, parent),
00009     m_IntParameter(param),
00010     m_LineEdit(NULL)
00011 {
00012 }


Member Function Documentation

void QseIntParameterEditor::setEditors ( QLineEdit *  value,
QPushButton *  apply,
QPushButton *  cancel 
)

Definition at line 15 of file qseintparametereditor.cpp.

References QseParameterEditor::setEditors().

00016 {
00017   QseParameterEditor::setEditors(apply, cancel);
00018   m_LineEdit = value;
00019 
00020   connect(m_LineEdit, SIGNAL(textChanged(const QString&)),
00021     this, SLOT(editorChanged()));
00022 
00023   editorCancel();
00024 }

Here is the call graph for this function:

bool QseIntParameterEditor::editorValidate (  )  [virtual]

Implements QseParameterEditor.

Definition at line 26 of file qseintparametereditor.cpp.

References m_LineEdit.

00027 {
00028   bool ok;
00029   int i = m_LineEdit -> text().toInt(&ok);
00030 
00031   return ok;
00032 }

void QseIntParameterEditor::editorApply (  )  [virtual]

Implements QseParameterEditor.

Definition at line 34 of file qseintparametereditor.cpp.

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

00035 {
00036   bool ok;
00037   int i = m_LineEdit -> text().toInt(&ok);
00038 
00039   m_Parameter->setValue(i);
00040 }

Here is the call graph for this function:

void QseIntParameterEditor::editorCancel (  )  [virtual]

Implements QseParameterEditor.

Definition at line 42 of file qseintparametereditor.cpp.

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

00043 {
00044   m_LineEdit->setText(m_Parameter->value().toString());
00045 }

Here is the call graph for this function:


Member Data Documentation

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:

Generated on Fri May 2 16:26:42 2008 for QSE by  doxygen 1.5.5