diff -r 7014be3ac7d0 -r 8d7a84789707 flagobj.cpp --- a/flagobj.cpp Mon Feb 12 09:28:46 2007 +0000 +++ b/flagobj.cpp Mon Dec 17 15:36:18 2007 +0000 @@ -30,11 +30,13 @@ void FlagObj::init () { name="undefined"; - group="undefined"; + unsetGroup(); icon=new ImageObj (scene); icon->setPos (absPos.x(), absPos.y() ); state=false; + used=false; + avis=true; action=NULL; } @@ -45,6 +47,8 @@ group=other->group; tooltip=other->tooltip; state=other->state; + avis=other->avis; + used=other->used; icon->copy(other->icon); action=other->action; setVisibility (other->isVisibleObj() ); @@ -105,6 +109,11 @@ return group; } +void FlagObj::unsetGroup() +{ + group="undefined"; +} + void FlagObj::setToolTip(const QString &n) { tooltip=n; @@ -127,7 +136,22 @@ void FlagObj::updateAction () { - if (action) action->setChecked(state); + if (action) + { + action->setChecked(state); + if (!avis) + action->setVisible(state); + } +} + +void FlagObj::setAlwaysVisible(bool b) +{ + avis=b; +} + +bool FlagObj::isAlwaysVisible() +{ + return avis; } bool FlagObj::isActive()