qse  0.5.4
qseoperatoreditor.cpp
Go to the documentation of this file.
1 #include "qseoperatoreditor.h"
2 #include "qseoperator.h"
3 #include "qseparametereditor.h"
4 
5 #include <stdio.h>
6 
8  : QWidget(parent),
9  m_Operator(oper)
10 {
11 }
12 
14 {
15 // printf("QseOperatorEditor::addEditor\n");
16 
17  m_Editors.append(editor);
18 }
19 
21 {
22  bool ok = true;
23 
25 
26  foreach(ed, m_Editors) {
27  if(!ed->editorValidate()) {
28  ok = false;
29  }
30  }
31 
32  return ok;
33 }
34 
36 {
38 
39  foreach(ed, m_Editors) {
40 // printf("Editor %p apply\n", ed);
41  ed->editorApply();
42  }
43 }
44 
46 {
48 
49  foreach(ed, m_Editors) {
50 // printf("Editor %p cancel\n", ed);
51  ed->editorCancel();
52  }
53 }
54 
virtual void editorApply()=0
virtual bool editorValidate()=0
QList< QseParameterEditor * > m_Editors
virtual void editorCancel()=0
QseOperatorEditor(QseOperator *oper, QWidget *parent=0)
void addEditor(QseParameterEditor *editor)