timeout for musrgui and small bug fixing concernig timer handling
This commit is contained in:
parent
0e7424507f
commit
e9f6fcab80
@ -116,6 +116,7 @@ ClassImpQ(PMusrCanvas)
|
||||
PMusrCanvas::PMusrCanvas()
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = 0;
|
||||
|
||||
fScaleN0AndBkg = true;
|
||||
fValid = false;
|
||||
@ -182,6 +183,7 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
fBatchMode(batch), fPlotNumber(number)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = 0;
|
||||
|
||||
fMultiGraphData = 0;
|
||||
fMultiGraphDiff = 0;
|
||||
@ -234,6 +236,7 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
|
||||
fMarkerList(markerList), fColorList(colorList)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = 0;
|
||||
|
||||
fMultiGraphData = 0;
|
||||
fMultiGraphDiff = 0;
|
||||
|
@ -248,6 +248,7 @@ ClassImpQ(PMusrT0)
|
||||
PMusrT0::PMusrT0()
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = 0;
|
||||
|
||||
fValid = false;
|
||||
|
||||
@ -289,6 +290,7 @@ PMusrT0::PMusrT0()
|
||||
PMusrT0::PMusrT0(PMusrT0Data &data) : fMusrT0Data(data)
|
||||
{
|
||||
fTimeout = 0;
|
||||
fTimeoutTimer = 0;
|
||||
|
||||
fValid = true;
|
||||
|
||||
|
4
src/external/MuSRFitGUI/MuSRFit
vendored
4
src/external/MuSRFitGUI/MuSRFit
vendored
@ -2,6 +2,6 @@
|
||||
# Copyright 2009 by Zaher Salman and the LEM Group.
|
||||
|
||||
export MUSRBIN=$ROOTSYS/bin/
|
||||
export PERLLIB=$HOME/LEM/musrfit/src/external/MuSRFitGUI
|
||||
perl $HOME/LEM/musrfit/src/external/MuSRFitGUI/MuSRFit.pl
|
||||
export PERLLIB=$HOME/analysis/musrift/src/external/MuSRFitGUI
|
||||
perl $PERLLIB/MuSRFit.pl
|
||||
|
||||
|
@ -112,11 +112,11 @@ class PAdmin
|
||||
PTheory* getTheoryItem(const unsigned int idx);
|
||||
PMsr2DataParam getMsr2DataParam() { return fMsr2DataParam; }
|
||||
|
||||
void setTimeout(const int ival) { fTimeout = ival; }
|
||||
void setFontName(const QString str) { fFontName = str; }
|
||||
void setFontSize(const int ival) { fFontSize = ival; }
|
||||
|
||||
protected:
|
||||
void setTimeout(const int ival) { fTimeout = ival; }
|
||||
void setExecPath(const QString str) { fExecPath = str; }
|
||||
void setDefaultSavePath(const QString str) { fDefaultSavePath = str; }
|
||||
void setTitleFromDataFileFlag(const bool flag) { fTitleFromDataFile = flag; }
|
||||
|
@ -30,13 +30,14 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "PPrefsDialog.h"
|
||||
#include "qvalidator.h"
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>
|
||||
*/
|
||||
PPrefsDialog::PPrefsDialog(const bool keep_mn2_output, const int dump_tag, const bool title_from_data_file,
|
||||
const bool enable_musrt0)
|
||||
const bool enable_musrt0, const int timeout)
|
||||
{
|
||||
if (keep_mn2_output)
|
||||
fKeepMn2Output_checkBox->setChecked(true);
|
||||
@ -56,6 +57,11 @@ PPrefsDialog::PPrefsDialog(const bool keep_mn2_output, const int dump_tag, const
|
||||
|
||||
fTitleFromData_checkBox->setChecked(title_from_data_file);
|
||||
fEnableMusrT0_checkBox->setChecked(enable_musrt0);
|
||||
|
||||
fTimeout_lineEdit->setValidator( new QIntValidator(fTimeout_lineEdit) );
|
||||
QString numStr;
|
||||
numStr.setNum(timeout);
|
||||
fTimeout_lineEdit->setText(numStr);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -33,6 +33,7 @@
|
||||
#define _PPREFSDIALOG_H_
|
||||
|
||||
#include <qcheckbox.h>
|
||||
#include <qlineedit.h>
|
||||
|
||||
#include "forms/PPrefsDialogBase.h"
|
||||
|
||||
@ -40,12 +41,13 @@ class PPrefsDialog : public PPrefsDialogBase
|
||||
{
|
||||
public:
|
||||
PPrefsDialog(const bool keep_mn2_output, const int dump_tag, const bool title_from_data_file,
|
||||
const bool enable_musrt0);
|
||||
const bool enable_musrt0, const int timeout);
|
||||
|
||||
bool getKeepMinuit2OutputFlag() { return fKeepMn2Output_checkBox->isChecked(); }
|
||||
bool getTitleFromDataFileFlag() { return fTitleFromData_checkBox->isChecked(); }
|
||||
bool getEnableMusrT0Flag() { return fEnableMusrT0_checkBox->isChecked(); }
|
||||
int getDump();
|
||||
int getTimeout() { return fTimeout_lineEdit->text().toInt(); }
|
||||
|
||||
public slots:
|
||||
void dumpAscii();
|
||||
|
@ -1783,7 +1783,7 @@ void PTextEdit::musrView()
|
||||
str = *fFilenames.find( currentEditor() );
|
||||
QString numStr;
|
||||
numStr.setNum(fAdmin->getTimeout());
|
||||
cmd += str + "\" --timeout " + numStr + "&";
|
||||
cmd += str + "\" --timeout " + numStr + " &";
|
||||
|
||||
system(cmd.latin1());
|
||||
}
|
||||
@ -1832,7 +1832,7 @@ void PTextEdit::musrT0()
|
||||
*/
|
||||
void PTextEdit::musrPrefs()
|
||||
{
|
||||
PPrefsDialog *dlg = new PPrefsDialog(fKeepMinuit2Output, fDump, fTitleFromDataFile, fEnableMusrT0);
|
||||
PPrefsDialog *dlg = new PPrefsDialog(fKeepMinuit2Output, fDump, fTitleFromDataFile, fEnableMusrT0, fAdmin->getTimeout());
|
||||
|
||||
if (dlg->exec() == QDialog::Accepted) {
|
||||
fKeepMinuit2Output = dlg->getKeepMinuit2OutputFlag();
|
||||
@ -1840,6 +1840,7 @@ void PTextEdit::musrPrefs()
|
||||
fEnableMusrT0 = dlg->getEnableMusrT0Flag();
|
||||
fMusrT0Action->setEnabled(fEnableMusrT0);
|
||||
fDump = dlg->getDump();
|
||||
fAdmin->setTimeout(dlg->getTimeout());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,6 +122,43 @@
|
||||
<height>110</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>TabPage</cstring>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>general</string>
|
||||
</attribute>
|
||||
<widget class="QLineEdit">
|
||||
<property name="name">
|
||||
<cstring>fTimeout_lineEdit</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>3</x>
|
||||
<y>6</y>
|
||||
<width>100</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel">
|
||||
<property name="name">
|
||||
<cstring>fTimeout_textLabel</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>112</x>
|
||||
<y>6</y>
|
||||
<width>42</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>timeout</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QWidget">
|
||||
<property name="name">
|
||||
<cstring>tab</cstring>
|
||||
|
Loading…
x
Reference in New Issue
Block a user