void ShowMenu::init() { setType(Info.type); setName(Info.name); setIcon(Info.icon); setSupportedEvents(Interaction::MousePress | Interaction::MouseRelease); }
void ChangeVisibility::init(bool show) { mToShow = show; mFadeAction = new Fade(this); mSlideAction = new Slide(this); mFadeAction->setDuration(0); mSlideAction->setDuration(0); connect(mFadeAction, SIGNAL(dataChanged()), this, SIGNAL(dataChanged())); connect(mSlideAction, SIGNAL(dataChanged()), this, SIGNAL(dataChanged())); if (show) { setName(tr("Show")); setType("Show"); mFadeAction->setFadeType(Fade::In); } else { setName(tr("Hide")); setType("Hide"); mFadeAction->setFadeType(Fade::Out); } setDescription(name() + "..."); setSupportedEvents(Interaction::MousePress | Interaction::MouseRelease | Interaction::MouseMove); }