From ddcb730abffcb470ff0904728b224acaf119dba5 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Tue, 6 Dec 2005 16:39:41 +0000 Subject: [PATCH] Added a QActionGroup for the menu options --- .../meshcolorize/meshcolorize.h | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/meshlabplugins/meshcolorize/meshcolorize.h b/src/meshlabplugins/meshcolorize/meshcolorize.h index 220cb422b..60071bf3f 100644 --- a/src/meshlabplugins/meshcolorize/meshcolorize.h +++ b/src/meshlabplugins/meshcolorize/meshcolorize.h @@ -49,10 +49,28 @@ public: MeshColorCurvaturePlugin() { - //QActionGroup * ag = new QActionGroup(this); - actionList << new QAction(QString("None"),this); - actionList << new QAction(QString("Per Face"),this); - actionList << new QAction(QString("Per Vertex"),this); + QAction *qa; + QActionGroup * ag; + + ag = new QActionGroup(this); + ag->setExclusive(true); + + qa = new QAction(QString("None"),this); + qa->setActionGroup(ag); + qa->setCheckable(true); + qa->setChecked(true); + actionList << qa; + + qa = new QAction(QString("Per Face"),this); + qa->setActionGroup(ag); + qa->setCheckable(true); + actionList << qa; + + qa = new QAction(QString("Per Vertex"),this); + qa->setActionGroup(ag); + qa->setCheckable(true); + actionList << qa; + actionList << new QAction(QString("Gaussian Curvature"),this); }