Add files to fit from different directories.

This commit is contained in:
salman 2009-09-17 21:22:38 +00:00
parent f409ca47b8
commit df8bfe29a0
6 changed files with 52 additions and 20 deletions

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui' # Form implementation generated from reading ui file 'MuSRFit.ui'
# #
# Created: Thu Sep 17 14:43:44 2009 # Created: Thu Sep 17 23:18:50 2009
# by: The PerlQt User Interface Compiler (puic) # by: The PerlQt User Interface Compiler (puic)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -584,7 +584,7 @@ sub NEW
setName("MuSRFitform" ); setName("MuSRFitform" );
} }
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) ); setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
setMinimumSize(Qt::Size(21, 251) ); setMinimumSize(Qt::Size(23, 246) );
setIcon($image0 ); setIcon($image0 );
setCentralWidget(Qt::Widget(this, "qt_central_widget")); setCentralWidget(Qt::Widget(this, "qt_central_widget"));
@ -998,7 +998,7 @@ sub NEW
PlotOptions->setAlignment( int(&Qt::ButtonGroup::AlignTop) ); PlotOptions->setAlignment( int(&Qt::ButtonGroup::AlignTop) );
PlotOptions->setExclusive( 1 ); PlotOptions->setExclusive( 1 );
PlotOptions->setRadioButtonExclusive( 1 ); PlotOptions->setRadioButtonExclusive( 1 );
PlotOptions->setProperty( "selectedId", Qt::Variant(int(2) ) ); PlotOptions->setProperty( "selectedId", Qt::Variant(int(-1) ) );
my $LayoutWidget_5 = Qt::Widget(PlotOptions, '$LayoutWidget_5'); my $LayoutWidget_5 = Qt::Widget(PlotOptions, '$LayoutWidget_5');
$LayoutWidget_5->setGeometry( Qt::Rect(3, 18, 190, 94) ); $LayoutWidget_5->setGeometry( Qt::Rect(3, 18, 190, 94) );
@ -1057,7 +1057,7 @@ sub NEW
ErrorCalc->setAlignment( int(&Qt::ButtonGroup::AlignTop | &Qt::ButtonGroup::AlignLeft) ); ErrorCalc->setAlignment( int(&Qt::ButtonGroup::AlignTop | &Qt::ButtonGroup::AlignLeft) );
ErrorCalc->setExclusive( 1 ); ErrorCalc->setExclusive( 1 );
ErrorCalc->setRadioButtonExclusive( 1 ); ErrorCalc->setRadioButtonExclusive( 1 );
ErrorCalc->setProperty( "selectedId", Qt::Variant(int(0) ) ); ErrorCalc->setProperty( "selectedId", Qt::Variant(int(1) ) );
MINOS = Qt::RadioButton(ErrorCalc, "MINOS"); MINOS = Qt::RadioButton(ErrorCalc, "MINOS");
MINOS->setGeometry( Qt::Rect(19, 59, 69, 22) ); MINOS->setGeometry( Qt::Rect(19, 59, 69, 22) );
@ -1845,7 +1845,7 @@ sub languageChange
PlotOptions->setTitle( trUtf8("Options") ); PlotOptions->setTitle( trUtf8("Options") );
textLabel1_4->setText( trUtf8("X Range") ); textLabel1_4->setText( trUtf8("X Range") );
textLabel1_4_2->setText( trUtf8("Y Range") ); textLabel1_4_2->setText( trUtf8("Y Range") );
ltc->setText( trUtf8("Life time cor.") ); ltc->setText( trUtf8("Life time correction") );
go->setText( trUtf8("Fit") ); go->setText( trUtf8("Fit") );
PlotMSR->setText( trUtf8("Plot") ); PlotMSR->setText( trUtf8("Plot") );
ErrorCalc->setTitle( trUtf8("Error") ); ErrorCalc->setTitle( trUtf8("Error") );
@ -2755,6 +2755,8 @@ sub RunSelectionToggle
sub fileBrowse sub fileBrowse
{ {
my $RunFiles=RunFiles->text();
print "Runs:$RunFiles\n";
my $files_ref=Qt::FileDialog::getOpenFileNames( my $files_ref=Qt::FileDialog::getOpenFileNames(
"Data files (*.root *.bin)", "Data files (*.root *.bin)",
"./", "./",
@ -2762,7 +2764,13 @@ sub fileBrowse
"open files dialog", "open files dialog",
"Select one or more files to fit"); "Select one or more files to fit");
my @files = @$files_ref; my @files = @$files_ref;
my $RunFiles=join(",",@files); if ($RunFiles eq "") {
# We started with an empty list
$RunFiles=join(",",@files);
} else {
# Add files to existing list
$RunFiles=join(",",$RunFiles,@files);
}
RunFiles->setText($RunFiles); RunFiles->setText($RunFiles);
} }

View File

@ -22,8 +22,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>21</width> <width>23</width>
<height>251</height> <height>246</height>
</size> </size>
</property> </property>
<property name="caption"> <property name="caption">
@ -2168,7 +2168,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="selectedId" stdset="0"> <property name="selectedId" stdset="0">
<number>2</number> <number>-1</number>
</property> </property>
<widget class="QLayoutWidget"> <widget class="QLayoutWidget">
<property name="name"> <property name="name">
@ -2247,7 +2247,7 @@
<cstring>ltc</cstring> <cstring>ltc</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Life time cor.</string> <string>Life time correction</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>
@ -2367,7 +2367,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="selectedId" stdset="0"> <property name="selectedId" stdset="0">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QRadioButton"> <widget class="QRadioButton">
<property name="name"> <property name="name">

View File

@ -741,6 +741,8 @@ void MuSRFitform::RunSelectionToggle()
void MuSRFitform::fileBrowse() void MuSRFitform::fileBrowse()
{ {
my $RunFiles=RunFiles->text();
print "Runs:$RunFiles\n";
my $files_ref=Qt::FileDialog::getOpenFileNames( my $files_ref=Qt::FileDialog::getOpenFileNames(
"Data files (*.root *.bin)", "Data files (*.root *.bin)",
"./", "./",
@ -748,7 +750,13 @@ void MuSRFitform::fileBrowse()
"open files dialog", "open files dialog",
"Select one or more files to fit"); "Select one or more files to fit");
my @files = @$files_ref; my @files = @$files_ref;
my $RunFiles=join(",",@files); if ($RunFiles eq "") {
# We started with an empty list
$RunFiles=join(",",@files);
} else {
# Add files to existing list
$RunFiles=join(",",$RunFiles,@files);
}
RunFiles->setText($RunFiles); RunFiles->setText($RunFiles);
} }

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui' # Form implementation generated from reading ui file 'MuSRFit.ui'
# #
# Created: Thu Sep 17 17:13:26 2009 # Created: Thu Sep 17 23:21:40 2009
# by: The PerlQt User Interface Compiler (puic) # by: The PerlQt User Interface Compiler (puic)
# #
# WARNING! All changes made in this file will be lost! # WARNING! All changes made in this file will be lost!
@ -593,7 +593,7 @@ sub NEW
setName("MuSRFitform" ); setName("MuSRFitform" );
} }
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) ); setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
setMinimumSize(Qt::Size(21, 251) ); setMinimumSize(Qt::Size(23, 246) );
setIcon($image0 ); setIcon($image0 );
setCentralWidget(Qt::Widget(this, "qt_central_widget")); setCentralWidget(Qt::Widget(this, "qt_central_widget"));
@ -1996,7 +1996,7 @@ sub languageChange
PlotOptions->setTitle( trUtf8("Options") ); PlotOptions->setTitle( trUtf8("Options") );
textLabel1_4->setText( trUtf8("X Range") ); textLabel1_4->setText( trUtf8("X Range") );
textLabel1_4_2->setText( trUtf8("Y Range") ); textLabel1_4_2->setText( trUtf8("Y Range") );
ltc->setText( trUtf8("Life time cor.") ); ltc->setText( trUtf8("Life time correction") );
go->setText( trUtf8("Fit") ); go->setText( trUtf8("Fit") );
PlotMSR->setText( trUtf8("Plot") ); PlotMSR->setText( trUtf8("Plot") );
ErrorCalc->setTitle( trUtf8("Error") ); ErrorCalc->setTitle( trUtf8("Error") );
@ -2916,6 +2916,8 @@ sub RunSelectionToggle
sub fileBrowse sub fileBrowse
{ {
my $RunFiles=RunFiles->text();
print "Runs:$RunFiles\n";
my $files_ref=Qt::FileDialog::getOpenFileNames( my $files_ref=Qt::FileDialog::getOpenFileNames(
"Data files (*.root *.bin)", "Data files (*.root *.bin)",
"./", "./",
@ -2923,7 +2925,13 @@ sub fileBrowse
"open files dialog", "open files dialog",
"Select one or more files to fit"); "Select one or more files to fit");
my @files = @$files_ref; my @files = @$files_ref;
my $RunFiles=join(",",@files); if ($RunFiles eq "") {
# We started with an empty list
$RunFiles=join(",",@files);
} else {
# Add files to existing list
$RunFiles=join(",",$RunFiles,@files);
}
RunFiles->setText($RunFiles); RunFiles->setText($RunFiles);
} }

View File

@ -22,8 +22,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>21</width> <width>23</width>
<height>251</height> <height>246</height>
</size> </size>
</property> </property>
<property name="caption"> <property name="caption">
@ -2247,7 +2247,7 @@
<cstring>ltc</cstring> <cstring>ltc</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Life time cor.</string> <string>Life time correction</string>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>true</bool>

View File

@ -746,6 +746,8 @@ void MuSRFitform::RunSelectionToggle()
void MuSRFitform::fileBrowse() void MuSRFitform::fileBrowse()
{ {
my $RunFiles=RunFiles->text();
print "Runs:$RunFiles\n";
my $files_ref=Qt::FileDialog::getOpenFileNames( my $files_ref=Qt::FileDialog::getOpenFileNames(
"Data files (*.root *.bin)", "Data files (*.root *.bin)",
"./", "./",
@ -753,7 +755,13 @@ void MuSRFitform::fileBrowse()
"open files dialog", "open files dialog",
"Select one or more files to fit"); "Select one or more files to fit");
my @files = @$files_ref; my @files = @$files_ref;
my $RunFiles=join(",",@files); if ($RunFiles eq "") {
# We started with an empty list
$RunFiles=join(",",@files);
} else {
# Add files to existing list
$RunFiles=join(",",$RunFiles,@files);
}
RunFiles->setText($RunFiles); RunFiles->setText($RunFiles);
} }