mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
Creating Classes, Libraries and Functions for the Common SLS Detector GUI
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@1 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
56
slsDetectorGui/src/qCloneWidget.cpp
Normal file
56
slsDetectorGui/src/qCloneWidget.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* qCloneWidget.cpp
|
||||
*
|
||||
* Created on: May 18, 2012
|
||||
* Author: l_maliakal_d
|
||||
*/
|
||||
|
||||
/** Qt Project Class Headers */
|
||||
#include "qCloneWidget.h"
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlotLayout.h"
|
||||
/** Qt Include Headers */
|
||||
#include <QFrame>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
|
||||
/** C++ Include Headers */
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
qCloneWidget::qCloneWidget(QWidget *parent,int id,QSize fSize,int numDim,SlsQt1DPlot*& plot1D,SlsQt2DPlotLayout*& plot2D):QFrame(parent,Qt::Popup|Qt::SubWindow),id(id){
|
||||
|
||||
QGroupBox *cloneBox = new QGroupBox(this);
|
||||
QGridLayout *gridClone = new QGridLayout(cloneBox);
|
||||
cloneBox->setLayout(gridClone);
|
||||
cloneBox->setFlat(1);
|
||||
cloneBox->setTitle("Startup Image");
|
||||
cloneBox->resize(fSize);
|
||||
|
||||
if(numDim==1){
|
||||
cloneplot1D = plot1D;
|
||||
gridClone->addWidget(cloneplot1D,0,0);
|
||||
}else{
|
||||
cloneplot2D = plot2D;
|
||||
gridClone->addWidget(cloneplot2D,0,0);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
qCloneWidget::~qCloneWidget(){
|
||||
delete cloneplot1D;
|
||||
delete cloneplot2D;
|
||||
}
|
||||
|
||||
|
||||
void qCloneWidget::closeEvent(QCloseEvent* event){
|
||||
emit CloneClosedSignal(id);
|
||||
event->accept();
|
||||
}
|
Reference in New Issue
Block a user