Example #1
0
void BackgroundWidget::showLayerLast(LayeredWidget *n) {
	_hidden.push_front(n);
	n->setParent(this);
	connect(n, SIGNAL(closed()), this, SLOT(onInnerClose()));
	connect(n, SIGNAL(resized()), this, SLOT(update()));
	connect(n, SIGNAL(destroyed(QObject*)), this, SLOT(boxDestroyed(QObject*)));
	n->parentResized();
	n->animStep(1);
	n->hide();
	update();
}
Example #2
0
BackgroundWidget::BackgroundWidget(QWidget *parent, LayeredWidget *w) : QWidget(parent), w(w),
aBackground(0), aBackgroundFunc(anim::easeOutCirc), hiding(false), shadow(st::boxShadow) {
	w->setParent(this);
	setGeometry(0, 0, App::wnd()->width(), App::wnd()->height());
	aBackground.start(1);
	anim::start(this);
	show();
	connect(w, SIGNAL(closed()), this, SLOT(onInnerClose()));
	connect(w, SIGNAL(resized()), this, SLOT(update()));
	connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(boxDestroyed(QObject*)));
	w->setFocus();
}
Example #3
0
void BackgroundWidget::replaceInner(LayeredWidget *n) {
	_hidden.push_back(w);
	w->hide();
	w = n;
	w->setParent(this);
	connect(w, SIGNAL(closed()), this, SLOT(onInnerClose()));
	connect(w, SIGNAL(resized()), this, SLOT(update()));
	connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(boxDestroyed(QObject*)));
	w->show();
	resizeEvent(0);
	w->animStep(1);
	update();
}
Example #4
0
BackgroundWidget::BackgroundWidget(QWidget *parent, LayeredWidget *w) : TWidget(parent)
, w(w)
, a_bg(0)
, _a_background(animation(this, &BackgroundWidget::step_background))
, hiding(false)
, shadow(st::boxShadow) {
	w->setParent(this);
	if (App::app()) App::app()->mtpPause();
	setGeometry(0, 0, App::wnd()->width(), App::wnd()->height());
	a_bg.start(1);
	_a_background.start();
	show();
	connect(w, SIGNAL(closed()), this, SLOT(onInnerClose()));
	connect(w, SIGNAL(resized()), this, SLOT(update()));
	connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(boxDestroyed(QObject*)));
	w->setFocus();
}