3 #include <QTableWidget>
4 #include <QTableWidgetItem>
8 #include <QProgressBar>
15 #include <QFileDialog>
17 #include <QDesktopServices>
20 #include <qwt_plot_item.h>
21 #include <qwt_plot_curve.h>
22 #include <qwt_plot_zoomer.h>
49 m_EdgeAlignerUI(NULL),
50 m_ScanAveragerUI(NULL),
51 m_NormalizedController(NULL),
52 m_AveragedController(NULL),
59 m_MainWindow -> m_TabWidget -> insertTab(tab++, m_InputDataUI,
"Input Data");
65 m_MainWindow -> m_TabWidget -> insertTab(tab++, m_NormalizerUI,
"Normalization");
67 m_NormalizedController =
69 m_MainWindow -> m_TabWidget ->
70 insertTab(tab++, m_NormalizedController,
"Normalized Data");
76 m_MainWindow -> m_TabWidget -> insertTab(tab++, m_ScanAveragerUI,
"Averaging");
78 m_AveragedController =
80 m_MainWindow -> m_TabWidget ->
81 insertTab(tab++, m_AveragedController,
"Averaged Data");
83 m_MainWindow -> m_TabWidget -> setCurrentIndex(0);
85 m_NormalizedController -> addContextMenuAction(m_MainWindow->actionAverageSelectedScans);
89 connect(m_MainWindow -> actionRunNormalizer, SIGNAL(triggered()),
90 this, SLOT(runNormalizer(
void)));
92 connect(m_DataFlow->m_InputData, SIGNAL(message(
const QString&)),
93 this, SLOT(message(
const QString&)));
95 connect(m_DataFlow->m_Normalizer, SIGNAL(message(
const QString&)),
96 this, SLOT(message(
const QString&)));
98 connect(m_DataFlow->m_InputData, SIGNAL(madeProgress(
int)),
this, SLOT(setProgress(
int)));
100 m_NormalizedController->setTitle(
"Normalized Scans");
102 m_AveragedController->setTitle(
"Averaged Data");
104 m_Progress =
new QProgressBar(NULL);
105 m_Progress -> setMinimumWidth(150);
106 m_Progress -> setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
108 m_MainWindow -> statusBar() -> addPermanentWidget(m_Progress);
110 QStringList args = QApplication::arguments();
111 int nargs = args.size();
113 for (
int i=1; i<nargs; i++) {
114 appendDataFile(args.at(i));
126 connect(
m_MainWindow->actionOpenDataFile, SIGNAL(triggered()),
128 connect(
m_MainWindow->actionAppendDataFile, SIGNAL(triggered()),
130 connect(
m_MainWindow->actionOpenControlFile, SIGNAL(triggered()),
132 connect(
m_MainWindow->actionSaveSplitDataFiles, SIGNAL(triggered()),
134 connect(
m_MainWindow->actionSaveNormalizedFiles, SIGNAL(triggered()),
136 connect(
m_MainWindow->actionSaveAveragedFiles, SIGNAL(triggered()),
138 connect(
m_MainWindow->actionSaveControlFile, SIGNAL(triggered()),
143 connect(
m_MainWindow->actionPrintNormalizedGraph, SIGNAL(triggered()),
145 connect(
m_MainWindow->actionPrintAveragedGraph, SIGNAL(triggered()),
148 connect(
m_MainWindow->actionQSEHomePage, SIGNAL(triggered()),
154 connect(
m_MainWindow->actionAverageSelectedScans, SIGNAL(triggered()),
213 QString filename = QFileDialog::getOpenFileName(
m_MainWindow, tr(
"Open Data File"),
".",
"");
215 if (filename !=
"") {
228 message(tr(
"New Data File loaded %1").arg(name));
233 QString filename = QFileDialog::getOpenFileName(
m_MainWindow, tr(
"Append Data File"),
".",
"");
235 if (filename !=
"") {
242 m_DataFlow -> m_InputReader -> appendFile(name);
246 message(tr(
"New Data File appended %1").arg(name));
251 QString filename = QFileDialog::getOpenFileName(
m_MainWindow, tr(
"Open Control File"),
".",
"");
253 if (filename !=
"") {
260 QSettings settings(name, QSettings::IniFormat);
282 QString filename = QFileDialog::getSaveFileName(
m_MainWindow, tr(
"Save Control File"),
".",
"");
284 if (filename !=
"") {
291 QSettings settings(name, QSettings::IniFormat);
497 QDesktopServices::openUrl(QUrl(
"http://qse.sourceforge.net"));
QseScan * scan(int n) const
void normalizedScansChanged()
QseController(QseProcessorMain *w, QObject *parent=0)
QseNormalizer * m_Normalizer
QseInputFile * m_InputData
void readControlFile(const QString &name)
void saveNormalizedFile()
QseDataSet * m_NormalizedData
void setProgress(int level)
void readSettings(QSettings *settings)
void averageSelectedScans()
QseDataSet * m_AveragedData
int openFile(QString fileName)
QseGraphController * m_NormalizedController
QProgressBar * m_Progress
void message(const QString &message)
void readDataFile(const QString &name)
void writeControlFile(const QString &name)
QseGraphController * m_AveragedController
QseProcessorMain * m_MainWindow
void writeSettings(QSettings *settings)