mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
added support for persistante parameters. WARNING!!! please, note that at this moment the code may not compile. It will compile again as soon as I will finish to merge the all the changed files
This commit is contained in:
parent
6a0eedad1b
commit
e5718ad240
@ -39,11 +39,18 @@ void ParamGeneratorGUI::collectInfo( MLXMLParamSubTree& param )
|
||||
param.paraminfo[MLXMLElNames::paramType] += " " + enumnames->text();
|
||||
param.paraminfo[MLXMLElNames::paramName] = pname->text();
|
||||
param.paraminfo[MLXMLElNames::paramDefExpr] = pdefault->text();
|
||||
QString isimp("false");
|
||||
|
||||
QString isimp("false");
|
||||
if (pisimp->isChecked())
|
||||
isimp = "true";
|
||||
param.paraminfo[MLXMLElNames::paramIsImportant] = isimp;
|
||||
param.paraminfo[MLXMLElNames::paramHelpTag] = UsefulGUIFunctions::avoidProblemsWithHTMLTagInsideXML(phel->toPlainText());
|
||||
param.paraminfo[MLXMLElNames::paramIsImportant] = isimp;
|
||||
|
||||
QString ispers("false");
|
||||
if (pispers->isChecked())
|
||||
isimp = "true";
|
||||
param.paraminfo[MLXMLElNames::paramIsPersistent] = ispers;
|
||||
|
||||
param.paraminfo[MLXMLElNames::paramHelpTag] = UsefulGUIFunctions::avoidProblemsWithHTMLTagInsideXML(phel->toPlainText());
|
||||
param.gui.guiinfo[MLXMLElNames::guiType] = pguitype->currentText();
|
||||
param.gui.guiinfo[MLXMLElNames::guiLabel] = pguilab->text();
|
||||
param.gui.guiinfo[MLXMLElNames::guiMinExpr] = pguimin->text();
|
||||
@ -80,6 +87,8 @@ void ParamGeneratorGUI::initUI()
|
||||
pdefault = new QLineEdit(this);
|
||||
pisimp = new QCheckBox("isImportant",this);
|
||||
pisimp->setCheckState(Qt::Checked);
|
||||
pispers = new QCheckBox("isPersistent", this);
|
||||
pispers->setCheckState(Qt::Unchecked);
|
||||
//QLabel* hlab = new QLabel("Help",this);
|
||||
QGroupBox* gpbox = new QGroupBox("Parameter Help",this);
|
||||
QGridLayout* laybox = new QGridLayout();
|
||||
@ -174,10 +183,16 @@ void ParamGeneratorGUI::importInfo( const MLXMLParamSubTree& tree )
|
||||
pname->setText(tree.paraminfo[MLXMLElNames::paramName]);
|
||||
pdefault->setText(tree.paraminfo[MLXMLElNames::paramDefExpr]);
|
||||
phel->setPlainText(tree.paraminfo[MLXMLElNames::paramHelpTag]);
|
||||
bool check = true;
|
||||
bool isimpcheck = true;
|
||||
if (tree.paraminfo[MLXMLElNames::paramIsImportant].trimmed() == QString("false"))
|
||||
check = false;
|
||||
pisimp->setChecked(check);
|
||||
isimpcheck = false;
|
||||
pisimp->setChecked(isimpcheck);
|
||||
|
||||
bool isperscheck = true;
|
||||
if (tree.paraminfo[MLXMLElNames::paramIsPersistent].trimmed() == QString("false"))
|
||||
isperscheck = false;
|
||||
pispers->setChecked(isperscheck);
|
||||
|
||||
QString guity = tree.gui.guiinfo[MLXMLElNames::guiType];
|
||||
pguitype->setCurrentIndex(pguitype->findText(guity));
|
||||
pguilab->setText(tree.gui.guiinfo[MLXMLElNames::guiLabel]);
|
||||
|
||||
@ -57,6 +57,7 @@ private:
|
||||
QLineEdit* pname;
|
||||
QLineEdit* pdefault;
|
||||
QCheckBox* pisimp;
|
||||
QCheckBox* pispers;
|
||||
QPlainTextEdit* phel;
|
||||
//QTreeWidget* pguitree;
|
||||
QLineEdit* pguilab;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user