Sets the number of pages that this widget holds.
        
        :param      pageCount | <int>
357197
def setPageCount( self, pageCount ):
        
        if ( pageCount == self._pageCount ):
            return
        
        pageCount = max(1, pageCount)
        
        self._pageCount = pageCount
        self._pagesSpinner.setMaximum(pageCount)
        self._pagesLabel.setText('of %i for ' % pageCount)
        
        if ( pageCount and self.currentPage() <= 0 ):
            self.setCurrentPage(1)
        
        elif ( pageCount < self.currentPage() ):
            self.setCurrentPage(pageCount)
        
        if ( not self.signalsBlocked() ):
            self.pageCountChanged.emit(pageCount)
        
        self._prevButton.setEnabled(self.currentPage() > 1)
        self._nextButton.setEnabled(self.currentPage() < pageCount)
374439
public boolean setPageSize(Rectangle pageSize) {
        if (writer != null && writer.isPaused()) {
            return false;
        }
        nextPageSize = new Rectangle(pageSize);
        return true;
    }
567006
public ClientFilter withPage(int pageNumber, int amountPerPage) {
        parameters.put("page", pageNumber);
        parameters.put("per_page", amountPerPage);
        return this;
    }
1181578
def __total_pages(self) -> int:
        
        row_count = self.model.query.count()
        if isinstance(row_count, int):
            return int(row_count / self.limit)
        return None
357826
public function limitPage($page, $rowCount)
    {
        $page     = ($page > 0)     ? $page     : 1;
        $rowCount = ($rowCount > 0) ? $rowCount : 1;
        $this->_parts[self::LIMIT_COUNT]  = (int) $rowCount;
        $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1);
        return $this;
    }
414079
public void setPage(int page) {

        if (m_collectorParameter != null) {
            int pos = m_collectorParameter.indexOf(I_CmsListResourceCollector.PARAM_PAGE);
            if (pos >= 0) {
                String params = "";
                int endPos = m_collectorParameter.indexOf(I_CmsListResourceCollector.SEP_PARAM, pos);
                if (pos > 0) {
                    pos -= I_CmsListResourceCollector.SEP_PARAM.length(); // remove also the SEP_PARAM
                    params += m_collectorParameter.substring(0, pos);
                }
                if (endPos >= 0) {
                    if (pos == 0) {
                        endPos += I_CmsListResourceCollector.SEP_PARAM.length(); // remove also the SEP_PARAM
                    }
                    params += m_collectorParameter.substring(endPos, m_collectorParameter.length());
                }
                m_collectorParameter = params;
            }
        }
        if (m_collectorParameter == null) {
            m_collectorParameter = "";
        } else if (m_collectorParameter.length() > 0) {
            m_collectorParameter += I_CmsListResourceCollector.SEP_PARAM;
        }
        m_collectorParameter += I_CmsListResourceCollector.PARAM_PAGE + I_CmsListResourceCollector.SEP_KEYVAL + page;
        synchronized (this) {
            m_resources = null;
        }
    }
645310
public void setSpanCount(int spanCount) {
        if (spanCount == mSpanCount) {
            return;
        }
        if (spanCount < 1) {
            throw new IllegalArgumentException("Span count should be at least 1. Provided "
                    + spanCount);
        }
        mSpanCount = spanCount;
        mSpanSizeLookup.invalidateSpanIndexCache();

        ensureSpanCount();
    }
194145
public void addPage(WizardPage<DATA> page) {
		if (!started) {
			WizardPage<DATA> lastPage = pages.size() > 0 ? pages.get(pages.size() - 1) : null;
			if (lastPage != null) {
				lastPage.setNextPage(page);
				page.setPreviousPage(lastPage);
			}
			pages.add(page);
			wizardView.addPageToView(page);
		}
	}
398151
def setRecordSet( self, recordSet ):
        
        if ( recordSet ):
            self.setQuery(      recordSet.query() )
            self.setGroupBy(    recordSet.groupBy() )
            self.setPageSize(   recordSet.pageSize() )
            self.setSortBy(     recordSet.order() )
            
            self.uiPagedCHK.setChecked( recordSet.isPaged() )
        else:
            self.setQuery(Q())
            self.setGroupBy('')
            self.setPageSize(100)
            self.setSortBy('')
            
            self.uiPagedCHK.setChecked( False )
1273293
def pages_count(self):
        ''''''
        if not self.limit or self.count<self.limit:
            return 1
        if self.count % self.limit <= self.orphans:
            return self.count // self.limit
        return int(math.ceil(float(self.count)/self.limit))
716190
function paging()
    {
        $this->num = $this->count();
        $offset = ($this->page - 1) * $this->page_size;
        if ($offset < 0)
        {
            $offset = 0;
        }
        if ($this->num % $this->page_size > 0)
        {
            $this->pages = intval($this->num / $this->page_size) + 1;
        }
        else
        {
            $this->pages = $this->num / $this->page_size;
        }
        $this->limit($offset . ',' . $this->page_size);
        $this->pager = new Pager(array('total'    => $this->num,
                                       'perpage'  => $this->page_size,
                                       'nowindex' => $this->page
        ));
    }
1205667
private function setPagination()
    {
        // ALl Pages
        if ($this->perPage == 'all') return;

        $this->firstPage    = 1;
        $this->lastPage     = ceil($this->totalCount / $this->perPage);

        // if current page is greater than the total page
        // then set the current page equal to total page
        $this->page = min($this->page, $this->lastPage);

        // Calculate the offset of where the retrieval index start at
        $this->offset   = ($this->page - 1) * $this->perPage;
        $this->limit    = $this->perPage;

        // Next Page And Previous Page
        $this->nextPage = min($this->page + 1, $this->lastPage);
        $this->prevPage = max($this->page - 1, $this->firstPage);
    }
551817
func (l *Listing) SetPageCount(n int) {
	if n > 1000 {
		n = 1000
	}
	l.nextPageCount = n
}
475202
def display_page(self, value):
        

        self._display_page = max(0, min(self.page_count - 1, value))
1305268
function setPageNum($page_number) {
		$this->page = $page_number;

		if (!is_numeric($this->page) || $this->page < 1) {
			$this->page = 1;
		}

		if ($this->total !== null) {
			$this->sanitizePageNum();
		}
	}
1084315
def page_count(self):
        
        postcount = self.post_set.count()
        max_pages = (postcount / get_paginate_by())
        if postcount % get_paginate_by() != 0:
            max_pages += 1
        return max_pages
979706
public void setCurrentPage(int currentPage) throws CmsIllegalArgumentException {

        if (getSize() != 0) {
            if ((currentPage < 1) || (currentPage > getNumberOfPages())) {
                throw new CmsIllegalArgumentException(
                    Messages.get().container(Messages.ERR_LIST_INVALID_PAGE_1, new Integer(currentPage)));
            }
        }
        m_currentPage = currentPage;
    }