QXRD  0.11.16
qxrdinfodialog.cpp
Go to the documentation of this file.
1 #include "qxrdinfodialog.h"
2 #include "ui_qxrdinfodialog.h"
3 #include "qcepproperty.h"
4 #include "qcepsettingssaver.h"
5 #include "qcepimagedata.h"
6 #include "qxrddebug.h"
7 
9  QDockWidget(parent),
10  m_InfoDialogSettings(settings)
11 {
13  printf("QxrdInfoDialog::QxrdInfoDialog(%p)\n", this);
14  }
15 
16  setupUi(this);
17 }
18 
20 {
22  printf("QxrdInfoDialog::~QxrdInfoDialog(%p)\n", this);
23  }
24 }
25 
27 {
28  m_InfoText->clear();
29 
30  if (image) {
31  image->calculateRange();
32 
33  m_InfoText->append(tr("Information about %1").arg(image->get_Title()));
34  m_InfoText->append(tr("Saved in %1").arg(image->get_FileName()));
35  m_InfoText->append(tr("User Comment 1 %1").arg(image->get_UserComment1()));
36  m_InfoText->append(tr("User Comment 2 %1").arg(image->get_UserComment2()));
37  m_InfoText->append(tr("User Comment 3 %1").arg(image->get_UserComment3()));
38  m_InfoText->append(tr("User Comment 4 %1").arg(image->get_UserComment4()));
39  m_InfoText->append(tr("Acquired at %1").arg(image->get_DateString()));
40  m_InfoText->append(tr("Acquired with %1 Version %2").arg(image->get_Creator()).arg(image->get_Version()));
41  m_InfoText->append(tr("Acquired with Qt Version %1").arg(image->get_QtVersion()));
42  m_InfoText->append(tr("Data type %1 (%2)").arg(image->get_DataType()).arg(image->get_DataTypeName()));
43  m_InfoText->append(tr("Dimensions %1 x %2").arg(image->get_Width()).arg(image->get_Height()));
44 
45  m_InfoText->append(tr("H: %1 (%2) x V: %3 (%4")
46  .arg(image->get_HLabel()).arg(image->get_HUnits())
47  .arg(image->get_VLabel()).arg(image->get_VUnits()));
48 
49  m_InfoText->append(tr("H Scaling: Start:%1, Step:%2, V Scaling: Start:%3, Step:%4")
50  .arg(image->get_HStart()).arg(image->get_HStep())
51  .arg(image->get_VStart()).arg(image->get_VStep()));
52 
53  m_InfoText->append(tr("Minimum Value %1, Maximum Value %2").arg(image->minValue()).arg(image->maxValue()));
54 
55  m_InfoText->append(tr("Detector gain setting %1").arg(image->get_CameraGain()));
56  m_InfoText->append(tr("Exposure Time %1 sec").arg(image->get_ExposureTime()));
57  m_InfoText->append(tr("Summed Exposures %1").arg(image->get_SummedExposures()));
58  m_InfoText->append(tr("Image Sequence Number %1").arg(image->get_ImageSequenceNumber()));
59  m_InfoText->append(tr("Image Number %1").arg(image->get_ImageNumber()));
60  m_InfoText->append(tr("Image Triggered? %1").arg(image->get_Triggered()));
61  m_InfoText->append(tr("Phase %1 of [0..%2]").arg(image->get_PhaseNumber()).arg(image->get_NPhases()-1));
62 
63  m_InfoText->append(tr("Normalization Data Size = %1").arg(image->get_Normalization().count()));
64 
65  for (int i=0; i<image->get_Normalization().count(); i++) {
66  m_InfoText->append(tr("Normalization Data [%1] = %2").arg(i).arg(image->get_Normalization().value(i)));
67  }
68 
69  m_InfoText->append(tr("Extra Inputs Data Size = %1").arg(image->get_ExtraInputs().count()));
70 
71  for (int i=0; i<image->get_ExtraInputs().count(); i++) {
72  m_InfoText->append(tr("Extra Inputs Data [%1] = %2").arg(i).arg(image->get_ExtraInputs().value(i)));
73  }
74 
75  QList<QByteArray> dynProps = image->dynamicPropertyNames();
76 
77  if (dynProps.count()) {
78  m_InfoText->append("User Defined Properties:");
79 
80  foreach(QByteArray prop, dynProps) {
81  m_InfoText->append(tr("%1 = %2").arg(QString(prop)).arg(image->property(prop).toString()));
82  }
83  }
84  }
85 }
QWeakPointer< QxrdInfoDialogSettings > QxrdInfoDialogSettingsWPtr
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
virtual ~QxrdInfoDialog()
QxrdInfoDialog(QxrdInfoDialogSettingsWPtr settings, QWidget *parent)
void onProcessedImageAvailable(QcepDoubleImageDataPtr image, QcepMaskDataPtr overflow)
QSharedPointer< QcepMaskData > QcepMaskDataPtr
QSharedPointer< QcepDoubleImageData > QcepDoubleImageDataPtr