48#include <QDesktopServices>
93 fTheoryFunction_comboBox->setIconSize(QSize(250, 20));
97 for (
unsigned int i=0; i<
fAdmin->getTheoryCounts(); i++) {
98 theoItem =
fAdmin->getTheoryItem(i);
100 iconName = QString(
":/latex_images/") + theoItem->
pixmapName;
101 icon =
new QIcon(QPixmap(iconName));
102 fTheoryFunction_comboBox->insertItem(i, *icon, theoItem->
label);
104 fTheoryFunction_comboBox->insertItem(i, theoItem->
label);
147 QString str =
"????";
148 int idx = fTheoryFunction_comboBox->currentIndex();
154 str = theoItem->
name +
" ";
155 if (theoItem->
name ==
"userFcn") {
156 str +=
"libMyLibrary.so TMyFunction ";
159 for (
int i=0; i<theoItem->
params; i++) {
160 str += QString(
"%1").arg(i+1) +
" ";
195 fTheoryBlock_plainTextEdit->appendPlainText(str);
225 fTheoryBlock_plainTextEdit->appendPlainText(str);
253 QMessageBox::information(
this,
"INFO",
"Will eventually show a help window");
255 bool ok = QDesktopServices::openUrl(QUrl(
fHelpUrl, QUrl::TolerantMode));
257 QString msg = QString(
"<p>Sorry: Couldn't open default web-browser for the help.<br>Please try: <a href=\"%1\">musrfit docu</a> in your web-browser.").arg(
fHelpUrl);
258 QMessageBox::critical(
nullptr, tr(
"FATAL ERROR"), msg, QMessageBox::Close );
Dialog for creating THEORY blocks in msr files.
Central administration class for musredit configuration management.
QString getTheoFuncString()
Generates the theory function string for the selected function.
void addPlus()
Adds the selected function followed by a '+' operator.
PAdmin * fAdmin
Pointer to the administration object for accessing theory function definitions.
QString fHelpUrl
URL to the online documentation for THEORY blocks.
void helpContent()
Opens the online help for THEORY blocks.
PGetTheoryBlockDialog(PAdmin *admin=0, const QString helpUrl="")
Constructs a dialog for creating THEORY blocks.
void addMultiply()
Adds the selected function (multiplication with next line).
Structure holding information about a musrfit theory function.
QString name
Internal function name used in msr files (e.g., "asymmetry", "simplExpo").
QString comment
Human-readable description of the theory function.
QString label
Short label for GUI menus and buttons.
int params
Number of parameters required by this theory function.
QString pixmapName
Filename of the pixmap image showing the mathematical formula.