mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-16 01:24:36 +00:00
added loadSettings
This commit is contained in:
parent
6ab7bb3024
commit
e0a6bb56cc
@ -296,6 +296,7 @@ private:
|
||||
void createActions();
|
||||
void createMenus();
|
||||
void createToolBars();
|
||||
void loadMeshLabSettings();
|
||||
void loadPlugins();
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void updateRecentFileActions();
|
||||
@ -321,6 +322,10 @@ private:
|
||||
QList<QAction *> editActionList;
|
||||
QList<QAction *> decoratorActionList;
|
||||
|
||||
//*********WARNING*******
|
||||
//it should be moved away from here! MeshLabServer needs it too
|
||||
RichParameterSet globalParams;
|
||||
|
||||
QByteArray toolbarState; //stato delle toolbar e dockwidgets
|
||||
|
||||
QDir lastUsedDirectory; //This will hold the last directory that was used to load/save a file/project in
|
||||
|
||||
@ -724,6 +724,35 @@ void MainWindow::loadPlugins()
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::loadMeshLabSettings()
|
||||
{
|
||||
QDomDocument doc("MeshLabSettings");
|
||||
QFile file("meshlabsettings.xml");
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
return;
|
||||
if (!doc.setContent(&file))
|
||||
{
|
||||
file.close();
|
||||
return;
|
||||
}
|
||||
file.close();
|
||||
|
||||
QDomElement docElem = doc.documentElement();
|
||||
|
||||
QDomNode n = docElem.firstChild();
|
||||
while(!n.isNull())
|
||||
{
|
||||
QDomElement e = n.toElement();
|
||||
RichParameter* rpar = NULL;
|
||||
if(!e.isNull())
|
||||
{
|
||||
RichParameterFactory::create(e,&par);
|
||||
globalParams.addParam(par);
|
||||
}
|
||||
n = n.nextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::addToMenu(QList<QAction *> actionList, QMenu *menu, const char *slot)
|
||||
{
|
||||
foreach (QAction *a, actionList)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user