l_maliakal_d f3eb9c924f included network tab in gui, correctedmulti to be able to clear sls detectors error mask,included coud not set up network parameter error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@144 af1100a4-978c-4157-bff7-07162d2ba061
2013-02-07 17:34:16 +00:00

181 lines
3.3 KiB
C++

/*
* qTabAdvanced.h
*
* Created on: May 10, 2012
* Author: l_maliakal_d
*/
#ifndef QTABADVANCED_H_
#define QTABADVANCED_H_
#include "qDefs.h"
/** Form Header */
#include "ui_form_tab_advanced.h"
/** Project Class Headers */
class multiSlsDetector;
/** Qt Project Class Headers */
class qDrawPlot;
/** Qt Include Header */
#include <QStackedLayout>
/**
*@short sets up the advanced parameters
*/
class qTabAdvanced:public QWidget, private Ui::TabAdvancedObject{
Q_OBJECT
public:
/** \short The constructor
* @param parent is the parent tab widget
* @param detector is the detector returned from the detector tab
* @param plot plot object reference
*/
qTabAdvanced(QWidget *parent,multiSlsDetector*& detector, qDrawPlot*& plot);
/** Destructor
*/
~qTabAdvanced();
public slots:
/** To refresh and update widgets
*/
void Refresh();
private:
/** Sets up the widget
*/
void SetupWidgetWindow();
/** Sets up all the slots and signals
*/
void Initialization();
private slots:
/** Set ADC Readout
*/
void SetADCReadout(int i);
/** Enable/Disable Energy and Calibration Logs
*/
void SetLogs();
/** Set acquisition time
*/
void SetExposureTime();
/** Set the Threshold dac value
*/
void SetThreshold();
/** Set output directory for trimming
*/
void SetOutputFile();
/** Browse output directory for trimming
*/
void BrowseOutputFile();
/** Enables trimming method and calls SetTrimmingMethod if enabled
* @param enable to enable trimming
*/
void EnableTrimming(bool enable);
/** Enabling resolution and Counts if this is enabled
* @param enable to enable
*/
void SetOptimize(bool enable);
/** Sets the trimming method
* @param mode trimming method
*/
void SetTrimmingMethod(int mode);
/** Ensures the right trimming mode and Executes Trimming
*/
void StartTrimming();
/** Updates the plot with trimbits from detector/shared memory
*/
void UpdateTrimbitPlot(int id);
/** Sets control port
* @param port control port
*/
void SetControlPort(int port);
/** Sets stop port
* @param port stop port
*/
void SetStopPort(int port);
/** Sets receiver tcp port
* @param port receiver tcp port
*/
void SetRxrTCPPort(int port);
/** Sets receiver udp port
* @param port receiver udp port
*/
void SetRxrUDPPort(int port);
/** Sets receiver online
* @param index 1 for online and 0 for offline
*/
void SetReceiverOnline(int index);
/** Sets detector online
* @param index 1 for online and 0 for offline
*/
void SetOnline(int index);
/** Sets network parameters like receiver udp ip,
* receiver udp mac, detector ip and detector mac
*/
void SetNetworkParameters();
/** Sets the receiver. which also sets the receiver parameters
*/
void SetReceiver();
/** Configures mac
*/
void Configuremac();
private:
/** The sls detector object */
multiSlsDetector *myDet;
/** detector type */
slsDetectorDefs::detectorType detType;
/** The Plot widget */
qDrawPlot *myPlot;
QButtonGroup *btnGroup;
/** Tool Tip for the output dir */
QString outputDirTip;
QString errOutputTip;
QString errOnlineTip;
QString detOnlineTip;
QString rxrOnlineTip;
QPalette red;
/** Trimming mode */
slsDetectorDefs::trimMode trimmingMode;
bool isEnergy;
bool isAngular;
};
#endif /* QTABADVANCED_H_ */