NewGroupBox::NewGroupBox() : _scroll(this, st::newGroupScroll), _inner(), _filter(this, st::contactsFilter, lang(lng_participant_filter)), _next(this, lang(lng_create_group_next), st::btnSelectDone), _cancel(this, lang(lng_cancel), st::btnSelectCancel), _hiding(false), a_opacity(0, 1) { _width = st::participantWidth; _height = App::wnd()->height() - st::boxPadding.top() - st::boxPadding.bottom(); if (_height > st::participantMaxHeight) _height = st::participantMaxHeight; resize(_width, _height); _scroll.setWidget(&_inner); _scroll.setFocusPolicy(Qt::NoFocus); connect(&_next, SIGNAL(clicked()), this, SLOT(onNext())); connect(&_cancel, SIGNAL(clicked()), this, SIGNAL(closed())); connect(&_scroll, SIGNAL(scrolled()), &_inner, SLOT(updateSel())); connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onScroll())); connect(&_filter, SIGNAL(changed()), this, SLOT(onFilterUpdate())); connect(&_filter, SIGNAL(cancelled()), this, SIGNAL(onClose())); connect(&_inner, SIGNAL(mustScrollTo(int,int)), &_scroll, SLOT(scrollToY(int,int))); connect(&_inner, SIGNAL(selectAllQuery()), &_filter, SLOT(selectAll())); showAll(); _cache = myGrab(this, rect()); hideAll(); }
void NewGroupInner::chooseParticipant() { int32 rh = st::profileListPhotoSize + st::profileListPadding.height() * 2, from; if (_filter.isEmpty()) { if (!_sel) return; changeCheckState(_sel); } else { if (_filteredSel < 0 || _filteredSel >= _filtered.size()) return; DialogRow *row = _filtered[_filteredSel]; changeCheckState(row); PeerData *peer = row->history->peer; emit selectAllQuery(); } parentWidget()->update(); }
DeclareSelectCursorQuery Mapping::declareSelectAllCursor(const qulonglong& queryId) const { return DeclareSelectCursorQuery(selectAllCursorName(), selectAllQuery(), queryId); }