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(); }
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(); }
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(); }
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(); }