예제 #1
0
NewCopyPage::NewCopyPage(Step step, QWidget *parent)
    : QWidget(parent), Ui::NewCopyPage()
{
    //Setup the .ui file.
    setupUi(this);

#ifdef _WIN32
    linuxLabel->setVisible(false);
#endif
#ifdef unix
    windowsLabel->setVisible(false);
#endif

    //Hide parts of the page.
    switch (step) {
    case (StepWarning) : {
        hideProgress();
        hideFinish();
        break;
    }
    case (StepCopy) : {
        startCopy();
        hideFinish();

        break;
    }
    }
}
예제 #2
0
void PopupMenu::hideMenu(bool fast) {
    if (isHidden()) return;
    if (_parent && !_a_hide.animating()) {
        _parent->childHiding(this);
    }
    if (fast) {
        if (_a_hide.animating()) {
            _a_hide.stop();
        }
        a_opacity = anim::fvalue(0, 0);
        hideFinish();
    } else {
        if (!_a_hide.animating()) {
            _cache = myGrab(this);
            a_opacity.start(0);
            _a_hide.start();
        }
        if (_parent) {
            _parent->hideMenu();
        }
    }
    if (_childMenuIndex >= 0) {
        _menus.at(_childMenuIndex)->hideMenu(fast);
    }
}
예제 #3
0
void ContextMenu::fastHide() {
	if (animating()) {
		anim::stop(this);
	}
	a_opacity = anim::fvalue(0, 0);
	hideFinish();
}
예제 #4
0
void PopupMenu::step_hide(float64 ms, bool timer) {
    float64 dt = ms / _st.duration;
    if (dt >= 1) {
        _a_hide.stop();
        a_opacity.finish();
        hideFinish();
    } else {
        a_opacity.update(dt, anim::linear);
    }
    if (timer) update();
}
예제 #5
0
bool ContextMenu::animStep(float64 ms) {
	float64 dt = ms / 150;
	bool res = true;
	if (dt >= 1) {
		a_opacity.finish();
		if (_hiding) {
			hideFinish();
		}
		res = false;
	} else {
		a_opacity.update(dt, anim::linear);
	}
	adjustButtons();
	update();
	return res;
}