Added Quit button and use ENV to get trimsp7l binary.

This commit is contained in:
salman 2009-08-11 10:21:37 +00:00
parent b1e1147eb1
commit 4e29e436a7
4 changed files with 830 additions and 685 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
export TRIMBIN=/usr/local/bin/trimsp7l
export PERLLIB=$HOME/Projects/TrimSPGUI export PERLLIB=$HOME/Projects/TrimSPGUI
perl $HOME/Projects/TrimSPGUI/TrimSPGUI.pl perl $HOME/Projects/TrimSPGUI/TrimSPGUI.pl

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'TrimSPGUItabs.ui' # Form implementation generated from reading ui file 'TrimSPGUItabs.ui'
# #
# Created: Tue Aug 11 08:57:49 2009 # Created: Tue Aug 11 12:14:49 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!
@ -21,30 +21,11 @@ use Qt::slots
CollectValues => [], CollectValues => [],
CreateInpFile => [], CreateInpFile => [],
StartSequenceOne => [], StartSequenceOne => [],
DirectoryBrowse => []; DirectoryBrowse => [],
ConfirmQuit => [];
use Qt::attributes qw( use Qt::attributes qw(
Progress
tabs tabs
LayersTab LayersTab
ProjParam
textLabel1
ProjType
NLabel
z0Label
dzLabel
ELabel
SigELabel
AlbleLabel
SigAngleLabel
SeedLabel
NProj
z0
dz
E
SigE
Angle
SigAngle
Seed
groupBox1 groupBox1
textLabel1_4 textLabel1_4
NL NL
@ -79,14 +60,34 @@ use Qt::attributes qw(
L7d L7d
L7Comp L7Comp
L7rho L7rho
Help ProjParam
Start textLabel1
ProjType
NLabel
z0Label
dzLabel
ELabel
SigELabel
AlbleLabel
SigAngleLabel
SeedLabel
NProj
z0
dz
E
SigE
Angle
SigAngle
Seed
groupBox15 groupBox15
textLabelFN textLabelFN
FNPre FNPre
textLabelPath textLabelPath
Path Path
Browse Browse
Help
Start
Quit
AddParTab AddParTab
AddParam AddParam
textLabelEF textLabelEF
@ -135,6 +136,7 @@ use Qt::attributes qw(
NProjRadio NProjRadio
dRadio dRadio
ScandL ScandL
Progress
TrimSPGUIHelp TrimSPGUIHelp
); );
@ -795,108 +797,26 @@ sub NEW
setModal(1 ); setModal(1 );
Progress = Qt::ProgressBar(this, "Progress");
Progress->setGeometry( Qt::Rect(0, 525, 715, 20) );
Progress->setFrameShape( &Qt::ProgressBar::WinPanel() );
tabs = Qt::TabWidget(this, "tabs"); tabs = Qt::TabWidget(this, "tabs");
tabs->setGeometry( Qt::Rect(0, 0, 715, 525) ); tabs->setGeometry( Qt::Rect(0, 0, 715, 525) );
LayersTab = Qt::Widget(tabs, "LayersTab"); LayersTab = Qt::Widget(tabs, "LayersTab");
ProjParam = Qt::GroupBox(LayersTab, "ProjParam");
ProjParam->setGeometry( Qt::Rect(460, 0, 250, 290) );
my $LayoutWidget = Qt::Widget(ProjParam, '$LayoutWidget');
$LayoutWidget->setGeometry( Qt::Rect(5, 25, 240, 260) );
my $layout8 = Qt::VBoxLayout($LayoutWidget, 0, 0, '$layout8');
my $layout7 = Qt::HBoxLayout(undef, 0, 6, '$layout7');
textLabel1 = Qt::Label($LayoutWidget, "textLabel1");
$layout7->addWidget(textLabel1);
ProjType = Qt::ComboBox(0, $LayoutWidget, "ProjType");
ProjType->setSizePolicy( Qt::SizePolicy(0, 0, 0, 0, ProjType->sizePolicy()->hasHeightForWidth()) );
$layout7->addWidget(ProjType);
$layout8->addLayout($layout7);
my $layout6 = Qt::HBoxLayout(undef, 0, 6, '$layout6');
my $layout5 = Qt::VBoxLayout(undef, 0, 0, '$layout5');
NLabel = Qt::Label($LayoutWidget, "NLabel");
NLabel->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, NLabel->sizePolicy()->hasHeightForWidth()) );
$layout5->addWidget(NLabel);
z0Label = Qt::Label($LayoutWidget, "z0Label");
$layout5->addWidget(z0Label);
dzLabel = Qt::Label($LayoutWidget, "dzLabel");
$layout5->addWidget(dzLabel);
ELabel = Qt::Label($LayoutWidget, "ELabel");
$layout5->addWidget(ELabel);
SigELabel = Qt::Label($LayoutWidget, "SigELabel");
$layout5->addWidget(SigELabel);
AlbleLabel = Qt::Label($LayoutWidget, "AlbleLabel");
$layout5->addWidget(AlbleLabel);
SigAngleLabel = Qt::Label($LayoutWidget, "SigAngleLabel");
$layout5->addWidget(SigAngleLabel);
SeedLabel = Qt::Label($LayoutWidget, "SeedLabel");
$layout5->addWidget(SeedLabel);
$layout6->addLayout($layout5);
my $layout4 = Qt::VBoxLayout(undef, 0, 0, '$layout4');
NProj = Qt::LineEdit($LayoutWidget, "NProj");
NProj->setSizePolicy( Qt::SizePolicy(7, 0, 0, 0, NProj->sizePolicy()->hasHeightForWidth()) );
NProj->setMaximumSize( Qt::Size(32767, 32767) );
$layout4->addWidget(NProj);
z0 = Qt::LineEdit($LayoutWidget, "z0");
z0->setMaximumSize( Qt::Size(32767, 32767) );
$layout4->addWidget(z0);
dz = Qt::LineEdit($LayoutWidget, "dz");
$layout4->addWidget(dz);
E = Qt::LineEdit($LayoutWidget, "E");
$layout4->addWidget(E);
SigE = Qt::LineEdit($LayoutWidget, "SigE");
$layout4->addWidget(SigE);
Angle = Qt::LineEdit($LayoutWidget, "Angle");
$layout4->addWidget(Angle);
SigAngle = Qt::LineEdit($LayoutWidget, "SigAngle");
$layout4->addWidget(SigAngle);
Seed = Qt::LineEdit($LayoutWidget, "Seed");
$layout4->addWidget(Seed);
$layout6->addLayout($layout4);
$layout8->addLayout($layout6);
groupBox1 = Qt::GroupBox(LayersTab, "groupBox1"); groupBox1 = Qt::GroupBox(LayersTab, "groupBox1");
groupBox1->setGeometry( Qt::Rect(0, 0, 460, 500) ); groupBox1->setGeometry( Qt::Rect(0, 0, 460, 500) );
groupBox1->setFrameShape( &Qt::GroupBox::GroupBoxPanel() ); groupBox1->setFrameShape( &Qt::GroupBox::GroupBoxPanel() );
groupBox1->setFrameShadow( &Qt::GroupBox::Sunken() ); groupBox1->setFrameShadow( &Qt::GroupBox::Sunken() );
my $LayoutWidget_2 = Qt::Widget(groupBox1, '$LayoutWidget_2'); my $LayoutWidget = Qt::Widget(groupBox1, '$LayoutWidget');
$LayoutWidget_2->setGeometry( Qt::Rect(5, 20, 450, 465) ); $LayoutWidget->setGeometry( Qt::Rect(5, 20, 450, 465) );
my $layout27 = Qt::VBoxLayout($LayoutWidget_2, 11, 6, '$layout27'); my $layout27 = Qt::VBoxLayout($LayoutWidget, 11, 6, '$layout27');
my $layout19 = Qt::HBoxLayout(undef, 0, 6, '$layout19'); my $layout19 = Qt::HBoxLayout(undef, 0, 6, '$layout19');
textLabel1_4 = Qt::Label($LayoutWidget_2, "textLabel1_4"); textLabel1_4 = Qt::Label($LayoutWidget, "textLabel1_4");
$layout19->addWidget(textLabel1_4); $layout19->addWidget(textLabel1_4);
NL = Qt::SpinBox($LayoutWidget_2, "NL"); NL = Qt::SpinBox($LayoutWidget, "NL");
NL->setMaxValue( int(7) ); NL->setMaxValue( int(7) );
NL->setMinValue( int(1) ); NL->setMinValue( int(1) );
$layout19->addWidget(NL); $layout19->addWidget(NL);
@ -906,21 +826,21 @@ sub NEW
my $layout26 = Qt::HBoxLayout(undef, 0, 6, '$layout26'); my $layout26 = Qt::HBoxLayout(undef, 0, 6, '$layout26');
textLabel2_4 = Qt::Label($LayoutWidget_2, "textLabel2_4"); textLabel2_4 = Qt::Label($LayoutWidget, "textLabel2_4");
textLabel2_4->setSizePolicy( Qt::SizePolicy(0, 1, 0, 0, textLabel2_4->sizePolicy()->hasHeightForWidth()) ); textLabel2_4->setSizePolicy( Qt::SizePolicy(0, 1, 0, 0, textLabel2_4->sizePolicy()->hasHeightForWidth()) );
$layout26->addWidget(textLabel2_4); $layout26->addWidget(textLabel2_4);
my $spacer_2 = Qt::SpacerItem(101, 20, &Qt::SizePolicy::Fixed, &Qt::SizePolicy::Minimum); my $spacer_2 = Qt::SpacerItem(101, 20, &Qt::SizePolicy::Fixed, &Qt::SizePolicy::Minimum);
$layout26->addItem($spacer_2); $layout26->addItem($spacer_2);
textLabel3 = Qt::Label($LayoutWidget_2, "textLabel3"); textLabel3 = Qt::Label($LayoutWidget, "textLabel3");
textLabel3->setSizePolicy( Qt::SizePolicy(1, 5, 0, 0, textLabel3->sizePolicy()->hasHeightForWidth()) ); textLabel3->setSizePolicy( Qt::SizePolicy(1, 5, 0, 0, textLabel3->sizePolicy()->hasHeightForWidth()) );
$layout26->addWidget(textLabel3); $layout26->addWidget(textLabel3);
textLabel4 = Qt::Label($LayoutWidget_2, "textLabel4"); textLabel4 = Qt::Label($LayoutWidget, "textLabel4");
$layout26->addWidget(textLabel4); $layout26->addWidget(textLabel4);
$layout27->addLayout($layout26); $layout27->addLayout($layout26);
BoxL1 = Qt::GroupBox($LayoutWidget_2, "BoxL1"); BoxL1 = Qt::GroupBox($LayoutWidget, "BoxL1");
L1Comp = Qt::LineEdit(BoxL1, "L1Comp"); L1Comp = Qt::LineEdit(BoxL1, "L1Comp");
L1Comp->setGeometry( Qt::Rect(10, 20, 180, 25) ); L1Comp->setGeometry( Qt::Rect(10, 20, 180, 25) );
@ -933,7 +853,7 @@ sub NEW
L1d->setSizePolicy( Qt::SizePolicy(0, 0, 0, 0, L1d->sizePolicy()->hasHeightForWidth()) ); L1d->setSizePolicy( Qt::SizePolicy(0, 0, 0, 0, L1d->sizePolicy()->hasHeightForWidth()) );
$layout27->addWidget(BoxL1); $layout27->addWidget(BoxL1);
BoxL2 = Qt::GroupBox($LayoutWidget_2, "BoxL2"); BoxL2 = Qt::GroupBox($LayoutWidget, "BoxL2");
BoxL2->setEnabled( 0 ); BoxL2->setEnabled( 0 );
L2d = Qt::LineEdit(BoxL2, "L2d"); L2d = Qt::LineEdit(BoxL2, "L2d");
@ -947,7 +867,7 @@ sub NEW
L2rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L2rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL2); $layout27->addWidget(BoxL2);
BoxL3 = Qt::GroupBox($LayoutWidget_2, "BoxL3"); BoxL3 = Qt::GroupBox($LayoutWidget, "BoxL3");
BoxL3->setEnabled( 0 ); BoxL3->setEnabled( 0 );
L3d = Qt::LineEdit(BoxL3, "L3d"); L3d = Qt::LineEdit(BoxL3, "L3d");
@ -961,7 +881,7 @@ sub NEW
L3rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L3rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL3); $layout27->addWidget(BoxL3);
BoxL4 = Qt::GroupBox($LayoutWidget_2, "BoxL4"); BoxL4 = Qt::GroupBox($LayoutWidget, "BoxL4");
BoxL4->setEnabled( 0 ); BoxL4->setEnabled( 0 );
L4d = Qt::LineEdit(BoxL4, "L4d"); L4d = Qt::LineEdit(BoxL4, "L4d");
@ -975,7 +895,7 @@ sub NEW
L4rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L4rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL4); $layout27->addWidget(BoxL4);
BoxL5 = Qt::GroupBox($LayoutWidget_2, "BoxL5"); BoxL5 = Qt::GroupBox($LayoutWidget, "BoxL5");
BoxL5->setEnabled( 0 ); BoxL5->setEnabled( 0 );
L5d = Qt::LineEdit(BoxL5, "L5d"); L5d = Qt::LineEdit(BoxL5, "L5d");
@ -989,7 +909,7 @@ sub NEW
L5rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L5rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL5); $layout27->addWidget(BoxL5);
BoxL6 = Qt::GroupBox($LayoutWidget_2, "BoxL6"); BoxL6 = Qt::GroupBox($LayoutWidget, "BoxL6");
BoxL6->setEnabled( 0 ); BoxL6->setEnabled( 0 );
L6d = Qt::LineEdit(BoxL6, "L6d"); L6d = Qt::LineEdit(BoxL6, "L6d");
@ -1003,7 +923,7 @@ sub NEW
L6rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L6rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL6); $layout27->addWidget(BoxL6);
BoxL7 = Qt::GroupBox($LayoutWidget_2, "BoxL7"); BoxL7 = Qt::GroupBox($LayoutWidget, "BoxL7");
BoxL7->setEnabled( 0 ); BoxL7->setEnabled( 0 );
L7d = Qt::LineEdit(BoxL7, "L7d"); L7d = Qt::LineEdit(BoxL7, "L7d");
@ -1017,39 +937,128 @@ sub NEW
L7rho->setGeometry( Qt::Rect(200, 20, 111, 25) ); L7rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL7); $layout27->addWidget(BoxL7);
Help = Qt::PushButton(LayersTab, "Help"); my $LayoutWidget_2 = Qt::Widget(LayersTab, '$LayoutWidget_2');
Help->setGeometry( Qt::Rect(505, 450, 80, 30) ); $LayoutWidget_2->setGeometry( Qt::Rect(460, 0, 254, 490) );
Help->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Help->sizePolicy()->hasHeightForWidth()) ); my $layout13 = Qt::VBoxLayout($LayoutWidget_2, 0, 0, '$layout13');
Start = Qt::PushButton(LayersTab, "Start"); ProjParam = Qt::GroupBox($LayoutWidget_2, "ProjParam");
Start->setGeometry( Qt::Rect(595, 450, 80, 30) );
Start->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Start->sizePolicy()->hasHeightForWidth()) );
groupBox15 = Qt::GroupBox(LayersTab, "groupBox15"); my $LayoutWidget_3 = Qt::Widget(ProjParam, '$LayoutWidget_3');
groupBox15->setGeometry( Qt::Rect(460, 290, 250, 140) ); $LayoutWidget_3->setGeometry( Qt::Rect(5, 25, 240, 260) );
my $layout8 = Qt::VBoxLayout($LayoutWidget_3, 0, 0, '$layout8');
my $LayoutWidget_3 = Qt::Widget(groupBox15, '$LayoutWidget_3'); my $layout7 = Qt::HBoxLayout(undef, 0, 6, '$layout7');
$LayoutWidget_3->setGeometry( Qt::Rect(6, 23, 240, 100) );
my $layout14 = Qt::VBoxLayout($LayoutWidget_3, 0, 0, '$layout14');
textLabelFN = Qt::Label($LayoutWidget_3, "textLabelFN"); textLabel1 = Qt::Label($LayoutWidget_3, "textLabel1");
$layout7->addWidget(textLabel1);
ProjType = Qt::ComboBox(0, $LayoutWidget_3, "ProjType");
ProjType->setSizePolicy( Qt::SizePolicy(0, 0, 0, 0, ProjType->sizePolicy()->hasHeightForWidth()) );
$layout7->addWidget(ProjType);
$layout8->addLayout($layout7);
my $layout6 = Qt::HBoxLayout(undef, 0, 6, '$layout6');
my $layout5 = Qt::VBoxLayout(undef, 0, 0, '$layout5');
NLabel = Qt::Label($LayoutWidget_3, "NLabel");
NLabel->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, NLabel->sizePolicy()->hasHeightForWidth()) );
$layout5->addWidget(NLabel);
z0Label = Qt::Label($LayoutWidget_3, "z0Label");
$layout5->addWidget(z0Label);
dzLabel = Qt::Label($LayoutWidget_3, "dzLabel");
$layout5->addWidget(dzLabel);
ELabel = Qt::Label($LayoutWidget_3, "ELabel");
$layout5->addWidget(ELabel);
SigELabel = Qt::Label($LayoutWidget_3, "SigELabel");
$layout5->addWidget(SigELabel);
AlbleLabel = Qt::Label($LayoutWidget_3, "AlbleLabel");
$layout5->addWidget(AlbleLabel);
SigAngleLabel = Qt::Label($LayoutWidget_3, "SigAngleLabel");
$layout5->addWidget(SigAngleLabel);
SeedLabel = Qt::Label($LayoutWidget_3, "SeedLabel");
$layout5->addWidget(SeedLabel);
$layout6->addLayout($layout5);
my $layout4 = Qt::VBoxLayout(undef, 0, 0, '$layout4');
NProj = Qt::LineEdit($LayoutWidget_3, "NProj");
NProj->setSizePolicy( Qt::SizePolicy(7, 0, 0, 0, NProj->sizePolicy()->hasHeightForWidth()) );
NProj->setMaximumSize( Qt::Size(32767, 32767) );
$layout4->addWidget(NProj);
z0 = Qt::LineEdit($LayoutWidget_3, "z0");
z0->setMaximumSize( Qt::Size(32767, 32767) );
$layout4->addWidget(z0);
dz = Qt::LineEdit($LayoutWidget_3, "dz");
$layout4->addWidget(dz);
E = Qt::LineEdit($LayoutWidget_3, "E");
$layout4->addWidget(E);
SigE = Qt::LineEdit($LayoutWidget_3, "SigE");
$layout4->addWidget(SigE);
Angle = Qt::LineEdit($LayoutWidget_3, "Angle");
$layout4->addWidget(Angle);
SigAngle = Qt::LineEdit($LayoutWidget_3, "SigAngle");
$layout4->addWidget(SigAngle);
Seed = Qt::LineEdit($LayoutWidget_3, "Seed");
$layout4->addWidget(Seed);
$layout6->addLayout($layout4);
$layout8->addLayout($layout6);
$layout13->addWidget(ProjParam);
groupBox15 = Qt::GroupBox($LayoutWidget_2, "groupBox15");
my $LayoutWidget_4 = Qt::Widget(groupBox15, '$LayoutWidget_4');
$LayoutWidget_4->setGeometry( Qt::Rect(6, 23, 240, 100) );
my $layout14 = Qt::VBoxLayout($LayoutWidget_4, 0, 0, '$layout14');
textLabelFN = Qt::Label($LayoutWidget_4, "textLabelFN");
$layout14->addWidget(textLabelFN); $layout14->addWidget(textLabelFN);
FNPre = Qt::LineEdit($LayoutWidget_3, "FNPre"); FNPre = Qt::LineEdit($LayoutWidget_4, "FNPre");
$layout14->addWidget(FNPre); $layout14->addWidget(FNPre);
textLabelPath = Qt::Label($LayoutWidget_3, "textLabelPath"); textLabelPath = Qt::Label($LayoutWidget_4, "textLabelPath");
$layout14->addWidget(textLabelPath); $layout14->addWidget(textLabelPath);
my $layout13 = Qt::HBoxLayout(undef, 0, 6, '$layout13'); my $layout13_2 = Qt::HBoxLayout(undef, 0, 6, '$layout13_2');
Path = Qt::LineEdit($LayoutWidget_3, "Path"); Path = Qt::LineEdit($LayoutWidget_4, "Path");
$layout13->addWidget(Path); $layout13_2->addWidget(Path);
Browse = Qt::PushButton($LayoutWidget_3, "Browse"); Browse = Qt::PushButton($LayoutWidget_4, "Browse");
Browse->setSizePolicy( Qt::SizePolicy(7, 0, 0, 0, Browse->sizePolicy()->hasHeightForWidth()) ); Browse->setSizePolicy( Qt::SizePolicy(7, 0, 0, 0, Browse->sizePolicy()->hasHeightForWidth()) );
$layout13->addWidget(Browse); $layout13_2->addWidget(Browse);
$layout14->addLayout($layout13); $layout14->addLayout($layout13_2);
$layout13->addWidget(groupBox15);
my $layout12 = Qt::HBoxLayout(undef, 0, 6, '$layout12');
Help = Qt::PushButton($LayoutWidget_2, "Help");
Help->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Help->sizePolicy()->hasHeightForWidth()) );
$layout12->addWidget(Help);
Start = Qt::PushButton($LayoutWidget_2, "Start");
Start->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Start->sizePolicy()->hasHeightForWidth()) );
$layout12->addWidget(Start);
Quit = Qt::PushButton($LayoutWidget_2, "Quit");
Quit->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Quit->sizePolicy()->hasHeightForWidth()) );
$layout12->addWidget(Quit);
$layout13->addLayout($layout12);
tabs->insertTab( LayersTab, "" ); tabs->insertTab( LayersTab, "" );
AddParTab = Qt::Widget(tabs, "AddParTab"); AddParTab = Qt::Widget(tabs, "AddParTab");
@ -1183,28 +1192,28 @@ sub NEW
ScanMode->setExclusive( 1 ); ScanMode->setExclusive( 1 );
ScanMode->setRadioButtonExclusive( 1 ); ScanMode->setRadioButtonExclusive( 1 );
my $LayoutWidget_4 = Qt::Widget(ScanMode, '$LayoutWidget_4'); my $LayoutWidget_5 = Qt::Widget(ScanMode, '$LayoutWidget_5');
$LayoutWidget_4->setGeometry( Qt::Rect(11, 103, 240, 23) ); $LayoutWidget_5->setGeometry( Qt::Rect(11, 103, 240, 23) );
my $layout3 = Qt::HBoxLayout($LayoutWidget_4, 0, 0, '$layout3'); my $layout3 = Qt::HBoxLayout($LayoutWidget_5, 0, 0, '$layout3');
textLabel2 = Qt::Label($LayoutWidget_4, "textLabel2"); textLabel2 = Qt::Label($LayoutWidget_5, "textLabel2");
$layout3->addWidget(textLabel2); $layout3->addWidget(textLabel2);
SFrom = Qt::LineEdit($LayoutWidget_4, "SFrom"); SFrom = Qt::LineEdit($LayoutWidget_5, "SFrom");
SFrom->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, SFrom->sizePolicy()->hasHeightForWidth()) ); SFrom->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, SFrom->sizePolicy()->hasHeightForWidth()) );
$layout3->addWidget(SFrom); $layout3->addWidget(SFrom);
textLabel2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2"); textLabel2_2 = Qt::Label($LayoutWidget_5, "textLabel2_2");
$layout3->addWidget(textLabel2_2); $layout3->addWidget(textLabel2_2);
STo = Qt::LineEdit($LayoutWidget_4, "STo"); STo = Qt::LineEdit($LayoutWidget_5, "STo");
STo->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, STo->sizePolicy()->hasHeightForWidth()) ); STo->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, STo->sizePolicy()->hasHeightForWidth()) );
$layout3->addWidget(STo); $layout3->addWidget(STo);
textLabel2_2_2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2_2_2"); textLabel2_2_2_2 = Qt::Label($LayoutWidget_5, "textLabel2_2_2_2");
$layout3->addWidget(textLabel2_2_2_2); $layout3->addWidget(textLabel2_2_2_2);
SStep = Qt::LineEdit($LayoutWidget_4, "SStep"); SStep = Qt::LineEdit($LayoutWidget_5, "SStep");
SStep->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, SStep->sizePolicy()->hasHeightForWidth()) ); SStep->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, SStep->sizePolicy()->hasHeightForWidth()) );
$layout3->addWidget(SStep); $layout3->addWidget(SStep);
@ -1240,8 +1249,12 @@ sub NEW
ScandL->setMaxValue( int(7) ); ScandL->setMaxValue( int(7) );
ScandL->setMinValue( int(1) ); ScandL->setMinValue( int(1) );
tabs->insertTab( ScansTab, "" ); tabs->insertTab( ScansTab, "" );
Progress = Qt::ProgressBar(this, "Progress");
Progress->setGeometry( Qt::Rect(0, 525, 715, 20) );
Progress->setFrameShape( &Qt::ProgressBar::WinPanel() );
languageChange(); languageChange();
my $resize = Qt::Size(716, 547); my $resize = Qt::Size(717, 547);
$resize = $resize->expandedTo(minimumSizeHint()); $resize = $resize->expandedTo(minimumSizeHint());
resize( $resize ); resize( $resize );
clearWState( &Qt::WState_Polished ); clearWState( &Qt::WState_Polished );
@ -1257,6 +1270,7 @@ sub NEW
Qt::Object::connect(NL, SIGNAL "valueChanged(int)", this, SLOT "PrepLayers()"); Qt::Object::connect(NL, SIGNAL "valueChanged(int)", this, SLOT "PrepLayers()");
Qt::Object::connect(ProjType, SIGNAL "activated(int)", this, SLOT "ProjSmartDefaults()"); Qt::Object::connect(ProjType, SIGNAL "activated(int)", this, SLOT "ProjSmartDefaults()");
Qt::Object::connect(Browse, SIGNAL "clicked()", this, SLOT "DirectoryBrowse()"); Qt::Object::connect(Browse, SIGNAL "clicked()", this, SLOT "DirectoryBrowse()");
Qt::Object::connect(Quit, SIGNAL "clicked()", this, SLOT "ConfirmQuit()");
} }
@ -1266,37 +1280,6 @@ sub NEW
sub languageChange sub languageChange
{ {
setCaption(trUtf8("TrimSPGUI") ); setCaption(trUtf8("TrimSPGUI") );
ProjParam->setTitle( trUtf8("Projectile parameters") );
textLabel1->setText( trUtf8("Projectile") );
ProjType->clear();
ProjType->insertItem( trUtf8("Muon") );
ProjType->insertItem( trUtf8("Li8") );
ProjType->insertItem( trUtf8("B12") );
Qt::WhatsThis::add(ProjType, trUtf8("Choose the projectile type."));
NLabel->setText( trUtf8("Number of projectiles") );
z0Label->setText( trUtf8("Starting depth [nm]") );
dzLabel->setText( trUtf8("Depth increment [nm]") );
ELabel->setText( trUtf8("Energy [eV]") );
SigELabel->setText( trUtf8("Energy sigma [eV]") );
AlbleLabel->setText( trUtf8("Angle [deg]") );
SigAngleLabel->setText( trUtf8("Angle sigma [deg]") );
SeedLabel->setText( trUtf8("Random seed") );
NProj->setText( trUtf8("10000") );
Qt::WhatsThis::add(NProj, trUtf8("The number of projectiles to be implanted in the sample. Larger number better statistics."));
z0->setText( trUtf8("0.0") );
Qt::WhatsThis::add(z0, trUtf8("Consider implanted projectiles starting from this depth."));
dz->setText( trUtf8("2.0") );
Qt::WhatsThis::add(dz, trUtf8("The steps in implantation depth at which the number of stopped projectiles will be counted. Smaller number for finer implantation histogram."));
E->setText( trUtf8("2000") );
Qt::WhatsThis::add(E, trUtf8("The average implantation energy of the projectile."));
SigE->setText( trUtf8("450") );
Qt::WhatsThis::add(SigE, trUtf8("The spread in implantation energy. For muons this is typically 400-450 eV. For Li8 this is practically zero."));
Angle->setText( trUtf8("0") );
Qt::WhatsThis::add(Angle, trUtf8("The average implantation angle."));
SigAngle->setText( trUtf8("15") );
Qt::WhatsThis::add(SigAngle, trUtf8("The spread in implantation angles."));
Seed->setText( trUtf8("78741") );
Qt::WhatsThis::add(Seed, trUtf8("The random number generator seed."));
groupBox1->setTitle( trUtf8("Layers") ); groupBox1->setTitle( trUtf8("Layers") );
textLabel1_4->setText( trUtf8("Number of Layers") ); textLabel1_4->setText( trUtf8("Number of Layers") );
Qt::WhatsThis::add(NL, trUtf8("Select the number of the layers of your structure (maximum 7 layers).")); Qt::WhatsThis::add(NL, trUtf8("Select the number of the layers of your structure (maximum 7 layers)."));
@ -1318,8 +1301,37 @@ sub languageChange
BoxL5->setTitle( trUtf8("Layer 5") ); BoxL5->setTitle( trUtf8("Layer 5") );
BoxL6->setTitle( trUtf8("Layer 6") ); BoxL6->setTitle( trUtf8("Layer 6") );
BoxL7->setTitle( trUtf8("Layer 7") ); BoxL7->setTitle( trUtf8("Layer 7") );
Help->setText( trUtf8("Help") ); ProjParam->setTitle( trUtf8("Projectile parameters") );
Start->setText( trUtf8("Start") ); textLabel1->setText( trUtf8("Projectile") );
ProjType->clear();
ProjType->insertItem( trUtf8("Muon") );
ProjType->insertItem( trUtf8("Li8") );
ProjType->insertItem( trUtf8("B12") );
Qt::WhatsThis::add(ProjType, trUtf8("Choose the projectile type."));
NLabel->setText( trUtf8("Number of projectiles") );
z0Label->setText( trUtf8("Starting depth [Å]") );
dzLabel->setText( trUtf8("Depth increment [Å]") );
ELabel->setText( trUtf8("Energy [eV]") );
SigELabel->setText( trUtf8("Energy sigma [eV]") );
AlbleLabel->setText( trUtf8("Angle [deg]") );
SigAngleLabel->setText( trUtf8("Angle sigma [deg]") );
SeedLabel->setText( trUtf8("Random seed") );
NProj->setText( trUtf8("10000") );
Qt::WhatsThis::add(NProj, trUtf8("The number of projectiles to be implanted in the sample. Larger number better statistics."));
z0->setText( trUtf8("0.0") );
Qt::WhatsThis::add(z0, trUtf8("Consider implanted projectiles starting from this depth."));
dz->setText( trUtf8("10.0") );
Qt::WhatsThis::add(dz, trUtf8("The steps in implantation depth at which the number of stopped projectiles will be counted. Smaller number for finer implantation histogram."));
E->setText( trUtf8("2000") );
Qt::WhatsThis::add(E, trUtf8("The average implantation energy of the projectile."));
SigE->setText( trUtf8("450") );
Qt::WhatsThis::add(SigE, trUtf8("The spread in implantation energy. For muons this is typically 400-450 eV. For Li8 this is practically zero."));
Angle->setText( trUtf8("0") );
Qt::WhatsThis::add(Angle, trUtf8("The average implantation angle."));
SigAngle->setText( trUtf8("15") );
Qt::WhatsThis::add(SigAngle, trUtf8("The spread in implantation angles."));
Seed->setText( trUtf8("78741") );
Qt::WhatsThis::add(Seed, trUtf8("The random number generator seed."));
groupBox15->setTitle( trUtf8("File Names") ); groupBox15->setTitle( trUtf8("File Names") );
textLabelFN->setText( trUtf8("File names prefix") ); textLabelFN->setText( trUtf8("File names prefix") );
FNPre->setText( trUtf8("SrTiO3") ); FNPre->setText( trUtf8("SrTiO3") );
@ -1328,6 +1340,10 @@ sub languageChange
Path->setText( trUtf8("./") ); Path->setText( trUtf8("./") );
Qt::WhatsThis::add(Path, trUtf8("This is the path were the input/output files will be stored.")); Qt::WhatsThis::add(Path, trUtf8("This is the path were the input/output files will be stored."));
Browse->setText( trUtf8("Browse") ); Browse->setText( trUtf8("Browse") );
Help->setText( trUtf8("Help") );
Start->setText( trUtf8("Start") );
Quit->setText( trUtf8("Quit") );
Qt::WhatsThis::add(Quit, trUtf8("Quit the application."));
tabs->changeTab( LayersTab, trUtf8("Layers") ); tabs->changeTab( LayersTab, trUtf8("Layers") );
AddParam->setTitle( trUtf8("Additional parameters") ); AddParam->setTitle( trUtf8("Additional parameters") );
textLabelEF->setText( trUtf8("EF") ); textLabelEF->setText( trUtf8("EF") );
@ -1484,7 +1500,7 @@ Usage:
Initially define your multilayer structure. This can be formed of 7 layers Initially define your multilayer structure. This can be formed of 7 layers
maximum. Each layer is defined by giving its chemical formula, its maximum. Each layer is defined by giving its chemical formula, its
density in units of g/cm^3, and its thickness in ÅngstrÃm. density in units of g/cm^3, and its thickness in Ångstrom.
Next, choose the type of projectile to be implanted in the structure from Next, choose the type of projectile to be implanted in the structure from
the drop-down menu. Set the 'Number of projectiles' to be implanted, were the drop-down menu. Set the 'Number of projectiles' to be implanted, were
@ -1587,6 +1603,10 @@ sub CollectValues
# Filenames etc. # Filenames etc.
$All{"FNPre"}=FNPre->text(); $All{"FNPre"}=FNPre->text();
$All{"Path"}=Path->text(); $All{"Path"}=Path->text();
if ($All{"Path"} eq "./") {
Path -> setText($ENV{'PWD'});
$All{"Path"}=Path->text();
}
# Scan parameters only if selected # Scan parameters only if selected
$All{"ScanSeq"}=ScanSeq->isChecked(); $All{"ScanSeq"}=ScanSeq->isChecked();
@ -1822,6 +1842,8 @@ sub StartSequenceOne
if (-e "ausgabe1.inp") { if (-e "ausgabe1.inp") {
system("rm -f ausgabe*"); system("rm -f ausgabe*");
} }
my $Progress=0;
if ($All{"ScanSeq"}) { if ($All{"ScanSeq"}) {
# For a scan # For a scan
$All{"ERadio"}=ERadio->isChecked(); $All{"ERadio"}=ERadio->isChecked();
@ -1855,9 +1877,7 @@ sub StartSequenceOne
} }
my $ScanAttrib = child($ScanName); my $ScanAttrib = child($ScanName);
my $Progress=0;
foreach (@SValues) { foreach (@SValues) {
$Progress=$Progress+100/$#SValues;
$ScanAttrib->setText($_); $ScanAttrib->setText($_);
my $eingabe1=CreateInpFile(); my $eingabe1=CreateInpFile();
if ($eingabe1 eq "ERROR") {return 0;} if ($eingabe1 eq "ERROR") {return 0;}
@ -1868,7 +1888,9 @@ sub StartSequenceOne
# Use windoz version # Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); # system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# Use Linux version # Use Linux version
system("cp $FILENAME.inp eingabe1.inp; trimsp7l"); $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
system($cmd);
$Progress=$Progress+90/$#SValues;
Progress->setProgress($Progress); Progress->setProgress($Progress);
foreach ("err","out","rge") { foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_"); system("mv -f ausgabe1.$_ $FILENAME.$_");
@ -1884,20 +1906,28 @@ sub StartSequenceOne
open (INPF,q{>}, "$FILENAME.inp" ); open (INPF,q{>}, "$FILENAME.inp" );
print INPF $eingabe1; print INPF $eingabe1;
close(INPF); close(INPF);
$Progress=20;
Progress->setProgress($Progress);
# Use windoz version # Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); # system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# Use Linux version # Use Linux version
system("cp $FILENAME.inp eingabe1.inp; trimsp7l"); $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
system($cmd);
foreach ("err","out","rge") { foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_"); system("mv -f ausgabe1.$_ $FILENAME.$_");
} }
$Progress=90;
Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"}; $cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd); system($cmd);
} }
# Move the fort.33 file into the subdirectory and change its name # Move the fort.33 file into the subdirectory and change its name
$cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"Path"}."/".$All{"FNPre"}."_Seq_Results.dat"; $cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"Path"}."/".$All{"FNPre"}."_Seq_Results.dat";
system($cmd); system($cmd);
return 1; $Progress=100;
Progress->setProgress($Progress);
return 1;
} }
@ -1910,6 +1940,19 @@ sub DirectoryBrowse
} }
sub ConfirmQuit
{
my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1);
if ($Ans==0) {
# Then quit
exit;
}
# Otherwize go back
# print STDOUT $ENV{'TRIMBIN'}."\n";
}
1; 1;

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
void TrimSPGUI::ToggleScanSingle() void TrimSPGUI::ToggleScanSingle()
{ {
# Toggle between scan/single run mode # Toggle between scan/single run mode
# First collect some information # First collect some information
my %All=(); my %All=();
@ -101,12 +101,43 @@ void TrimSPGUI::ProjSmartDefaults()
void TrimSPGUI::OpenHelpWindow() void TrimSPGUI::OpenHelpWindow()
{ {
use trimhelp; my $HelpText="
my $w=trimhelp::NEW(); This is a GUI that uses the Trim.SP simulation binary to calculate the
$w->show; implantation profiles if implanted projectiles in a multilayer thin film
# $w->setFocus(); structures.
# $w->setActiveWindow();
# $w->raise(); Usage:
Initially define your multilayer structure. This can be formed of 7 layers
maximum. Each layer is defined by giving its chemical formula, its
density in units of g/cm^3, and its thickness in Ångstrom.
Next, choose the type of projectile to be implanted in the structure from
the drop-down menu. Set the 'Number of projectiles' to be implanted, were
a higher number will give better statistics. Finally define the rest of the pro-
jectile parameters such as implantation energy, energy spread, etc.
In the 'File names prefix' give a string which will be used to construct the
input/output file names of the simulation. These files will be collected and
saved in the subdirectory provided in 'Save in subdirectory' box.
The 'Additional Parameters' tab allows you to change additional parameters
In the simulation. Change these only if you know what you are doing, and have
read the original documentation of the Trim.SP simulation.
The 'Scans' tabs provides the ability to change the value of a certain
parameter in the simulation, such as implantation energy, spread in energy,
number of implanted projectiles, and the thickness of one layer. The values of
this parameter can be changes by a regualr step size ('Loop' checkbox and
parameters), or following a set of values ('List of values' checkbox and the
comma separated values).
For more details click on the question mark on the top right corner, and then
click on the item you want to lear about.
Copyright 2009 by Zaher Salman and the LEM Group
";
my $HelpWindow = Qt::MessageBox::information( this, "TrimSP GUI Help Window",$HelpText);
} }
void TrimSPGUI::CollectValues() void TrimSPGUI::CollectValues()
@ -180,6 +211,10 @@ void TrimSPGUI::CollectValues()
# Filenames etc. # Filenames etc.
$All{"FNPre"}=FNPre->text(); $All{"FNPre"}=FNPre->text();
$All{"Path"}=Path->text(); $All{"Path"}=Path->text();
if ($All{"Path"} eq "./") {
Path -> setText($ENV{'PWD'});
$All{"Path"}=Path->text();
}
# Scan parameters only if selected # Scan parameters only if selected
$All{"ScanSeq"}=ScanSeq->isChecked(); $All{"ScanSeq"}=ScanSeq->isChecked();
@ -204,7 +239,8 @@ void TrimSPGUI::CollectValues()
void TrimSPGUI::CreateInpFile() void TrimSPGUI::CreateInpFile()
{ {
# use lib "$ENV{HOME}/Projects/TrimSPGUI/Chem"; # use lib '$ENV{HOME}/Projects/TrimSPGUI/Chem';
push @INC, "$ENV{HOME}/Projects/TrimSPGUI";
use Chem; use Chem;
# The proper way I think is not to have scan sequences implimented here # The proper way I think is not to have scan sequences implimented here
# but rather call this multiple times to generate the scan # but rather call this multiple times to generate the scan
@ -336,6 +372,7 @@ void TrimSPGUI::CreateInpFile()
if ($Check!=0 && $i<=$All{"NL"}) { if ($Check!=0 && $i<=$All{"NL"}) {
my $ErrMsg="Error: Layer $i is empty. Expecting it to be defined!\n"; my $ErrMsg="Error: Layer $i is empty. Expecting it to be defined!\n";
print STDERR $ErrMsg; print STDERR $ErrMsg;
my $HelpWindow = Qt::MessageBox::information( this, "Error!",$ErrMsg);
# my $ErrorDialog = Qt::ErrorMessage(TrimSPGUI); # my $ErrorDialog = Qt::ErrorMessage(TrimSPGUI);
# $ErrorDialog->message($ErrMsg); # $ErrorDialog->message($ErrMsg);
return "ERROR"; return "ERROR";
@ -400,11 +437,19 @@ void TrimSPGUI::StartSequenceOne()
my @SValues=(); my @SValues=();
my $cmd=""; my $cmd="";
# Create a subdirectory where all input/output files are saved # Create a subdirectory where all input/output files are saved
$cmd="mkdir ".$All{"Path"}; if (-d $All{"Path"}) {
system($cmd); # Directory exists, do nothing
# Cleanup from old files } else {
system("rm -f ausgabe*"); $cmd="mkdir ".$All{"Path"};
system($cmd);
}
# Cleanup from old files
if (-e "ausgabe1.inp") {
system("rm -f ausgabe*");
}
my $Progress=0;
if ($All{"ScanSeq"}) { if ($All{"ScanSeq"}) {
# For a scan # For a scan
$All{"ERadio"}=ERadio->isChecked(); $All{"ERadio"}=ERadio->isChecked();
@ -438,9 +483,7 @@ void TrimSPGUI::StartSequenceOne()
} }
my $ScanAttrib = child($ScanName); my $ScanAttrib = child($ScanName);
my $Progress=0;
foreach (@SValues) { foreach (@SValues) {
$Progress=$Progress+100/$#SValues;
$ScanAttrib->setText($_); $ScanAttrib->setText($_);
my $eingabe1=CreateInpFile(); my $eingabe1=CreateInpFile();
if ($eingabe1 eq "ERROR") {return 0;} if ($eingabe1 eq "ERROR") {return 0;}
@ -451,7 +494,9 @@ void TrimSPGUI::StartSequenceOne()
# Use windoz version # Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); # system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# Use Linux version # Use Linux version
system("cp $FILENAME.inp eingabe1.inp; trimsp7l"); $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
system($cmd);
$Progress=$Progress+90/$#SValues;
Progress->setProgress($Progress); Progress->setProgress($Progress);
foreach ("err","out","rge") { foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_"); system("mv -f ausgabe1.$_ $FILENAME.$_");
@ -467,18 +512,46 @@ void TrimSPGUI::StartSequenceOne()
open (INPF,q{>}, "$FILENAME.inp" ); open (INPF,q{>}, "$FILENAME.inp" );
print INPF $eingabe1; print INPF $eingabe1;
close(INPF); close(INPF);
$Progress=20;
Progress->setProgress($Progress);
# Use windoz version # Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe"); # system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# Use Linux version # Use Linux version
system("cp $FILENAME.inp eingabe1.inp; trimsp7l"); $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
system($cmd);
foreach ("err","out","rge") { foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_"); system("mv -f ausgabe1.$_ $FILENAME.$_");
} }
$Progress=90;
Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"}; $cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd); system($cmd);
} }
# Move the fort.33 file into the subdirectory and change its name # Move the fort.33 file into the subdirectory and change its name
$cmd="mv -f fort.33 ".$All{"Path"}." ".$All{"FNPre"}."_Seq_Results.dat"; $cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"Path"}."/".$All{"FNPre"}."_Seq_Results.dat";
system($cmd); system($cmd);
return 1; $Progress=100;
Progress->setProgress($Progress);
return 1;
}
void TrimSPGUI::DirectoryBrowse()
{
my $FileBrowser = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
if ($FileBrowser eq "") {$FileBrowser="./";}
Path->setText($FileBrowser);
}
void TrimSPGUI::ConfirmQuit()
{
my $Ans = Qt::MessageBox::question( this, "Quit?","Are you sure you want to quit?","&Yes","&No","",0,1);
if ($Ans==0) {
# Then quit
exit;
}
# Otherwize go back
# print STDOUT $ENV{'TRIMBIN'}."\n";
} }