mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 21:37:13 +02:00
gotthard2: gain plot fix with clones
This commit is contained in:
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>350</height>
|
||||
<width>376</width>
|
||||
<height>425</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -240,7 +240,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<width>376</width>
|
||||
<height>28</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -31,6 +31,7 @@ class qDefs : public QWidget {
|
||||
|
||||
static const int Q_FONT_SIZE=9;
|
||||
static const int DATA_GAIN_PLOT_RATIO=5;
|
||||
static const int MIN_HEIGHT_GAIN_PLOT_1D=75;
|
||||
|
||||
static void DisplayExceptions(std::string emsg, std::string src) {
|
||||
try {
|
||||
|
@ -55,14 +55,22 @@ void qCloneWidget::SetupWidgetWindow(QString title) {
|
||||
if (gainplot2d == nullptr) {
|
||||
plotLayout->addWidget(plot2d);
|
||||
} else {
|
||||
gainplot2d->setFixedWidth(plot2d->width() / qDefs::DATA_GAIN_PLOT_RATIO);
|
||||
gainplot2d->setFixedHeight(plot2d->height() / qDefs::DATA_GAIN_PLOT_RATIO);
|
||||
int ratio = qDefs::DATA_GAIN_PLOT_RATIO - 1;
|
||||
plotLayout->addWidget(plot2d, 0, 0, ratio, ratio);
|
||||
plotLayout->addWidget(gainplot2d, 0, ratio, 1, 1, Qt::AlignRight | Qt::AlignTop);
|
||||
}
|
||||
}
|
||||
connect(actionSaveClone, SIGNAL(triggered()), this, SLOT(SavePlot()));
|
||||
this->show();
|
||||
if (gainplot1d != nullptr) {
|
||||
gainplot1d->setMinimumHeight(qDefs::MIN_HEIGHT_GAIN_PLOT_1D);
|
||||
gainplot1d->setFixedWidth(plot1d->width());
|
||||
// gainplot1d->setFixedHeight(plot1d->height() / qDefs::DATA_GAIN_PLOT_RATIO - 1);
|
||||
}
|
||||
if (gainplot2d != nullptr) {
|
||||
gainplot2d->setFixedWidth(plot2d->width() / qDefs::DATA_GAIN_PLOT_RATIO);
|
||||
gainplot2d->setFixedHeight(plot2d->height() / qDefs::DATA_GAIN_PLOT_RATIO);
|
||||
}
|
||||
}
|
||||
|
||||
void qCloneWidget::DisplayStats(bool enable, QString min, QString max, QString sum) {
|
||||
|
@ -561,14 +561,9 @@ void qDrawPlot::ClonePlot() {
|
||||
}
|
||||
}
|
||||
|
||||
qCloneWidget* q = new qCloneWidget(this, cloneplot1D, cloneplot2D, clonegainplot1D,
|
||||
new qCloneWidget(this, cloneplot1D, cloneplot2D, clonegainplot1D,
|
||||
clonegainplot2D, boxPlot->title(), fileSavePath, fileSaveName, currentAcqIndex,
|
||||
displayStatistics, lblMinDisp->text(), lblMaxDisp->text(), lblSumDisp->text());
|
||||
q->show();
|
||||
if (clonegainplot1D != nullptr) {
|
||||
clonegainplot1D->setFixedWidth(cloneplot1D->width());
|
||||
//clonegainplot1D->setFixedHeight(cloneplot1D->height());// / qDefs::DATA_GAIN_PLOT_RATIO - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void qDrawPlot::SavePlot() {
|
||||
|
Binary file not shown.
@ -8,5 +8,5 @@
|
||||
#define APIRECEIVER 0x200227
|
||||
#define APIGUI 0x200227
|
||||
#define APICTB 0x200227
|
||||
#define APIGOTTHARD2 0x200304
|
||||
#define APIMOENCH 0x200304
|
||||
#define APIGOTTHARD2 0x200304
|
||||
|
Reference in New Issue
Block a user