resize works

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@2 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-05-23 16:00:35 +00:00
parent 9f851d6156
commit 934bbbd0c8
21 changed files with 1858 additions and 619 deletions

View File

@@ -60,10 +60,14 @@ private:
/**Tab Widget */
QTabWidget *tabs;
static const int NUMBER_OF_TABS = 8;
/** height of Plot Window when undocked */
int heightPlotWindow;
/** enumeration of the tabs */
enum {Measurement, DataOutput, Plot, Actions, Settings, Advanced, Debugging, Developer, NumberOfTabs };
/* Scroll Area for the tabs**/
QScrollArea *scroll[NUMBER_OF_TABS];
QScrollArea *scroll[NumberOfTabs];
QScrollArea *scrollMain;
/**Measurement tab */
qTabMeasurement *tab_measurement;
@@ -73,18 +77,15 @@ private:
qTabPlot *tab_plot;
/**Actions tab */
qTabActions *tab_actions;
/**Settings tab */
qTabSettings *tab_settings;
/**Advanced tab */
qTabAdvanced *tab_advanced;
/**Settings tab */
qTabSettings *tab_Settings;
/**Debugging tab */
qTabDebugging *tab_debugging;
/**Developer tab */
qTabDeveloper *tab_developer;
/** enumeration of the tabs */
enum {Measurement, DataOutput, Plot, Actions, Advanced, Settings, Debugging, Developer };
/**Sets up the layout of the widget
*/
@@ -153,6 +154,16 @@ void Version();
/** Executing About */
void About();
/** Resizes the main window if the plot is docked/undocked
* @param b bool TRUE if undocked(outside main window), FALSE docked
*/
void ResizeMainWindow(bool b);
/** Sets the Size of the undocked/docked terminal window
* @param b bool TRUE if undocked(outside main window), FALSE docked
*/
void SetTerminalWindowSize(bool b);
signals:

View File

@@ -7,8 +7,7 @@
#ifndef QDRAWPLOT_H
#define QDRAWPLOT_H
/** Form Header */
#include "ui_form_drawplot.h"
/** Project Class Headers */
class slsDetectorUtils;
/** Qt Project Class Headers */
@@ -17,13 +16,17 @@ class SlsQt1DPlot;
class SlsQt2DPlotLayout;
class qCloneWidget;
/** Qt Include Headers */
class QTimer;
class QGridLayout;
#include <QWidget>
#include <QGridLayout>
#include <QGroupBox>
#include <QTimer>
/**
*@short Sets up the plot widget
*/
class qDrawPlot:public QWidget, private Ui::DrawPlotObject{
class qDrawPlot:public QWidget{
Q_OBJECT
public:
@@ -41,36 +44,12 @@ public:
*/
void StartStopDaqToggle(bool stop_if_running=0);
public slots:
/** To select 1D or 2D plot
* @param i is 1 for 1D, else 2D plot
*/
void SelectPlot(int i=2);
/** To select 1D plot
*/
void Select1DPlot() {SelectPlot(1);}
/** To select 2D plot
*/
void Select2DPlot() {SelectPlot(2);}
/** To clear plot
*/
void Clear1DPlot();
/** Creates a clone of the plot
* */
void ClonePlot();
/** Closes all the clone plots
* */
void CloseClones();
private:
/** The sls detector object */
slsDetectorUtils *myDet;
/** Number of Measurements */
int numberOfMeasurements;
/** Number of Exposures */
int number_of_exposures;
/** Duration between Exposures */
@@ -79,16 +58,22 @@ private:
double acquisitionTime;
/** Widgets needed to plot the clone */
/** Max Number of Clone Windows */
static const int MAXCloneWindows = 50;
/** */
/** Array of clone window widget pointers */
qCloneWidget *winClone[MAXCloneWindows];
/** */
/** Widgets needed to set up plot*/
QGroupBox *boxPlot;
QGridLayout *layout;
QGridLayout *plotLayout;
/** Timer to update plot */
QTimer* plot_update_timer;
/** */
/** 1D object */
SlsQt1DPlot* plot1D;
/** */
/** 2D object */
SlsQt2DPlotLayout* plot2D;
/** */
/** 1D hist values */
QVector<SlsQtH1D*> plot1D_hists;
@@ -99,37 +84,37 @@ private:
pthread_mutex_t last_image_complete_mutex;
/**variables for histograms */
/** */
/** 1D or 2D */
unsigned int plot_in_scope;
/** */
/** Current Image Number */
unsigned int lastImageNumber;
/** */
/** Title in 2D */
std::string imageTitle;
/** */
/** X Axis Title in 2D */
std::string imageXAxisTitle;
/** */
/** Y Axis Title in 2D */
std::string imageYAxisTitle;
/** */
/** Z Axis Title in 2D */
std::string imageZAxisTitle;
/** */
/** Number of Pixels in X Axis */
unsigned int nPixelsX;
/** */
/** Number of Pixels in Y Axis */
unsigned int nPixelsY;
/** */
/** Current Image Values in 1D */
double* lastImageArray;
/** */
/** Number of graphs in 1D */
unsigned int nHists;
/** */
/** Title for all the graphs in 1D */
std::string histTitle[10];
/** */
/** X Axis Title in 1D */
std::string histXAxisTitle;
/** */
/** Y Axis Title in 1D */
std::string histYAxisTitle;
/** */
/** Total Number of X axis values/channels in 1D */
int histNBins;
/** */
/** X Axis value in 1D */
double* histXAxis;
/** */
/** Y Axis value in 1D */
double* histYAxis[10];
@@ -196,6 +181,40 @@ private:
void* AcquireImages();
public slots:
/** Set number of measurements
* @param num number of measurements to be set
*/
void setNumMeasurements(int num);
/** To select 1D or 2D plot
* @param i is 1 for 1D, else 2D plot
*/
void SelectPlot(int i=2);
/** To select 1D plot
*/
void Select1DPlot() {SelectPlot(1);}
/** To select 2D plot
*/
void Select2DPlot() {SelectPlot(2);}
/** To clear plot
*/
void Clear1DPlot();
/** Creates a clone of the plot
* */
void ClonePlot();
/** Closes all the clone plots
* */
void CloseClones();
private slots:
/** To update plot
*/

View File

@@ -44,6 +44,8 @@ private:
/** The Plot widget */
qDrawPlot *myPlot;
enum{None, Auto, Gated, Trigger_Exp_Series, Trigger_Frame, Trigger_Readout, Gated_Start, Trigger_Window, NumTimingModes};
/** methods */
/** Sets up the widget
@@ -51,8 +53,16 @@ private:
void SetupWidgetWindow();
/** Sets up all the slots and signals
* @param timingChange only some of the signals are disconnected when timing mode is changed
* This method is to reconnect them again.
*/
void Initialization();
void Initialization(int timingChange=0);
/** Disconnects all the slots and signals (which depend on timing mode)
* to retrieve all the parameters from client.
* This is done only when Timing mode is changed
*/
void DeInitialization();
/** Enables/Disables all the widgets
*/
@@ -66,24 +76,9 @@ public slots:
void UpdateFinished();
private slots:
/** Set settings according to selection
* @param index index of selection
*/
void setSettings(int index);
/** Set number of frames
* @param val number of frames to be set
*/
void setNumFrames(int val);
/** Set acquisition time
*/
void setAcquisitionTime();
/** Set frame period between exposures
*/
void setFramePeriod();
/** Set file name
* @param fName name of file
*/
@@ -98,6 +93,44 @@ void setRunIndex(int index);
*/
void startStopAcquisition();
/** Sets the timing mode
* @ param mode cane be None, Auto, Gated, Trigger Exposure Series,
* Trigger Frame, Trigger Readout, External Trigger Window
*/
void setTimingMode(int mode);
/** Set number of frames
* @param val number of frames to be set
*/
void setNumFrames(int val);
/** Set acquisition time
*/
void setExposureTime();
/** Set frame period between exposures
*/
void setAcquisitionPeriod();
/** Set number of triggers
* @param val number of triggers to be set
*/
void setNumTriggers(int val);
/** Set delay
*/
void setDelay();
/** Set number of gates
* @param val number of gates to be set
*/
void setNumGates(int val);
/** Set number of probes
* @param val number of probes to be set
*/
void setNumProbes(int val);
signals:

View File

@@ -41,7 +41,6 @@ private:
/** The Plot widget */
qDrawPlot *myPlot;
/** methods */
/** Sets up the widget
*/

View File

@@ -47,6 +47,13 @@ private:
*/
void Enable(bool enable);
private slots:
/** Set settings according to selection
* @param index index of selection
*/
void setSettings(int index);
};