Starting export parameters implimentation
This commit is contained in:
parent
316a72d610
commit
7b0154f131
97
src/external/MuSRFitGUI/devel/MuSRFit.pl
vendored
97
src/external/MuSRFitGUI/devel/MuSRFit.pl
vendored
@ -1,6 +1,6 @@
|
|||||||
# Form implementation generated from reading ui file 'MuSRFit.ui'
|
# Form implementation generated from reading ui file 'MuSRFit.ui'
|
||||||
#
|
#
|
||||||
# Created: Thu Sep 10 17:43:10 2009
|
# Created: Fri Sep 11 15:56:45 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!
|
||||||
@ -19,6 +19,8 @@ use Qt::slots
|
|||||||
fileChangeDir => [],
|
fileChangeDir => [],
|
||||||
filePrint => [],
|
filePrint => [],
|
||||||
fileExit => [],
|
fileExit => [],
|
||||||
|
parametersExport => [],
|
||||||
|
parametersAppend => [],
|
||||||
editUndo => [],
|
editUndo => [],
|
||||||
editRedo => [],
|
editRedo => [],
|
||||||
editCut => [],
|
editCut => [],
|
||||||
@ -188,6 +190,7 @@ use Qt::attributes qw(
|
|||||||
FunctionsBlock
|
FunctionsBlock
|
||||||
MenuBar
|
MenuBar
|
||||||
fileMenu
|
fileMenu
|
||||||
|
Parameters
|
||||||
editMenu
|
editMenu
|
||||||
Options
|
Options
|
||||||
helpMenu
|
helpMenu
|
||||||
@ -215,6 +218,8 @@ use Qt::attributes qw(
|
|||||||
Action_2
|
Action_2
|
||||||
Action_3
|
Action_3
|
||||||
optionsnew_itemAction
|
optionsnew_itemAction
|
||||||
|
parametersExport_AsAction
|
||||||
|
parametersAppend_ToAction
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -580,7 +585,7 @@ sub NEW
|
|||||||
setName("MuSRFitform" );
|
setName("MuSRFitform" );
|
||||||
}
|
}
|
||||||
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
|
setSizePolicy(Qt::SizePolicy(3, 3, 1, 1, this->sizePolicy()->hasHeightForWidth()) );
|
||||||
setMinimumSize(Qt::Size(21, 227) );
|
setMinimumSize(Qt::Size(21, 251) );
|
||||||
setIcon($image0 );
|
setIcon($image0 );
|
||||||
|
|
||||||
setCentralWidget(Qt::Widget(this, "qt_central_widget"));
|
setCentralWidget(Qt::Widget(this, "qt_central_widget"));
|
||||||
@ -1665,6 +1670,8 @@ sub NEW
|
|||||||
Action_2= Qt::Action(this, "Action_2");
|
Action_2= Qt::Action(this, "Action_2");
|
||||||
Action_3= Qt::Action(this, "Action_3");
|
Action_3= Qt::Action(this, "Action_3");
|
||||||
optionsnew_itemAction= Qt::Action(this, "optionsnew_itemAction");
|
optionsnew_itemAction= Qt::Action(this, "optionsnew_itemAction");
|
||||||
|
parametersExport_AsAction= Qt::Action(this, "parametersExport_AsAction");
|
||||||
|
parametersAppend_ToAction= Qt::Action(this, "parametersAppend_ToAction");
|
||||||
|
|
||||||
|
|
||||||
toolBar = Qt::ToolBar("", this, &DockTop);
|
toolBar = Qt::ToolBar("", this, &DockTop);
|
||||||
@ -1690,6 +1697,11 @@ sub NEW
|
|||||||
fileExitAction->addTo( fileMenu );
|
fileExitAction->addTo( fileMenu );
|
||||||
MenuBar->insertItem( "", fileMenu, 2 );
|
MenuBar->insertItem( "", fileMenu, 2 );
|
||||||
|
|
||||||
|
Parameters = Qt::PopupMenu( this );
|
||||||
|
parametersExport_AsAction->addTo( Parameters );
|
||||||
|
parametersAppend_ToAction->addTo( Parameters );
|
||||||
|
MenuBar->insertItem( "", Parameters, 3 );
|
||||||
|
|
||||||
editMenu = Qt::PopupMenu( this );
|
editMenu = Qt::PopupMenu( this );
|
||||||
editUndoAction->addTo( editMenu );
|
editUndoAction->addTo( editMenu );
|
||||||
editRedoAction->addTo( editMenu );
|
editRedoAction->addTo( editMenu );
|
||||||
@ -1697,21 +1709,21 @@ sub NEW
|
|||||||
editCutAction->addTo( editMenu );
|
editCutAction->addTo( editMenu );
|
||||||
editCopyAction->addTo( editMenu );
|
editCopyAction->addTo( editMenu );
|
||||||
editPasteAction->addTo( editMenu );
|
editPasteAction->addTo( editMenu );
|
||||||
MenuBar->insertItem( "", editMenu, 3 );
|
MenuBar->insertItem( "", editMenu, 4 );
|
||||||
|
|
||||||
Options = Qt::PopupMenu( this );
|
Options = Qt::PopupMenu( this );
|
||||||
FileExistCheck->addTo( Options );
|
FileExistCheck->addTo( Options );
|
||||||
ManualFile->addTo( Options );
|
ManualFile->addTo( Options );
|
||||||
MenuBar->insertItem( "", Options, 4 );
|
MenuBar->insertItem( "", Options, 5 );
|
||||||
|
|
||||||
helpMenu = Qt::PopupMenu( this );
|
helpMenu = Qt::PopupMenu( this );
|
||||||
helpContentsAction->addTo( helpMenu );
|
helpContentsAction->addTo( helpMenu );
|
||||||
helpIndexAction->addTo( helpMenu );
|
helpIndexAction->addTo( helpMenu );
|
||||||
helpMenu->insertSeparator();
|
helpMenu->insertSeparator();
|
||||||
helpAboutAction->addTo( helpMenu );
|
helpAboutAction->addTo( helpMenu );
|
||||||
MenuBar->insertItem( "", helpMenu, 5 );
|
MenuBar->insertItem( "", helpMenu, 6 );
|
||||||
|
|
||||||
MenuBar->insertSeparator( 6 );
|
MenuBar->insertSeparator( 7 );
|
||||||
|
|
||||||
languageChange();
|
languageChange();
|
||||||
my $resize = Qt::Size(579, 497);
|
my $resize = Qt::Size(579, 497);
|
||||||
@ -1742,6 +1754,8 @@ sub NEW
|
|||||||
Qt::Object::connect(PlotMSR_2, SIGNAL "pressed()", this, SLOT "GoPlot()");
|
Qt::Object::connect(PlotMSR_2, SIGNAL "pressed()", this, SLOT "GoPlot()");
|
||||||
Qt::Object::connect(Browse, SIGNAL "clicked()", this, SLOT "fileBrowse()");
|
Qt::Object::connect(Browse, SIGNAL "clicked()", this, SLOT "fileBrowse()");
|
||||||
Qt::Object::connect(BeamLine, SIGNAL "activated(int)", this, SLOT "T0Update()");
|
Qt::Object::connect(BeamLine, SIGNAL "activated(int)", this, SLOT "T0Update()");
|
||||||
|
Qt::Object::connect(parametersExport_AsAction, SIGNAL "activated()", this, SLOT "parametersExport()");
|
||||||
|
Qt::Object::connect(parametersAppend_ToAction, SIGNAL "activated()", this, SLOT "parametersAppend()");
|
||||||
|
|
||||||
setTabOrder(musrfit_tabs, RunNumbers);
|
setTabOrder(musrfit_tabs, RunNumbers);
|
||||||
setTabOrder(RunNumbers, BeamLine);
|
setTabOrder(RunNumbers, BeamLine);
|
||||||
@ -2040,8 +2054,8 @@ sub languageChange
|
|||||||
fileOpenAction->setText( trUtf8("&Open MSR...") );
|
fileOpenAction->setText( trUtf8("&Open MSR...") );
|
||||||
fileOpenAction->setMenuText( trUtf8("&Open MSR...") );
|
fileOpenAction->setMenuText( trUtf8("&Open MSR...") );
|
||||||
fileOpenAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+O") ) );
|
fileOpenAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+O") ) );
|
||||||
fileSaveAction->setText( trUtf8("&Save MSR") );
|
fileSaveAction->setText( trUtf8("&Save MSR...") );
|
||||||
fileSaveAction->setMenuText( trUtf8("&Save MSR") );
|
fileSaveAction->setMenuText( trUtf8("&Save MSR...") );
|
||||||
fileSaveAction->setStatusTip( trUtf8("&Save MSR") );
|
fileSaveAction->setStatusTip( trUtf8("&Save MSR") );
|
||||||
fileSaveAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+S") ) );
|
fileSaveAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+S") ) );
|
||||||
fileSaveAsAction->setText( trUtf8("Save MSR &As...") );
|
fileSaveAsAction->setText( trUtf8("Save MSR &As...") );
|
||||||
@ -2096,11 +2110,16 @@ sub languageChange
|
|||||||
Action_3->setText( trUtf8("Unnamed") );
|
Action_3->setText( trUtf8("Unnamed") );
|
||||||
optionsnew_itemAction->setText( trUtf8("new item") );
|
optionsnew_itemAction->setText( trUtf8("new item") );
|
||||||
optionsnew_itemAction->setMenuText( trUtf8("new item") );
|
optionsnew_itemAction->setMenuText( trUtf8("new item") );
|
||||||
|
parametersExport_AsAction->setText( trUtf8("&Export As...") );
|
||||||
|
parametersExport_AsAction->setMenuText( trUtf8("&Export As...") );
|
||||||
|
parametersAppend_ToAction->setText( trUtf8("&Append To...") );
|
||||||
|
parametersAppend_ToAction->setMenuText( trUtf8("&Append To...") );
|
||||||
toolBar->setLabel( trUtf8("Tools") );
|
toolBar->setLabel( trUtf8("Tools") );
|
||||||
MenuBar->findItem( 2 )->setText( trUtf8("&File") );
|
MenuBar->findItem( 2 )->setText( trUtf8("&File") );
|
||||||
MenuBar->findItem( 3 )->setText( trUtf8("&Edit") );
|
MenuBar->findItem( 3 )->setText( trUtf8("Parameters") );
|
||||||
MenuBar->findItem( 4 )->setText( trUtf8("Options") );
|
MenuBar->findItem( 4 )->setText( trUtf8("&Edit") );
|
||||||
MenuBar->findItem( 5 )->setText( trUtf8("&Help") );
|
MenuBar->findItem( 5 )->setText( trUtf8("Options") );
|
||||||
|
MenuBar->findItem( 6 )->setText( trUtf8("&Help") );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2175,6 +2194,62 @@ sub fileExit
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub parametersExport
|
||||||
|
{
|
||||||
|
|
||||||
|
my %All=CreateAllInput();
|
||||||
|
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||||
|
my $file=Qt::FileDialog::getSaveFileName(
|
||||||
|
"$FILENAME",
|
||||||
|
"Data Files (*.dat)",
|
||||||
|
this,
|
||||||
|
"export file dialog",
|
||||||
|
"Choose a filename to export to");
|
||||||
|
|
||||||
|
# If the user gave a filename the copy to it
|
||||||
|
if ($file ne "") {
|
||||||
|
# TODO: check if the extension is correct, or add it.
|
||||||
|
if (-e $FILENAME) {
|
||||||
|
# my $cmd="cp $FILENAME $file";
|
||||||
|
# my $pid=system($cmd);
|
||||||
|
} else {
|
||||||
|
if ($file ne "") {
|
||||||
|
# my $Warning = "Warning: No MSR file found yet!";
|
||||||
|
# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sub parametersAppend
|
||||||
|
{
|
||||||
|
|
||||||
|
my %All=CreateAllInput();
|
||||||
|
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||||
|
my $file=Qt::FileDialog::getSaveFileName(
|
||||||
|
"$FILENAME",
|
||||||
|
"Data Files (*.dat)",
|
||||||
|
this,
|
||||||
|
"append file dialog",
|
||||||
|
"Choose a filename to append to");
|
||||||
|
|
||||||
|
# If the user gave a filename the copy to it
|
||||||
|
if ($file ne "") {
|
||||||
|
# TODO: check if the extension is correct, or add it.
|
||||||
|
if (-e $FILENAME) {
|
||||||
|
# my $cmd="cp $FILENAME $file";
|
||||||
|
# my $pid=system($cmd);
|
||||||
|
} else {
|
||||||
|
if ($file ne "") {
|
||||||
|
# my $Warning = "Warning: No MSR file found yet!";
|
||||||
|
# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
sub editUndo
|
sub editUndo
|
||||||
{
|
{
|
||||||
print "MuSRFitform->editUndo(): Not implemented yet.\n";
|
print "MuSRFitform->editUndo(): Not implemented yet.\n";
|
||||||
|
46
src/external/MuSRFitGUI/devel/MuSRFit.ui
vendored
46
src/external/MuSRFitGUI/devel/MuSRFit.ui
vendored
@ -23,7 +23,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>21</width>
|
<width>21</width>
|
||||||
<height>227</height>
|
<height>251</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
<property name="caption">
|
||||||
@ -4526,6 +4526,10 @@
|
|||||||
<separator/>
|
<separator/>
|
||||||
<action name="fileExitAction"/>
|
<action name="fileExitAction"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item text="Parameters" name="Parameters">
|
||||||
|
<action name="parametersExport_AsAction"/>
|
||||||
|
<action name="parametersAppend_ToAction"/>
|
||||||
|
</item>
|
||||||
<item text="&Edit" name="editMenu">
|
<item text="&Edit" name="editMenu">
|
||||||
<action name="editUndoAction"/>
|
<action name="editUndoAction"/>
|
||||||
<action name="editRedoAction"/>
|
<action name="editRedoAction"/>
|
||||||
@ -4607,10 +4611,10 @@
|
|||||||
<iconset>image3</iconset>
|
<iconset>image3</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Save MSR</string>
|
<string>&Save MSR...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="menuText">
|
<property name="menuText">
|
||||||
<string>&Save MSR</string>
|
<string>&Save MSR...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="statusTip">
|
||||||
<string>&Save MSR</string>
|
<string>&Save MSR</string>
|
||||||
@ -4929,6 +4933,28 @@
|
|||||||
<string>new item</string>
|
<string>new item</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>parametersExport_AsAction</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Export As...</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuText">
|
||||||
|
<string>&Export As...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>parametersAppend_ToAction</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>&Append To...</string>
|
||||||
|
</property>
|
||||||
|
<property name="menuText">
|
||||||
|
<string>&Append To...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</actions>
|
</actions>
|
||||||
<images>
|
<images>
|
||||||
<image name="image0">
|
<image name="image0">
|
||||||
@ -5104,6 +5130,18 @@
|
|||||||
<receiver>MuSRFitform</receiver>
|
<receiver>MuSRFitform</receiver>
|
||||||
<slot>T0Update()</slot>
|
<slot>T0Update()</slot>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>parametersExport_AsAction</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>MuSRFitform</receiver>
|
||||||
|
<slot>parametersExport()</slot>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>parametersAppend_ToAction</sender>
|
||||||
|
<signal>activated()</signal>
|
||||||
|
<receiver>MuSRFitform</receiver>
|
||||||
|
<slot>parametersAppend()</slot>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>musrfit_tabs</tabstop>
|
<tabstop>musrfit_tabs</tabstop>
|
||||||
@ -5194,6 +5232,8 @@
|
|||||||
<slot>fileChangeDir()</slot>
|
<slot>fileChangeDir()</slot>
|
||||||
<slot>filePrint()</slot>
|
<slot>filePrint()</slot>
|
||||||
<slot>fileExit()</slot>
|
<slot>fileExit()</slot>
|
||||||
|
<slot>parametersExport()</slot>
|
||||||
|
<slot>parametersAppend()</slot>
|
||||||
<slot>editUndo()</slot>
|
<slot>editUndo()</slot>
|
||||||
<slot>editRedo()</slot>
|
<slot>editRedo()</slot>
|
||||||
<slot>editCut()</slot>
|
<slot>editCut()</slot>
|
||||||
|
55
src/external/MuSRFitGUI/devel/MuSRFit.ui.h
vendored
55
src/external/MuSRFitGUI/devel/MuSRFit.ui.h
vendored
@ -93,6 +93,59 @@ void Form1::fileExit()
|
|||||||
Qt::Application::exit( 0 );
|
Qt::Application::exit( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Form1::parametersExport()
|
||||||
|
{
|
||||||
|
my %All=CreateAllInput();
|
||||||
|
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||||
|
my $file=Qt::FileDialog::getSaveFileName(
|
||||||
|
"$FILENAME",
|
||||||
|
"Data Files (*.dat)",
|
||||||
|
this,
|
||||||
|
"export file dialog",
|
||||||
|
"Choose a filename to export to");
|
||||||
|
|
||||||
|
# If the user gave a filename the copy to it
|
||||||
|
if ($file ne "") {
|
||||||
|
# TODO: check if the extension is correct, or add it.
|
||||||
|
if (-e $FILENAME) {
|
||||||
|
# my $cmd="cp $FILENAME $file";
|
||||||
|
# my $pid=system($cmd);
|
||||||
|
} else {
|
||||||
|
if ($file ne "") {
|
||||||
|
# my $Warning = "Warning: No MSR file found yet!";
|
||||||
|
# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Form1::parametersAppend()
|
||||||
|
{
|
||||||
|
my %All=CreateAllInput();
|
||||||
|
my $FILENAME=$All{"FILENAME"}.".dat";
|
||||||
|
my $file=Qt::FileDialog::getSaveFileName(
|
||||||
|
"$FILENAME",
|
||||||
|
"Data Files (*.dat)",
|
||||||
|
this,
|
||||||
|
"append file dialog",
|
||||||
|
"Choose a filename to append to");
|
||||||
|
|
||||||
|
# If the user gave a filename the copy to it
|
||||||
|
if ($file ne "") {
|
||||||
|
# TODO: check if the extension is correct, or add it.
|
||||||
|
if (-e $FILENAME) {
|
||||||
|
# my $cmd="cp $FILENAME $file";
|
||||||
|
# my $pid=system($cmd);
|
||||||
|
} else {
|
||||||
|
if ($file ne "") {
|
||||||
|
# my $Warning = "Warning: No MSR file found yet!";
|
||||||
|
# my $WarningWindow = Qt::MessageBox::information( this, "Warning",$Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Form1::editUndo()
|
void Form1::editUndo()
|
||||||
{
|
{
|
||||||
@ -702,3 +755,5 @@ void MuSRFitform::fileBrowse()
|
|||||||
RunFiles->setText($RunFiles);
|
RunFiles->setText($RunFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user