00001 #include "qsedatadeglitcherui.h"
00002 #include "qsedatadeglitcher.h"
00003 #include "qsegraphcontroller.h"
00004
00005 QseDataDeglitcherUI::QseDataDeglitcherUI
00006 (QseDataDeglitcher* deglitcher, QWidget* parent)
00007 : QseEXAFSOperatorUI(deglitcher, parent),
00008 m_Deglitcher(deglitcher),
00009 m_EnergyPatternEditor(this, &m_Deglitcher->m_EnergyPattern, NULL),
00010 m_DetectorPatternEditor(this, &m_Deglitcher->m_DetectorPattern, NULL),
00011 m_NormalizationPatternEditor(this, &m_Deglitcher->m_NormalizationPattern, NULL),
00012 m_SecondsPatternEditor(this, &m_Deglitcher->m_SecondsPattern, NULL)
00013 {
00014 setupUi(this);
00015
00016 m_EnergyPatternEditor.setEditors
00017 (energyPatternEdit,energyRegexp,patternApply,patternCancel);
00018 m_DetectorPatternEditor.setEditors
00019 (detectorPatternEdit,detectorRegexp,patternApply,patternCancel);
00020 m_NormalizationPatternEditor.setEditors
00021 (normalizationPatternEdit,normalizationRegexp,patternApply,patternCancel);
00022 m_SecondsPatternEditor.setEditors
00023 (secondsPatternEdit,secondsRegexp,patternApply,patternCancel);
00024
00025 connect(patternApply, SIGNAL(clicked()), this, SLOT(dialogApply()));
00026 connect(patternCancel, SIGNAL(clicked()), this, SLOT(dialogCancel()));
00027
00028 QGridLayout *layout = new QGridLayout;
00029
00030 layout->addWidget(new QseGraphController(m_Deglitcher -> m_OutputData, NULL), 0, 0);
00031
00032 m_GraphHolder->setLayout(layout);
00033 };
00034
00035 void QseDataDeglitcherUI::dialogApply()
00036 {
00037 if (editorValidate()) {
00038 editorApply();
00039
00040 patternApply -> setEnabled(false);
00041 patternCancel-> setEnabled(false);
00042 }
00043 }
00044
00045 void QseDataDeglitcherUI::dialogCancel()
00046 {
00047 editorCancel();
00048
00049 patternApply -> setEnabled(false);
00050 patternCancel-> setEnabled(false);
00051 }