Finished implelementing Andreas Suter root plotting, but still a bit buggy.

This commit is contained in:
2009-11-23 14:52:12 +00:00
parent 17b4ebbc2f
commit b02bad6b88
4 changed files with 1969 additions and 1957 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 Nov 20 14:18:57 2009 # Created: Mon Nov 23 15:50:35 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!
@ -1431,9 +1431,9 @@ sub NEW
} }
setCentralWidget(Qt::Widget(this, "qt_central_widget")); setCentralWidget(Qt::Widget(this, "qt_central_widget"));
my $TrimSPGUILayout = Qt::GridLayout(centralWidget(), 1, 1, 11, 6, '$TrimSPGUILayout');
tabs = Qt::TabWidget(centralWidget(), "tabs"); tabs = Qt::TabWidget(centralWidget(), "tabs");
tabs->setGeometry( Qt::Rect(0, 5, 715, 525) );
LayersTab = Qt::Widget(tabs, "LayersTab"); LayersTab = Qt::Widget(tabs, "LayersTab");
@ -1891,10 +1891,13 @@ sub NEW
ScanListdz->setGeometry( Qt::Rect(11, 108, 290, 26) ); ScanListdz->setGeometry( Qt::Rect(11, 108, 290, 26) );
tabs->insertTab( ScansTab, "" ); tabs->insertTab( ScansTab, "" );
$TrimSPGUILayout->addWidget(tabs, 0, 0);
Progress = Qt::ProgressBar(centralWidget(), "Progress"); Progress = Qt::ProgressBar(centralWidget(), "Progress");
Progress->setGeometry( Qt::Rect(0, 530, 715, 20) );
Progress->setFrameShape( &Qt::ProgressBar::WinPanel() ); Progress->setFrameShape( &Qt::ProgressBar::WinPanel() );
$TrimSPGUILayout->addWidget(Progress, 1, 0);
fileNewAction= Qt::Action(this, "fileNewAction"); fileNewAction= Qt::Action(this, "fileNewAction");
fileNewAction->setIconSet( Qt::IconSet($image2) ); fileNewAction->setIconSet( Qt::IconSet($image2) );
fileOpenAction= Qt::Action(this, "fileOpenAction"); fileOpenAction= Qt::Action(this, "fileOpenAction");
@ -1952,7 +1955,7 @@ sub NEW
MenuBar->insertItem( "", helpMenu, 3 ); MenuBar->insertItem( "", helpMenu, 3 );
languageChange(); languageChange();
my $resize = Qt::Size(719, 610); my $resize = Qt::Size(736, 626);
$resize = $resize->expandedTo(minimumSizeHint()); $resize = $resize->expandedTo(minimumSizeHint());
resize( $resize ); resize( $resize );
clearWState( &Qt::WState_Polished ); clearWState( &Qt::WState_Polished );
@ -2763,8 +2766,18 @@ sub PlotProfiles
my $filenames=join(",",@files); my $filenames=join(",",@files);
print "Selected file: $filenames\n"; print "Selected file: $filenames\n";
if ($filenames ne "" ) {
# Now that we have the file list send it to root macro for plotting. # Now that we have the file list send it to root macro for plotting.
my $cmd='root "plotRge.C(\"'.$filenames.'\")"';
# my $pid = open(FTO,"$cmd");
my $pid = open(FTO,"$cmd 2>&1 |");
while (<FTO>) {
# FitTextOutput->append("$_");
print "$_";
}
close(FTO);
# system($cmd);
}
} }

View File

@ -8,25 +8,21 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>719</width> <width>736</width>
<height>610</height> <height>626</height>
</rect> </rect>
</property> </property>
<property name="caption"> <property name="caption">
<string>TrimSP GUI</string> <string>TrimSP GUI</string>
</property> </property>
<widget class="QTabWidget"> <grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QTabWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>tabs</cstring> <cstring>tabs</cstring>
</property> </property>
<property name="geometry">
<rect>
<x>0</x>
<y>5</y>
<width>715</width>
<height>525</height>
</rect>
</property>
<widget class="QWidget"> <widget class="QWidget">
<property name="name"> <property name="name">
<cstring>LayersTab</cstring> <cstring>LayersTab</cstring>
@ -2079,22 +2075,15 @@
</widget> </widget>
</widget> </widget>
</widget> </widget>
<widget class="QProgressBar"> <widget class="QProgressBar" row="1" column="0">
<property name="name"> <property name="name">
<cstring>Progress</cstring> <cstring>Progress</cstring>
</property> </property>
<property name="geometry">
<rect>
<x>0</x>
<y>530</y>
<width>715</width>
<height>20</height>
</rect>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>WinPanel</enum> <enum>WinPanel</enum>
</property> </property>
</widget> </widget>
</grid>
</widget> </widget>
<menubar> <menubar>
<property name="name"> <property name="name">

View File

@ -622,8 +622,18 @@ void TrimSPGUI::PlotProfiles()
my $filenames=join(",",@files); my $filenames=join(",",@files);
print "Selected file: $filenames\n"; print "Selected file: $filenames\n";
if ($filenames ne "" ) {
# Now that we have the file list send it to root macro for plotting. # Now that we have the file list send it to root macro for plotting.
my $cmd='root "plotRge.C(\"'.$filenames.'\")"';
# my $pid = open(FTO,"$cmd");
my $pid = open(FTO,"$cmd 2>&1 |");
while (<FTO>) {
# FitTextOutput->append("$_");
print "$_";
}
close(FTO);
# system($cmd);
}
} }

View File

@ -1,9 +1,8 @@
// File: plotRge.C // File: plotRge.C
// Author: Andreas Suter // Author: Zaher Salman, originally by Andreas Suter
// Date: 03/06/2009 // Date: 03/06/2009
// Purpose: ROOT macro to read and plot Range data from trimsp calculation // Purpose: ROOT macro to read and plot Range data from trimsp calculation
// Assume following file Format: // Assume following file Format:
// Very simple at the moment...
// //
// $Id$ // $Id$
// //
@ -146,3 +145,4 @@ void plotRge(TString &names)
delete tokens; delete tokens;
} }