Added save/load or an initialization file for GUI parameters.
This commit is contained in:
@ -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,8 +2639,8 @@ 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 the user gave a valid filename try to read it
|
||||
if ($file ne "") {
|
||||
open (INF,q{<},"$file" );
|
||||
my @lines = <INF>;
|
||||
@ -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");
|
||||
|
Reference in New Issue
Block a user