mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-18 18:44:39 +00:00
re-added meshcolorizeplugin support
This commit is contained in:
parent
b03d33eb0f
commit
cff7e45406
@ -24,6 +24,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.7 2005/12/03 23:25:10 ggangemi
|
||||
re-added meshcolorizeplugin support
|
||||
|
||||
Revision 1.6 2005/12/03 19:05:39 davide_portelli
|
||||
Added About menu.
|
||||
|
||||
@ -510,6 +513,12 @@ void MainWindow::loadPlugins()
|
||||
//
|
||||
//}
|
||||
// NEW VERSION
|
||||
|
||||
|
||||
MeshColorizeInterface *iColor = qobject_cast<MeshColorizeInterface *>(plugin);
|
||||
if (iColor)
|
||||
addToMenu(iColor->actions(), colorModeMenu, SLOT(applyColorMode()));
|
||||
|
||||
MeshRenderInterface *iDummy = qobject_cast<MeshRenderInterface *>(plugin);
|
||||
if(iDummy)
|
||||
addToMenu(iDummy->actions(),renderMenu,SLOT(applyRenderMode()));
|
||||
@ -525,6 +534,7 @@ void MainWindow::addToMenu(QList<QAction *> actionList, QMenu *menu, const char
|
||||
foreach (QAction *a, actionList)
|
||||
{
|
||||
connect(a,SIGNAL(triggered()),this,slot);
|
||||
a->setCheckable(true);
|
||||
menu->addAction(a);
|
||||
}
|
||||
// OLD LOOP CORE
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.10 2005/12/03 23:25:40 ggangemi
|
||||
re-added meshcolorizeplugin support
|
||||
|
||||
Revision 1.9 2005/12/03 21:29:34 davide_portelli
|
||||
Correct bug
|
||||
|
||||
@ -373,13 +376,14 @@ void MainWindow::applyColorMode()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
MeshColorizeInterface *iColor = qobject_cast<MeshColorizeInterface *>(action->parent());
|
||||
// OLD VERSION iColor->Compute(action->text(),*(GLA()->mm ), GLA());
|
||||
|
||||
// when apply colorize we have to switch to a different color mode!!
|
||||
// Still not working
|
||||
GLA()->setColorMode(GLW::CMPerVert);
|
||||
|
||||
GLA()->log.Log(GLLogStream::Info,"Applied colorize %s",action->text().toLocal8Bit().constData());// .data());
|
||||
iColor->Compute(action,*(GLA()->mm ), GLA());
|
||||
if (action->isChecked()) {
|
||||
action->setChecked(true);
|
||||
GLA()->log.Log(GLLogStream::Info,"Applied colorize %s",action->text().toLocal8Bit().constData());
|
||||
} else {
|
||||
action->setChecked(false);
|
||||
GLA()->log.Log(GLLogStream::Info,"Turning off colorize %s",action->text().toLocal8Bit().constData());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::applyImportExport()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user