SpectraPac 2.0(r200)
Evaluates PAC Measurements

PacInitialContainer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2008-2010 by Matthias Nagl                              *
00003  *   mnagl@uni-goettingen.de                                               *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef PACINITIALCONTAINER_H
00022 #define PACINITIALCONTAINER_H
00023 
00024 #include "PacAbstractContainer.h"
00025 #include <QPointer>
00026 #include <QFile>
00027 #include "pacCoincidenceDefinitions.h"
00028 
00029 class QWidget;
00030 class QSpinBox;
00031 class QCheckBox;
00032 class QDoubleSpinBox;
00033 class QScienceSpinBox;
00034 class QLabel;
00035 class QComboBox;
00036 class QRadioButton;
00037 class PacBasicMeasurementInfo;
00038 class PacEnergyInput;
00039 class PacCoincidenceInput;
00040 class PaceventsMetaInfo;
00041 namespace Ui {
00042     class PacFileControlWidget;
00043 }
00044 
00050 class PacInitialContainer : public PacAbstractContainer
00051 {
00052 Q_OBJECT
00053 public:
00054     explicit PacInitialContainer(const PacBasicMeasurementInfo *basicinfo, QObject *parent = 0);
00055     ~PacInitialContainer();
00056 
00060     void appendWidgets(QTabWidget *tabwidget, QWidget * filetoolbox);
00061 
00062 signals:
00066     void energyEvaluationRequested(PacEnergyInput *input);
00067     void showCoincidenceSpectraRequested(
00068       const PacCoincidenceInput * input,
00069       const PacCoincidenceSearchResults &results,
00070       bool addendum,
00071       bool stillwritten,
00072       quint64 nextcppointerpos
00073       );
00074 
00075 public slots:
00076 
00077 private slots:
00079     void startEnergyEvaluation();
00080     void showCoincidenceSpectra();
00081     void numberOfChunks(int num);
00082     void detectorSpecificEnergyLimits(bool specific);
00083     void selectedDetectorChanged(int index);
00084     void chargeMinChanged(double val);
00085     void chargeMaxChanged(double val);
00086 
00087 protected:
00088     virtual void csvInputHeaderAndData(QTextStream &) const {};
00089     virtual void saveDataInDom(QDomElement &top) const;
00090     virtual void loadDataFromDom(const QDomElement &top);
00091 
00092 private:
00093     // gui states
00094     QList<qreal> chargemin, chargemax;
00095 
00096     // tmp gui accessors, pointers
00097     const PacBasicMeasurementInfo *basicinfo;
00098     QScienceSpinBox *min, *max;
00099     QSpinBox *maxchunks, *channels, *clipbeginning, *clipend;
00100     QCheckBox *bothends;
00101     QLabel *bothendslabel;
00102     QComboBox *detectorselection;
00103     QRadioButton *detectorspecific;
00104     QDoubleSpinBox *channellength;
00105     bool dontupdatelimits; // lock variable to avoid recursion
00106     PaceventsMetaInfo *metainfo;
00107     QFile paceventsfile;
00108 };
00109 
00110 #endif // PACINITIALCONTAINER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines