mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 16:20:03 +02:00
incl. prev commit: Included file overwrite, format and changed the functonality of filewrite enable and file path
This commit is contained in:
parent
2ef44ec70b
commit
8ebbfbb84b
@ -492,13 +492,13 @@ Directory where one saves the data.
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="boxCorrection_3">
|
||||
<widget class="QGroupBox" name="boxFileWriteEnabled">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>8</y>
|
||||
<width>737</width>
|
||||
<height>155</height>
|
||||
<y>40</y>
|
||||
<width>735</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
@ -507,33 +507,44 @@ Directory where one saves the data.
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>13</x>
|
||||
<y>19</y>
|
||||
<width>713</width>
|
||||
<height>125</height>
|
||||
<x>12</x>
|
||||
<y>20</y>
|
||||
<width>714</width>
|
||||
<height>68</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="3" column="2">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<item row="0" column="16">
|
||||
<widget class="QPushButton" name="btnOutputBrowse">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
Disabled if a receiver is utilized in acquisition.
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>45</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</spacer>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboFileFormat">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
@ -567,69 +578,21 @@ Directory where one saves the data.
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDetector">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Readout:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboDetector">
|
||||
@ -647,146 +610,7 @@ Directory where one saves the data.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="6">
|
||||
<widget class="QLineEdit" name="dispReadOutputDir">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Normal</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lblFileFormat">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Format:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="5">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>470</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QPushButton" name="btnOutputBrowse">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../include/icons.qrc">
|
||||
<normaloff>:/icons/images/browse.png</normaloff>:/icons/images/browse.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="5">
|
||||
<widget class="QLineEdit" name="dispOutputDir">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblOutputDir">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
@ -850,26 +674,105 @@ Directory where one saves the data.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="4" colspan="3">
|
||||
<widget class="QLineEdit" name="dispFileName">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblFileFormat">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Name of file. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
||||
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Normal</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<property name="text">
|
||||
<string>Format:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<item row="1" column="16">
|
||||
<widget class="QCheckBox" name="chkOverwriteEnable">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Overwrite Enable
|
||||
#overwrite#</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overwrite</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="15">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lblFileName">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
@ -877,6 +780,12 @@ Directory where one saves the data.
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
@ -922,6 +831,52 @@ Directory where one saves the data.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" colspan="11">
|
||||
<widget class="QLineEdit" name="dispFileName">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Name of file. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Normal</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3" colspan="12">
|
||||
<widget class="QLineEdit" name="dispOutputDir">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><nobr>
|
||||
Directory where one saves the data.
|
||||
</nobr><br>
|
||||
#outdir#
|
||||
<br>
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -549,24 +549,23 @@ void qTabDataOutput::GetOutputDir(){
|
||||
dispOutputDir->setText(QString(myDet->getFilePath().c_str()));
|
||||
//multi file path blank means sls file paths are different
|
||||
if (dispOutputDir->text().isEmpty()) {
|
||||
qDefs::Message(qDefs::INFO,"The file path for individual units are different.\n"
|
||||
qDefs::Message(qDefs::INFORMATION,"The file path for individual units are different.\n"
|
||||
"Hence, leaving the common field blank.","qTabDataOutput::GetOutputDir");
|
||||
#ifdef VERBOSE
|
||||
cout << "The file path for individual units are different.\n"
|
||||
"Hence, leaving the common field blank." << endl;
|
||||
#endif
|
||||
QString errTip = QString("<br><nobr><font color=\"red\">"
|
||||
"<b>Output Directory</b>"
|
||||
"Information only: The file path for individual units are different.<br>"
|
||||
"<b>Output Directory</b> Information only: The file path for individual units are different.<br>"
|
||||
"Hence, leaving the common field blank.</font></nobr>");
|
||||
lblOutputDir->setText("Path*:");
|
||||
//dispOutputDir->setPalette(*red1);
|
||||
lblOutputDir->setPalette(red);
|
||||
lblOutputDir->setToolTip(errTip);
|
||||
btnOutputBrowse->setToolTip(errTip);
|
||||
dispOutputDir->setToolTip(errTip);
|
||||
} else {
|
||||
lblOutputDir->setText("Path:");
|
||||
//dispOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setToolTip(outDirTip);
|
||||
btnOutputBrowse->setToolTip(outDirTip);
|
||||
dispOutputDir->setToolTip(outDirTip);
|
||||
@ -633,7 +632,7 @@ int qTabDataOutput::VerifyOutputDirectory(){
|
||||
QString(mess.c_str()) +
|
||||
QString( ".</font></nobr>");
|
||||
lblOutputDir->setText("Path*:");
|
||||
dispOutputDir->setPalette(*red1);
|
||||
lblOutputDir->setPalette(red);
|
||||
lblOutputDir->setToolTip(errTip);
|
||||
btnOutputBrowse->setToolTip(errTip);
|
||||
dispOutputDir->setToolTip(errTip);
|
||||
@ -647,7 +646,7 @@ int qTabDataOutput::VerifyOutputDirectory(){
|
||||
cout << "The output pathid valid" << endl;
|
||||
#endif
|
||||
lblOutputDir->setText("Path:");
|
||||
dispOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setToolTip(outDirTip);
|
||||
btnOutputBrowse->setToolTip(outDirTip);
|
||||
dispOutputDir->setToolTip(outDirTip);
|
||||
@ -712,7 +711,7 @@ void qTabDataOutput::SetOutputDir(){
|
||||
"Invalid <b>File Path</b></font></nobr>");
|
||||
|
||||
lblOutputDir->setText("Path*:");
|
||||
dispOutputDir->setPalette(*red1);
|
||||
lblOutputDir->setPalette(red);
|
||||
lblOutputDir->setToolTip(errTip);
|
||||
btnOutputBrowse->setToolTip(errTip);
|
||||
dispOutputDir->setToolTip(errTip);
|
||||
@ -722,7 +721,7 @@ void qTabDataOutput::SetOutputDir(){
|
||||
cout << "The output path has been modified" << endl;
|
||||
#endif
|
||||
lblOutputDir->setText("Path:");
|
||||
dispOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setPalette(*black1);
|
||||
lblOutputDir->setToolTip(outDirTip);
|
||||
btnOutputBrowse->setToolTip(outDirTip);
|
||||
dispOutputDir->setToolTip(outDirTip);
|
||||
@ -997,7 +996,7 @@ void qTabDataOutput::UpdateFileOverwriteFromServer(){
|
||||
#endif
|
||||
disconnect(chkOverwriteEnable, SIGNAL(toggled(bool)), this, SLOT(SetOverwriteEnable(bool)));
|
||||
|
||||
chkFile->setChecked(myDet->overwriteFile());
|
||||
chkOverwriteEnable->setChecked(myDet->overwriteFile());
|
||||
|
||||
connect(chkOverwriteEnable, SIGNAL(toggled(bool)), this, SLOT(SetOverwriteEnable(bool)));
|
||||
}
|
||||
@ -1030,11 +1029,16 @@ void qTabDataOutput::Refresh(){
|
||||
cout << endl << "**Updating DataOutput Tab" << endl;
|
||||
#endif
|
||||
|
||||
if (!myDet->enableWriteToFile())
|
||||
boxFileWriteEnabled->setEnabled(false);
|
||||
else
|
||||
boxFileWriteEnabled->setEnabled(true);
|
||||
|
||||
// output dir
|
||||
#ifdef VERBOSE
|
||||
cout << "Getting output directory" << endl;
|
||||
#endif
|
||||
|
||||
disconnect(comboDetector, SIGNAL(currentIndexChanged(int)), this, SLOT(GetOutputDir()));
|
||||
PopulateDetectors();
|
||||
connect(comboDetector, SIGNAL(currentIndexChanged(int)), this, SLOT(GetOutputDir()));
|
||||
@ -1048,11 +1052,6 @@ void qTabDataOutput::Refresh(){
|
||||
//file name
|
||||
dispFileName->setText(QString(myDet->getFileName().c_str()));
|
||||
|
||||
//file write enable
|
||||
if(myDet->enableWriteToFile() == 1)
|
||||
dispFileName->setText("Enabled");
|
||||
else dispFileName->setText("Disabled");
|
||||
|
||||
//flat field correction from server
|
||||
#ifdef VERBOSE
|
||||
cout << "Getting flat field" << endl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user