Enable plot fractions.

This commit is contained in:
salman 2012-01-10 15:09:22 +00:00
parent 2a0cadfe5a
commit bf4d5e4ed7
3 changed files with 49 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'TrimSPGUI.ui' # Form implementation generated from reading ui file 'TrimSPGUI.ui'
# #
# Created: Fri Sep 23 14:27:01 2011 # Created: Tue Jan 10 15:16:59 2012
# 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!
@ -1721,7 +1721,9 @@ sub NEW
helpAboutAction= Qt::Action(this, "helpAboutAction"); helpAboutAction= Qt::Action(this, "helpAboutAction");
helpAboutAction->setIconSet( Qt::IconSet($image0) ); helpAboutAction->setIconSet( Qt::IconSet($image0) );
plotFractionsAction= Qt::Action(this, "plotFractionsAction"); plotFractionsAction= Qt::Action(this, "plotFractionsAction");
plotFractionsAction->setEnabled( 0 ); plotFractionsAction->setToggleAction( 0 );
plotFractionsAction->setOn( 0 );
plotFractionsAction->setEnabled( 1 );
plotFractionsAction->setIconSet( Qt::IconSet($image14) ); plotFractionsAction->setIconSet( Qt::IconSet($image14) );
fileStartAction= Qt::Action(this, "fileStartAction"); fileStartAction= Qt::Action(this, "fileStartAction");
fileStartAction->setIconSet( Qt::IconSet($image1) ); fileStartAction->setIconSet( Qt::IconSet($image1) );
@ -1786,6 +1788,7 @@ sub NEW
Qt::Object::connect(fileSaveAsAction, SIGNAL "activated()", this, SLOT "SaveFileAs()"); Qt::Object::connect(fileSaveAsAction, SIGNAL "activated()", this, SLOT "SaveFileAs()");
Qt::Object::connect(AngleRadio, SIGNAL "toggled(bool)", this, SLOT "ToggleScanSingle()"); Qt::Object::connect(AngleRadio, SIGNAL "toggled(bool)", this, SLOT "ToggleScanSingle()");
Qt::Object::connect(SigAngleRadio, SIGNAL "toggled(bool)", this, SLOT "ToggleScanSingle()"); Qt::Object::connect(SigAngleRadio, SIGNAL "toggled(bool)", this, SLOT "ToggleScanSingle()");
Qt::Object::connect(plotFractionsAction, SIGNAL "activated()", this, SLOT "PlotFraction()");
setTabOrder(tabs, NL); setTabOrder(tabs, NL);
setTabOrder(NL, L1Comp); setTabOrder(NL, L1Comp);
@ -2721,7 +2724,23 @@ sub PlotProfiles
sub PlotFraction sub PlotFraction
{ {
print "TrimSPGUI->PlotFraction(): Not implemented yet.\n";
my $file=Qt::FileDialog::getOpenFileName(
".",
"Implantation sequence file (*.dat)",
this,
"open sequence data file dialog",
"Choose a sequence data file");
if ($file ne "" ) {
my $TrimPath = $ENV{'PERLLIB'};
# Now that we have the file name send it to root macro for plotting.
my $cmd='root -n -l "'.$TrimPath.'/plotFrc.C(\"'.$file.'\")"&';
my $pid=system($cmd);
}
} }
sub OpenAboutWindow sub OpenAboutWindow

View File

@ -2425,9 +2425,15 @@
<property name="name"> <property name="name">
<cstring>plotFractionsAction</cstring> <cstring>plotFractionsAction</cstring>
</property> </property>
<property name="enabled"> <property name="toggleAction">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="on">
<bool>false</bool>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="iconSet"> <property name="iconSet">
<iconset>image14</iconset> <iconset>image14</iconset>
</property> </property>
@ -2667,6 +2673,12 @@
<receiver>TrimSPGUI</receiver> <receiver>TrimSPGUI</receiver>
<slot>ToggleScanSingle()</slot> <slot>ToggleScanSingle()</slot>
</connection> </connection>
<connection>
<sender>plotFractionsAction</sender>
<signal>activated()</signal>
<receiver>TrimSPGUI</receiver>
<slot>PlotFraction()</slot>
</connection>
</connections> </connections>
<tabstops> <tabstops>
<tabstop>tabs</tabstop> <tabstop>tabs</tabstop>

View File

@ -701,6 +701,20 @@ void TrimSPGUI::PlotProfiles()
void TrimSPGUI::PlotFraction() void TrimSPGUI::PlotFraction()
{ {
my $file=Qt::FileDialog::getOpenFileName(
".",
"Implantation sequence file (*.dat)",
this,
"open sequence data file dialog",
"Choose a sequence data file");
if ($file ne "" ) {
my $TrimPath = $ENV{'PERLLIB'};
# Now that we have the file name send it to root macro for plotting.
my $cmd='root -n -l "'.$TrimPath.'/plotFrc.C(\"'.$file.'\")"&';
my $pid=system($cmd);
}
} }