Added save/load or an initialization file for GUI parameters.

This commit is contained in:
2010-08-06 09:12:51 +00:00
parent b8d6f23a80
commit 840273d9c1

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'TrimSPGUI.ui'
#
# Created: Fri Aug 6 11:08:54 2010
# Created: Fri Aug 6 11:12:44 2010
# by: The PerlQt User Interface Compiler (puic)
#
# WARNING! All changes made in this file will be lost!
@ -2639,7 +2639,7 @@ sub OpenFile
this,
"open file dialog",
"Choose an initialization file");
print "Selected file: $file\n";
# If the user gave a valid filename try to read it
if ($file ne "") {
open (INF,q{<},"$file" );
@ -2729,8 +2729,8 @@ STo=$All{'STo'}
SStep=$All{'SStep'}
";
# Save to default file name ".TriumSP"
my $file = ".TrimSP";
# Save to default file name "TriumSP.cfg"
my $file = "TrimSP.cfg";
open (OUTF,q{>},"$file" );
print OUTF (" $InitFile");
close(OUTF);
@ -2796,8 +2796,8 @@ STo=$All{'STo'}
SStep=$All{'SStep'}
";
my $file=Qt::FileDialog::getSaveFileName(
".TrimSP",
"TrimSP GUI Initialization file (* .* *.*)",
"TrimSP.cfg",
"TrimSP GUI Initialization file (*.cfg)",
this,
"save file dialog",
"Choose a filename to save under");