diff --git a/trimsp/TrimSPGUI/TrimSP b/trimsp/TrimSPGUI/TrimSP
index d1124a5..1f977c0 100755
--- a/trimsp/TrimSPGUI/TrimSP
+++ b/trimsp/TrimSPGUI/TrimSP
@@ -1,5 +1,6 @@
#!/bin/bash
+export TRIMBIN=/usr/local/bin/trimsp7l
export PERLLIB=$HOME/Projects/TrimSPGUI
perl $HOME/Projects/TrimSPGUI/TrimSPGUI.pl
diff --git a/trimsp/TrimSPGUI/TrimSPGUI.pl b/trimsp/TrimSPGUI/TrimSPGUI.pl
index aafa73c..11bfed3 100644
--- a/trimsp/TrimSPGUI/TrimSPGUI.pl
+++ b/trimsp/TrimSPGUI/TrimSPGUI.pl
@@ -1,6 +1,6 @@
# 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)
#
# WARNING! All changes made in this file will be lost!
@@ -21,30 +21,11 @@ use Qt::slots
CollectValues => [],
CreateInpFile => [],
StartSequenceOne => [],
- DirectoryBrowse => [];
+ DirectoryBrowse => [],
+ ConfirmQuit => [];
use Qt::attributes qw(
- Progress
tabs
LayersTab
- ProjParam
- textLabel1
- ProjType
- NLabel
- z0Label
- dzLabel
- ELabel
- SigELabel
- AlbleLabel
- SigAngleLabel
- SeedLabel
- NProj
- z0
- dz
- E
- SigE
- Angle
- SigAngle
- Seed
groupBox1
textLabel1_4
NL
@@ -79,14 +60,34 @@ use Qt::attributes qw(
L7d
L7Comp
L7rho
- Help
- Start
+ ProjParam
+ textLabel1
+ ProjType
+ NLabel
+ z0Label
+ dzLabel
+ ELabel
+ SigELabel
+ AlbleLabel
+ SigAngleLabel
+ SeedLabel
+ NProj
+ z0
+ dz
+ E
+ SigE
+ Angle
+ SigAngle
+ Seed
groupBox15
textLabelFN
FNPre
textLabelPath
Path
Browse
+ Help
+ Start
+ Quit
AddParTab
AddParam
textLabelEF
@@ -135,6 +136,7 @@ use Qt::attributes qw(
NProjRadio
dRadio
ScandL
+ Progress
TrimSPGUIHelp
);
@@ -795,108 +797,26 @@ sub NEW
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->setGeometry( Qt::Rect(0, 0, 715, 525) );
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->setGeometry( Qt::Rect(0, 0, 460, 500) );
groupBox1->setFrameShape( &Qt::GroupBox::GroupBoxPanel() );
groupBox1->setFrameShadow( &Qt::GroupBox::Sunken() );
- my $LayoutWidget_2 = Qt::Widget(groupBox1, '$LayoutWidget_2');
- $LayoutWidget_2->setGeometry( Qt::Rect(5, 20, 450, 465) );
- my $layout27 = Qt::VBoxLayout($LayoutWidget_2, 11, 6, '$layout27');
+ my $LayoutWidget = Qt::Widget(groupBox1, '$LayoutWidget');
+ $LayoutWidget->setGeometry( Qt::Rect(5, 20, 450, 465) );
+ my $layout27 = Qt::VBoxLayout($LayoutWidget, 11, 6, '$layout27');
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);
- NL = Qt::SpinBox($LayoutWidget_2, "NL");
+ NL = Qt::SpinBox($LayoutWidget, "NL");
NL->setMaxValue( int(7) );
NL->setMinValue( int(1) );
$layout19->addWidget(NL);
@@ -906,21 +826,21 @@ sub NEW
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()) );
$layout26->addWidget(textLabel2_4);
my $spacer_2 = Qt::SpacerItem(101, 20, &Qt::SizePolicy::Fixed, &Qt::SizePolicy::Minimum);
$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()) );
$layout26->addWidget(textLabel3);
- textLabel4 = Qt::Label($LayoutWidget_2, "textLabel4");
+ textLabel4 = Qt::Label($LayoutWidget, "textLabel4");
$layout26->addWidget(textLabel4);
$layout27->addLayout($layout26);
- BoxL1 = Qt::GroupBox($LayoutWidget_2, "BoxL1");
+ BoxL1 = Qt::GroupBox($LayoutWidget, "BoxL1");
L1Comp = Qt::LineEdit(BoxL1, "L1Comp");
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()) );
$layout27->addWidget(BoxL1);
- BoxL2 = Qt::GroupBox($LayoutWidget_2, "BoxL2");
+ BoxL2 = Qt::GroupBox($LayoutWidget, "BoxL2");
BoxL2->setEnabled( 0 );
L2d = Qt::LineEdit(BoxL2, "L2d");
@@ -947,7 +867,7 @@ sub NEW
L2rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL2);
- BoxL3 = Qt::GroupBox($LayoutWidget_2, "BoxL3");
+ BoxL3 = Qt::GroupBox($LayoutWidget, "BoxL3");
BoxL3->setEnabled( 0 );
L3d = Qt::LineEdit(BoxL3, "L3d");
@@ -961,7 +881,7 @@ sub NEW
L3rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL3);
- BoxL4 = Qt::GroupBox($LayoutWidget_2, "BoxL4");
+ BoxL4 = Qt::GroupBox($LayoutWidget, "BoxL4");
BoxL4->setEnabled( 0 );
L4d = Qt::LineEdit(BoxL4, "L4d");
@@ -975,7 +895,7 @@ sub NEW
L4rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL4);
- BoxL5 = Qt::GroupBox($LayoutWidget_2, "BoxL5");
+ BoxL5 = Qt::GroupBox($LayoutWidget, "BoxL5");
BoxL5->setEnabled( 0 );
L5d = Qt::LineEdit(BoxL5, "L5d");
@@ -989,7 +909,7 @@ sub NEW
L5rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL5);
- BoxL6 = Qt::GroupBox($LayoutWidget_2, "BoxL6");
+ BoxL6 = Qt::GroupBox($LayoutWidget, "BoxL6");
BoxL6->setEnabled( 0 );
L6d = Qt::LineEdit(BoxL6, "L6d");
@@ -1003,7 +923,7 @@ sub NEW
L6rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL6);
- BoxL7 = Qt::GroupBox($LayoutWidget_2, "BoxL7");
+ BoxL7 = Qt::GroupBox($LayoutWidget, "BoxL7");
BoxL7->setEnabled( 0 );
L7d = Qt::LineEdit(BoxL7, "L7d");
@@ -1017,39 +937,128 @@ sub NEW
L7rho->setGeometry( Qt::Rect(200, 20, 111, 25) );
$layout27->addWidget(BoxL7);
- Help = Qt::PushButton(LayersTab, "Help");
- Help->setGeometry( Qt::Rect(505, 450, 80, 30) );
- Help->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Help->sizePolicy()->hasHeightForWidth()) );
+ my $LayoutWidget_2 = Qt::Widget(LayersTab, '$LayoutWidget_2');
+ $LayoutWidget_2->setGeometry( Qt::Rect(460, 0, 254, 490) );
+ my $layout13 = Qt::VBoxLayout($LayoutWidget_2, 0, 0, '$layout13');
- Start = Qt::PushButton(LayersTab, "Start");
- Start->setGeometry( Qt::Rect(595, 450, 80, 30) );
- Start->setSizePolicy( Qt::SizePolicy(7, 7, 0, 0, Start->sizePolicy()->hasHeightForWidth()) );
+ ProjParam = Qt::GroupBox($LayoutWidget_2, "ProjParam");
- groupBox15 = Qt::GroupBox(LayersTab, "groupBox15");
- groupBox15->setGeometry( Qt::Rect(460, 290, 250, 140) );
+ my $LayoutWidget_3 = Qt::Widget(ProjParam, '$LayoutWidget_3');
+ $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');
- $LayoutWidget_3->setGeometry( Qt::Rect(6, 23, 240, 100) );
- my $layout14 = Qt::VBoxLayout($LayoutWidget_3, 0, 0, '$layout14');
+ my $layout7 = Qt::HBoxLayout(undef, 0, 6, '$layout7');
- 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);
- FNPre = Qt::LineEdit($LayoutWidget_3, "FNPre");
+ FNPre = Qt::LineEdit($LayoutWidget_4, "FNPre");
$layout14->addWidget(FNPre);
- textLabelPath = Qt::Label($LayoutWidget_3, "textLabelPath");
+ textLabelPath = Qt::Label($LayoutWidget_4, "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");
- $layout13->addWidget(Path);
+ Path = Qt::LineEdit($LayoutWidget_4, "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()) );
- $layout13->addWidget(Browse);
- $layout14->addLayout($layout13);
+ $layout13_2->addWidget(Browse);
+ $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, "" );
AddParTab = Qt::Widget(tabs, "AddParTab");
@@ -1183,28 +1192,28 @@ sub NEW
ScanMode->setExclusive( 1 );
ScanMode->setRadioButtonExclusive( 1 );
- my $LayoutWidget_4 = Qt::Widget(ScanMode, '$LayoutWidget_4');
- $LayoutWidget_4->setGeometry( Qt::Rect(11, 103, 240, 23) );
- my $layout3 = Qt::HBoxLayout($LayoutWidget_4, 0, 0, '$layout3');
+ my $LayoutWidget_5 = Qt::Widget(ScanMode, '$LayoutWidget_5');
+ $LayoutWidget_5->setGeometry( Qt::Rect(11, 103, 240, 23) );
+ my $layout3 = Qt::HBoxLayout($LayoutWidget_5, 0, 0, '$layout3');
- textLabel2 = Qt::Label($LayoutWidget_4, "textLabel2");
+ textLabel2 = Qt::Label($LayoutWidget_5, "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()) );
$layout3->addWidget(SFrom);
- textLabel2_2 = Qt::Label($LayoutWidget_4, "textLabel2_2");
+ textLabel2_2 = Qt::Label($LayoutWidget_5, "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()) );
$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);
- SStep = Qt::LineEdit($LayoutWidget_4, "SStep");
+ SStep = Qt::LineEdit($LayoutWidget_5, "SStep");
SStep->setSizePolicy( Qt::SizePolicy(5, 5, 0, 0, SStep->sizePolicy()->hasHeightForWidth()) );
$layout3->addWidget(SStep);
@@ -1240,8 +1249,12 @@ sub NEW
ScandL->setMaxValue( int(7) );
ScandL->setMinValue( int(1) );
tabs->insertTab( ScansTab, "" );
+
+ Progress = Qt::ProgressBar(this, "Progress");
+ Progress->setGeometry( Qt::Rect(0, 525, 715, 20) );
+ Progress->setFrameShape( &Qt::ProgressBar::WinPanel() );
languageChange();
- my $resize = Qt::Size(716, 547);
+ my $resize = Qt::Size(717, 547);
$resize = $resize->expandedTo(minimumSizeHint());
resize( $resize );
clearWState( &Qt::WState_Polished );
@@ -1257,6 +1270,7 @@ sub NEW
Qt::Object::connect(NL, SIGNAL "valueChanged(int)", this, SLOT "PrepLayers()");
Qt::Object::connect(ProjType, SIGNAL "activated(int)", this, SLOT "ProjSmartDefaults()");
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
{
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") );
textLabel1_4->setText( trUtf8("Number of 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") );
BoxL6->setTitle( trUtf8("Layer 6") );
BoxL7->setTitle( trUtf8("Layer 7") );
- Help->setText( trUtf8("Help") );
- Start->setText( trUtf8("Start") );
+ 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 [Å]") );
+ 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") );
textLabelFN->setText( trUtf8("File names prefix") );
FNPre->setText( trUtf8("SrTiO3") );
@@ -1328,6 +1340,10 @@ sub languageChange
Path->setText( trUtf8("./") );
Qt::WhatsThis::add(Path, trUtf8("This is the path were the input/output files will be stored."));
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") );
AddParam->setTitle( trUtf8("Additional parameters") );
textLabelEF->setText( trUtf8("EF") );
@@ -1484,7 +1500,7 @@ 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 Ã
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
the drop-down menu. Set the 'Number of projectiles' to be implanted, were
@@ -1587,6 +1603,10 @@ sub CollectValues
# Filenames etc.
$All{"FNPre"}=FNPre->text();
$All{"Path"}=Path->text();
+ if ($All{"Path"} eq "./") {
+ Path -> setText($ENV{'PWD'});
+ $All{"Path"}=Path->text();
+ }
# Scan parameters only if selected
$All{"ScanSeq"}=ScanSeq->isChecked();
@@ -1822,6 +1842,8 @@ sub StartSequenceOne
if (-e "ausgabe1.inp") {
system("rm -f ausgabe*");
}
+
+ my $Progress=0;
if ($All{"ScanSeq"}) {
# For a scan
$All{"ERadio"}=ERadio->isChecked();
@@ -1855,9 +1877,7 @@ sub StartSequenceOne
}
my $ScanAttrib = child($ScanName);
- my $Progress=0;
foreach (@SValues) {
- $Progress=$Progress+100/$#SValues;
$ScanAttrib->setText($_);
my $eingabe1=CreateInpFile();
if ($eingabe1 eq "ERROR") {return 0;}
@@ -1868,7 +1888,9 @@ sub StartSequenceOne
# Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# 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);
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
@@ -1884,20 +1906,28 @@ sub StartSequenceOne
open (INPF,q{>}, "$FILENAME.inp" );
print INPF $eingabe1;
close(INPF);
+ $Progress=20;
+ Progress->setProgress($Progress);
+
# Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
-# Use Linux version
- system("cp $FILENAME.inp eingabe1.inp; trimsp7l");
+# Use Linux version
+ $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
+ system($cmd);
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
}
+ $Progress=90;
+ Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
}
# 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";
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;
diff --git a/trimsp/TrimSPGUI/TrimSPGUItabs.ui b/trimsp/TrimSPGUI/TrimSPGUItabs.ui
index 09425c4..9aea18b 100755
--- a/trimsp/TrimSPGUI/TrimSPGUItabs.ui
+++ b/trimsp/TrimSPGUI/TrimSPGUItabs.ui
@@ -8,7 +8,7 @@
0
0
- 716
+ 717
547
@@ -44,22 +44,6 @@
true
-
-
- Progress
-
-
-
- 0
- 525
- 715
- 20
-
-
-
- WinPanel
-
-
tabs
@@ -79,341 +63,6 @@
Layers
-
-
- ProjParam
-
-
-
- 460
- 0
- 250
- 290
-
-
-
- Projectile parameters
-
-
-
- layout8
-
-
-
- 5
- 25
- 240
- 260
-
-
-
-
- unnamed
-
-
- 0
-
-
- 0
-
-
-
- layout7
-
-
-
- unnamed
-
-
-
- textLabel1
-
-
- Projectile
-
-
- lineEdit3
-
-
-
- -
-
- Muon
-
-
- -
-
- Li8
-
-
- -
-
- B12
-
-
-
- ProjType
-
-
-
- 0
- 0
- 0
- 0
-
-
-
- Choose the projectile type.
-
-
-
-
-
-
- layout6
-
-
-
- unnamed
-
-
-
- layout5
-
-
-
- unnamed
-
-
- 0
-
-
- 0
-
-
-
- NLabel
-
-
-
- 5
- 5
- 0
- 0
-
-
-
- Number of projectiles
-
-
- lineEdit3_4
-
-
-
-
- z0Label
-
-
- Starting depth [nm]
-
-
- lineEdit3_5
-
-
-
-
- dzLabel
-
-
- Depth increment [nm]
-
-
- lineEdit3_5
-
-
-
-
- ELabel
-
-
- Energy [eV]
-
-
- lineEdit3_6
-
-
-
-
- SigELabel
-
-
- Energy sigma [eV]
-
-
- lineEdit3_7
-
-
-
-
- AlbleLabel
-
-
- Angle [deg]
-
-
- lineEdit3_8
-
-
-
-
- SigAngleLabel
-
-
- Angle sigma [deg]
-
-
- lineEdit3_9
-
-
-
-
- SeedLabel
-
-
- Random seed
-
-
- lineEdit3
-
-
-
-
-
-
- layout4
-
-
-
- unnamed
-
-
- 0
-
-
-
- NProj
-
-
-
- 7
- 0
- 0
- 0
-
-
-
-
- 32767
- 32767
-
-
-
- 10000
-
-
- The number of projectiles to be implanted in the sample. Larger number better statistics.
-
-
-
-
- z0
-
-
-
- 32767
- 32767
-
-
-
- 0.0
-
-
- Consider implanted projectiles starting from this depth.
-
-
-
-
- dz
-
-
- 2.0
-
-
- The steps in implantation depth at which the number of stopped projectiles will be counted. Smaller number for finer implantation histogram.
-
-
-
-
- E
-
-
- 2000
-
-
- The average implantation energy of the projectile.
-
-
-
-
- SigE
-
-
- 450
-
-
- The spread in implantation energy. For muons this is typically 400-450 eV. For Li8 this is practically zero.
-
-
-
-
- Angle
-
-
- 0
-
-
- The average implantation angle.
-
-
-
-
- SigAngle
-
-
- 15
-
-
- The spread in implantation angles.
-
-
-
-
- Seed
-
-
- 78741
-
-
- The random number generator seed.
-
-
-
-
-
-
-
-
-
groupBox1
@@ -997,157 +646,513 @@
-
+
- Help
-
-
-
- 505
- 450
- 80
- 30
-
-
-
-
- 7
- 7
- 0
- 0
-
-
-
- Help
-
-
-
-
- Start
-
-
-
- 595
- 450
- 80
- 30
-
-
-
-
- 7
- 7
- 0
- 0
-
-
-
- Start
-
-
-
-
- groupBox15
+ layout13
460
- 290
- 250
- 140
+ 0
+ 254
+ 490
-
- File Names
-
-
+
- layout14
+ unnamed
-
-
- 6
- 23
- 240
- 100
-
+
+ 0
-
+
+ 0
+
+
- unnamed
+ ProjParam
-
- 0
+
+ Projectile parameters
-
- 0
-
-
-
- textLabelFN
-
-
- File names prefix
-
-
-
-
- FNPre
-
-
- SrTiO3
-
-
- The names of the saved files will start with this prefix.
-
-
-
-
- textLabelPath
-
-
- Save in subdirectory
-
-
- layout13
+ layout8
-
+
+
+ 5
+ 25
+ 240
+ 260
+
+
+
unnamed
+
+ 0
+
+
+ 0
+
+
+
+ layout7
+
+
+
+ unnamed
+
+
+
+ textLabel1
+
+
+ Projectile
+
+
+ lineEdit3
+
+
+
+ -
+
+ Muon
+
+
+ -
+
+ Li8
+
+
+ -
+
+ B12
+
+
+
+ ProjType
+
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+
+ Choose the projectile type.
+
+
+
+
+
+
+ layout6
+
+
+
+ unnamed
+
+
+
+ layout5
+
+
+
+ unnamed
+
+
+ 0
+
+
+ 0
+
+
+
+ NLabel
+
+
+
+ 5
+ 5
+ 0
+ 0
+
+
+
+ Number of projectiles
+
+
+ lineEdit3_4
+
+
+
+
+ z0Label
+
+
+ Starting depth [Å]
+
+
+ lineEdit3_5
+
+
+
+
+ dzLabel
+
+
+ Depth increment [Å]
+
+
+ lineEdit3_5
+
+
+
+
+ ELabel
+
+
+ Energy [eV]
+
+
+ lineEdit3_6
+
+
+
+
+ SigELabel
+
+
+ Energy sigma [eV]
+
+
+ lineEdit3_7
+
+
+
+
+ AlbleLabel
+
+
+ Angle [deg]
+
+
+ lineEdit3_8
+
+
+
+
+ SigAngleLabel
+
+
+ Angle sigma [deg]
+
+
+ lineEdit3_9
+
+
+
+
+ SeedLabel
+
+
+ Random seed
+
+
+ lineEdit3
+
+
+
+
+
+
+ layout4
+
+
+
+ unnamed
+
+
+ 0
+
+
+
+ NProj
+
+
+
+ 7
+ 0
+ 0
+ 0
+
+
+
+
+ 32767
+ 32767
+
+
+
+ 10000
+
+
+ The number of projectiles to be implanted in the sample. Larger number better statistics.
+
+
+
+
+ z0
+
+
+
+ 32767
+ 32767
+
+
+
+ 0.0
+
+
+ Consider implanted projectiles starting from this depth.
+
+
+
+
+ dz
+
+
+ 10.0
+
+
+ The steps in implantation depth at which the number of stopped projectiles will be counted. Smaller number for finer implantation histogram.
+
+
+
+
+ E
+
+
+ 2000
+
+
+ The average implantation energy of the projectile.
+
+
+
+
+ SigE
+
+
+ 450
+
+
+ The spread in implantation energy. For muons this is typically 400-450 eV. For Li8 this is practically zero.
+
+
+
+
+ Angle
+
+
+ 0
+
+
+ The average implantation angle.
+
+
+
+
+ SigAngle
+
+
+ 15
+
+
+ The spread in implantation angles.
+
+
+
+
+ Seed
+
+
+ 78741
+
+
+ The random number generator seed.
+
+
+
+
+
+
+
+
+
+
+
+ groupBox15
+
+
+ File Names
+
+
+
+ layout14
+
+
+
+ 6
+ 23
+ 240
+ 100
+
+
+
+
+ unnamed
+
+
+ 0
+
+
+ 0
+
+
+
+ textLabelFN
+
+
+ File names prefix
+
+
- Path
+ FNPre
- ./
+ SrTiO3
- This is the path were the input/output files will be stored.
+ The names of the saved files will start with this prefix.
-
+
- Browse
-
-
-
- 7
- 0
- 0
- 0
-
+ textLabelPath
- Browse
+ Save in subdirectory
-
+
+
+ layout13
+
+
+
+ unnamed
+
+
+
+ Path
+
+
+ ./
+
+
+ This is the path were the input/output files will be stored.
+
+
+
+
+ Browse
+
+
+
+ 7
+ 0
+ 0
+ 0
+
+
+
+ Browse
+
+
+
+
+
-
-
+
+
+
+ layout12
+
+
+
+ unnamed
+
+
+
+ Help
+
+
+
+ 7
+ 7
+ 0
+ 0
+
+
+
+ Help
+
+
+
+
+ Start
+
+
+
+ 7
+ 7
+ 0
+ 0
+
+
+
+ Start
+
+
+
+
+ Quit
+
+
+
+ 7
+ 7
+ 0
+ 0
+
+
+
+ Quit
+
+
+ Quit the application.
+
+
+
+
+
@@ -2055,6 +2060,22 @@
+
+
+ Progress
+
+
+
+ 0
+ 525
+ 715
+ 20
+
+
+
+ WinPanel
+
+
@@ -2128,6 +2149,12 @@
TrimSPGUI
DirectoryBrowse()
+
+ Quit
+ clicked()
+ TrimSPGUI
+ ConfirmQuit()
+
TrimSPGUItabs.ui.h
@@ -2144,6 +2171,7 @@
CreateInpFile()
StartSequenceOne()
DirectoryBrowse()
+ ConfirmQuit()
diff --git a/trimsp/TrimSPGUI/TrimSPGUItabs.ui.h b/trimsp/TrimSPGUI/TrimSPGUItabs.ui.h
index fe77ad2..f0ce90f 100755
--- a/trimsp/TrimSPGUI/TrimSPGUItabs.ui.h
+++ b/trimsp/TrimSPGUI/TrimSPGUItabs.ui.h
@@ -13,7 +13,7 @@
void TrimSPGUI::ToggleScanSingle()
{
- # Toggle between scan/single run mode
+# Toggle between scan/single run mode
# First collect some information
my %All=();
@@ -23,7 +23,7 @@ void TrimSPGUI::ToggleScanSingle()
$All{"NProjRadio"}=NProjRadio->isChecked();
$All{"dRadio"}=dRadio->isChecked();
$All{"ScandL"}=ScandL->text();
-
+
# Enable everything
E->setDisabled(0);
E->setText("2000");
@@ -101,12 +101,43 @@ void TrimSPGUI::ProjSmartDefaults()
void TrimSPGUI::OpenHelpWindow()
{
- use trimhelp;
- my $w=trimhelp::NEW();
- $w->show;
-# $w->setFocus();
-# $w->setActiveWindow();
-# $w->raise();
+ my $HelpText="
+This is a GUI that uses the Trim.SP simulation binary to calculate the
+implantation profiles if implanted projectiles in a multilayer thin film
+structures.
+
+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()
@@ -176,10 +207,14 @@ void TrimSPGUI::CollectValues()
$All{"IPOT"}=sprintf("%3d",$All{"IPOT"});
$All{"IPOTR"}=sprintf("%3d",$All{"IPOTR"});
$All{"IRL"}=sprintf("%2d",$All{"IRL"});
-
+
# Filenames etc.
$All{"FNPre"}=FNPre->text();
$All{"Path"}=Path->text();
+ if ($All{"Path"} eq "./") {
+ Path -> setText($ENV{'PWD'});
+ $All{"Path"}=Path->text();
+ }
# Scan parameters only if selected
$All{"ScanSeq"}=ScanSeq->isChecked();
@@ -204,7 +239,8 @@ void TrimSPGUI::CollectValues()
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;
# The proper way I think is not to have scan sequences implimented here
# but rather call this multiple times to generate the scan
@@ -336,6 +372,7 @@ void TrimSPGUI::CreateInpFile()
if ($Check!=0 && $i<=$All{"NL"}) {
my $ErrMsg="Error: Layer $i is empty. Expecting it to be defined!\n";
print STDERR $ErrMsg;
+ my $HelpWindow = Qt::MessageBox::information( this, "Error!",$ErrMsg);
# my $ErrorDialog = Qt::ErrorMessage(TrimSPGUI);
# $ErrorDialog->message($ErrMsg);
return "ERROR";
@@ -352,7 +389,7 @@ void TrimSPGUI::CreateInpFile()
# print STDOUT "Layer: ".$i."\n";
# print STDOUT "Composition: ".$Comp."\n";
-
+
my @Els = keys %LElComp;
for (my $NEl=1;$NEl<=5;$NEl++) {
@@ -399,12 +436,20 @@ void TrimSPGUI::StartSequenceOne()
my %All = CollectValues();
my @SValues=();
my $cmd="";
-# Create a subdirectory where all input/output files are saved
- $cmd="mkdir ".$All{"Path"};
- system($cmd);
-# Cleanup from old files
- system("rm -f ausgabe*");
+# Create a subdirectory where all input/output files are saved
+ if (-d $All{"Path"}) {
+# Directory exists, do nothing
+ } else {
+ $cmd="mkdir ".$All{"Path"};
+ system($cmd);
+ }
+# Cleanup from old files
+ if (-e "ausgabe1.inp") {
+ system("rm -f ausgabe*");
+ }
+
+ my $Progress=0;
if ($All{"ScanSeq"}) {
# For a scan
$All{"ERadio"}=ERadio->isChecked();
@@ -425,7 +470,7 @@ void TrimSPGUI::StartSequenceOne()
@SValues=(@SValues,$Val);
}
}
-
+
my $ScanName = "";
if ($All{"ERadio"}) {
$ScanName = "E";
@@ -438,9 +483,7 @@ void TrimSPGUI::StartSequenceOne()
}
my $ScanAttrib = child($ScanName);
- my $Progress=0;
foreach (@SValues) {
- $Progress=$Progress+100/$#SValues;
$ScanAttrib->setText($_);
my $eingabe1=CreateInpFile();
if ($eingabe1 eq "ERROR") {return 0;}
@@ -451,7 +494,9 @@ void TrimSPGUI::StartSequenceOne()
# Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
# 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);
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
@@ -467,18 +512,46 @@ void TrimSPGUI::StartSequenceOne()
open (INPF,q{>}, "$FILENAME.inp" );
print INPF $eingabe1;
close(INPF);
+ $Progress=20;
+ Progress->setProgress($Progress);
+
# Use windoz version
# system("cp $FILENAME.inp eingabe1.inp; wine TrimSP7L.exe");
-# Use Linux version
- system("cp $FILENAME.inp eingabe1.inp; trimsp7l");
+# Use Linux version
+ $cmd = "cp $FILENAME.inp eingabe1.inp; ".$ENV{'TRIMBIN'};
+ system($cmd);
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
}
+ $Progress=90;
+ Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
}
# 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);
- 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";
+}