00001 #include "qseedgealignerui.h"
00002 #include "qseedgealigner.h"
00003 #include "qsegraphcontroller.h"
00004
00005 QseEdgeAlignerUI::QseEdgeAlignerUI
00006 (QseEdgeAligner* edgeAligner, QWidget* parent)
00007 : QseEXAFSOperatorUI(edgeAligner, parent),
00008 m_EdgeAligner(edgeAligner),
00009 m_EnergyPatternEditor(this, &m_EdgeAligner->m_EnergyPattern, NULL),
00010 m_DetectorPatternEditor(this, &m_EdgeAligner->m_DetectorPattern, NULL),
00011 m_NormalizationPatternEditor(this, &m_EdgeAligner->m_NormalizationPattern, NULL),
00012 m_SecondsPatternEditor(this, &m_EdgeAligner->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
00031 (new QseGraphController(m_EdgeAligner -> m_OutputData, NULL), 0, 0);
00032
00033 m_GraphHolder->setLayout(layout);
00034 };
00035
00036 void QseEdgeAlignerUI::dialogApply()
00037 {
00038 if (editorValidate()) {
00039 editorApply();
00040
00041 patternApply -> setEnabled(false);
00042 patternCancel-> setEnabled(false);
00043 }
00044 }
00045
00046 void QseEdgeAlignerUI::dialogCancel()
00047 {
00048 editorCancel();
00049
00050 patternApply -> setEnabled(false);
00051 patternCancel-> setEnabled(false);
00052 }