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

#include <qseenumparametereditor.h>

Inheritance diagram for QseEnumParameterEditor:
Inheritance graph

Public Member Functions

 QseEnumParameterEditor (QseOperatorEditor *ed, QseEnumParameter *param, QObject *parent=0)
 
void setEditors (QComboBox *combo, 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

QseEnumParameterm_EnumParameter
 
QComboBox * m_ComboBox
 
- 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 qseenumparametereditor.h.

Constructor & Destructor Documentation

QseEnumParameterEditor::QseEnumParameterEditor ( QseOperatorEditor ed,
QseEnumParameter param,
QObject *  parent = 0 
)

Definition at line 10 of file qseenumparametereditor.cpp.

11  : QseParameterEditor(ed, param, parent),
12  m_EnumParameter(param),
13  m_ComboBox(NULL)
14 {
15 }
QseEnumParameter * m_EnumParameter
QseParameterEditor(QseOperatorEditor *ed, QseParameter *param, QObject *parent=0)

Member Function Documentation

void QseEnumParameterEditor::editorApply ( )
virtual

Implements QseParameterEditor.

Definition at line 40 of file qseenumparametereditor.cpp.

References m_ComboBox, and QseParameterEditor::m_Parameter.

41 {
42  m_Parameter -> setValue(m_ComboBox -> currentIndex());
43 
44 // printf("QseEnumParameterEditor::editorApply: %s = %s\n",
45 // qPrintable(m_Parameter->name()),
46 // qPrintable(m_Parameter->value().toString()));
47 }
QseParameter * m_Parameter
void QseEnumParameterEditor::editorCancel ( )
virtual

Implements QseParameterEditor.

Definition at line 49 of file qseenumparametereditor.cpp.

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

50 {
51  m_ComboBox -> setCurrentIndex(m_Parameter->value().toInt());
52 }
QVariant value() const
QseParameter * m_Parameter
bool QseEnumParameterEditor::editorValidate ( )
virtual

Implements QseParameterEditor.

Definition at line 33 of file qseenumparametereditor.cpp.

34 {
35 // printf("Need QseEnumParameterEditor::editorValidate\n");
36 
37  return true;
38 }
void QseEnumParameterEditor::setEditors ( QComboBox *  combo,
QPushButton *  apply,
QPushButton *  cancel 
)

Definition at line 18 of file qseenumparametereditor.cpp.

References QseParameterEditor::setEditors().

19 {
20  QseParameterEditor::setEditors(apply, cancel);
21 
22  m_ComboBox = combo;
23 
24  m_ComboBox -> clear();
25  m_ComboBox -> addItems(m_EnumParameter -> values());
26 
27  connect(m_ComboBox, SIGNAL(currentIndexChanged(int)),
28  this, SLOT(editorChanged()));
29 
30  editorCancel();
31 }
void setEditors(QPushButton *apply, QPushButton *cancel)
QseEnumParameter * m_EnumParameter

Member Data Documentation

QComboBox* QseEnumParameterEditor::m_ComboBox
protected

Definition at line 28 of file qseenumparametereditor.h.

Referenced by editorApply(), and editorCancel().

QseEnumParameter* QseEnumParameterEditor::m_EnumParameter
protected

Definition at line 27 of file qseenumparametereditor.h.


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