Beispiel #1
0
void ShowMenu::init()
{
    setType(Info.type);
    setName(Info.name);
    setIcon(Info.icon);
    setSupportedEvents(Interaction::MousePress | Interaction::MouseRelease);
}
Beispiel #2
0
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);
}