added mupp actions to musredit.

This commit is contained in:
2018-06-10 12:50:09 +02:00
parent 89b7eb8faa
commit f07667ef25
6 changed files with 455 additions and 4 deletions

View File

@ -718,6 +718,22 @@ void PTextEdit::setupMusrActions()
}
tb->addAction(a);
if (fDarkTheme)
iconName = QString(":/icons/mupp-dark.svg");
else
iconName = QString(":/icons/mupp-plain.svg");
a = new QAction( QIcon( QPixmap(iconName) ), tr( "m&upp" ), this );
a->setShortcut( tr("Alt+U") );
a->setStatusTip( tr("Start mupp, the muSR parameter plotter") );
connect( a, SIGNAL( triggered() ), this, SLOT( mupp() ) );
menu->addAction(a);
if (!fDarkToolBarIcon) { // tool bar icon is not dark, even though the theme is (ubuntu)
iconName = QString(":/icons/mupp-plain.svg");
a = new QAction( QIcon( QPixmap(iconName) ), tr( "m&upp" ), this );
connect( a, SIGNAL( triggered() ), this, SLOT( mupp() ) );
}
tb->addAction(a);
menu->addSeparator();
tb->addSeparator();
@ -2395,7 +2411,7 @@ void PTextEdit::musrView()
tr("Quit") );
return;
}
}
}
//----------------------------------------------------------------------------------------------------
/**
@ -2531,6 +2547,9 @@ void PTextEdit::musrPrefs()
}
//----------------------------------------------------------------------------------------------------
/**
* @brief PTextEdit::musrSetSteps
*/
void PTextEdit::musrSetSteps()
{
if ( !currentEditor() )
@ -2717,6 +2736,37 @@ void PTextEdit::musrDump()
dumpOutputHandler.exec();
}
//----------------------------------------------------------------------------------------------------
/**
* @brief PTextEdit::mupp
* <p>Calls mupp, the muSR parameter plotter.
*/
void PTextEdit::mupp()
{
QString cmd("");
cmd = fAdmin->getExecPath() + "/mupp";
QProcess *proc = new QProcess(this);
QString workDir = QFileInfo(*fFilenames.find( currentEditor() )).absolutePath();
// make sure that the system environment variables are properly set
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
env.insert("LD_LIBRARY_PATH", env.value("ROOTSYS") + "/lib:" + env.value("LD_LIBRARY_PATH"));
proc->setProcessEnvironment(env);
proc->setWorkingDirectory(workDir);
proc->start(cmd);
if (!proc->waitForStarted()) {
// error handling
QString msg(tr("Could not execute the output command: ")+cmd);
QMessageBox::critical( 0,
tr("Fatal error"),
msg,
tr("Quit") );
return;
}
}
//----------------------------------------------------------------------------------------------------
/**
* <p>Starts the help content browser.

View File

@ -137,6 +137,7 @@ private slots:
void musrSwapMsrMlog();
void musrSetSteps();
void musrDump();
void mupp();
void helpContents();
void helpAboutQt();

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>395</width>
<height>202</height>
<height>225</height>
</rect>
</property>
<property name="windowTitle">
@ -17,13 +17,13 @@
<iconset>
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
</property>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>13</x>
<y>13</y>
<width>371</width>
<height>181</height>
<height>201</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">

View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="23.466667"
height="23.466667"
viewBox="0 0 22.000001 22"
id="svg2"
version="1.1"
inkscape:version="0.92+devel unknown"
sodipodi:docname="mupp-dark.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="31.054545"
inkscape:cx="5.4476376"
inkscape:cy="11.674682"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="pt"
inkscape:window-width="1920"
inkscape:window-height="1019"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid5486"
originx="0"
originy="0"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1030.3622)">
<g
id="g7616"
transform="translate(0.37499988,12.0625)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1"
transform="translate(4.1249999,11.125)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8"
transform="translate(7.8749999,12.0625)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-3"
transform="translate(10.6875,4.9999999)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-5"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-8"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-5"
transform="translate(13.5,-0.12499951)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-6"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-7"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-2"
transform="translate(17.25,-1.9999995)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-60"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-0"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<text
xml:space="preserve"
style="font-size:15.00000002px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.9375;"
x="3"
y="1042.3622"
id="text4610"><tspan
sodipodi:role="line"
id="tspan4608"
x="3"
y="1064.4813"
style="stroke-width:0.9375;font-size:15.00000002px;" /></text>
<text
xml:space="preserve"
style="font-size:12.50000001px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.9375;"
x="1.9999999"
y="1050.3622"
id="text4614"><tspan
sodipodi:role="line"
id="tspan4612"
x="1.9999999"
y="1072.4813"
style="stroke-width:0.9375;font-size:12.50000001px;" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;stroke-width:0.9375;fill:#f2f2f2;fill-opacity:1;"
x="-0.53466797"
y="1042.3309"
id="text4618"><tspan
sodipodi:role="line"
id="tspan4616"
x="-0.53466797"
y="1042.3309"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.9375;fill:#f2f2f2;fill-opacity:1;">P</tspan></text>
<path
style="fill:none;stroke:#f2f2f2;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.21875,1045.3622 4,3 -4,3 v 0"
id="path4624"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="23.466667"
height="23.466667"
viewBox="0 0 22.000001 22"
id="svg2"
version="1.1"
inkscape:version="0.92+devel unknown"
sodipodi:docname="mupp-plain.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="31.054545"
inkscape:cx="5.4476376"
inkscape:cy="11.674682"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="pt"
inkscape:window-width="1920"
inkscape:window-height="1019"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid5486"
originx="0"
originy="0"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1030.3622)">
<g
id="g7616"
transform="translate(0.37499988,12.0625)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1"
transform="translate(4.1249999,11.125)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8"
transform="translate(7.8749999,12.0625)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-3"
transform="translate(10.6875,4.9999999)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-5"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-8"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-5"
transform="translate(13.5,-0.12499951)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-6"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-7"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
id="g7616-1-8-2"
transform="translate(17.25,-1.9999995)">
<circle
r="0.77277893"
cy="1036.3622"
cx="3.0000002"
id="path3626-0-7-60"
style="fill:#da4453;fill-opacity:1;fill-rule:evenodd;stroke:#da4453;stroke-width:1.45444238;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path7403-7-3-0"
d="m 3.0000002,1033.3622 v 6"
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<text
xml:space="preserve"
style="font-size:15.00000002px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.9375;"
x="3"
y="1042.3622"
id="text4610"><tspan
sodipodi:role="line"
id="tspan4608"
x="3"
y="1064.4813"
style="stroke-width:0.9375;font-size:15.00000002px;" /></text>
<text
xml:space="preserve"
style="font-size:12.50000001px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;stroke-width:0.9375;"
x="1.9999999"
y="1050.3622"
id="text4614"><tspan
sodipodi:role="line"
id="tspan4612"
x="1.9999999"
y="1072.4813"
style="stroke-width:0.9375;font-size:12.50000001px;" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;stroke-width:0.9375"
x="-0.53466797"
y="1042.3309"
id="text4618"><tspan
sodipodi:role="line"
id="tspan4616"
x="-0.53466797"
y="1042.3309"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.9375">P</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.9375px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 16.21875,1045.3622 4,3 -4,3 v 0"
id="path4624"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -50,6 +50,8 @@
<file>icons/musrFT-dark.svg</file>
<file>icons/musrdump-plain.svg</file>
<file>icons/musrdump-dark.svg</file>
<file>icons/mupp-plain.svg</file>
<file>icons/mupp-dark.svg</file>
<file>latex_images/abragam.png</file>
<file>latex_images/asymmetry.png</file>
<file>latex_images/bessel.png</file>