diff options
Diffstat (limited to 'kword/KWPageManager.cpp')
-rw-r--r-- | kword/KWPageManager.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kword/KWPageManager.cpp b/kword/KWPageManager.cpp index 2e1c81fd..7058e5ac 100644 --- a/kword/KWPageManager.cpp +++ b/kword/KWPageManager.cpp @@ -31,7 +31,7 @@ KWPageManager::KWPageManager() { int KWPageManager::pageNumber(const KoRect &frame) const { int page=m_firstPage; double startOfpage = 0.0; - QPtrListIterator<KWPage> pages(m_pageList); + TQPtrListIterator<KWPage> pages(m_pageList); while(pages.current() && startOfpage < frame.top()) { startOfpage += pages.current()->height(); if(startOfpage >= frame.top()) @@ -78,7 +78,7 @@ int KWPageManager::pageCount() const { } KWPage* KWPageManager::page(int pageNum) const { - QPtrListIterator<KWPage> pages(m_pageList); + TQPtrListIterator<KWPage> pages(m_pageList); while(pages.current()) { if(pages.current()->pageNumber() == pageNum) return pages.current(); @@ -107,7 +107,7 @@ KWPage* KWPageManager::page(const KoRect *rect) const { void KWPageManager::setStartPage(int startPage) { int offset = startPage - m_firstPage; bool switchSides = startPage % 2 != m_firstPage % 2; - for(QPtrListIterator<KWPage> pages(m_pageList); pages.current(); ++pages) { + for(TQPtrListIterator<KWPage> pages(m_pageList); pages.current(); ++pages) { KWPage *page = pages.current(); page->m_pageNum = page->m_pageNum + offset; if(switchSides) @@ -123,8 +123,8 @@ int KWPageManager::lastPageNumber() const { KWPage* KWPageManager::insertPage(int index) { if(m_onlyAllowAppend) return appendPage(); - KWPage *page = new KWPage(this, QMIN( QMAX(index, m_firstPage), lastPageNumber()+1 )); - QPtrListIterator<KWPage> pages(m_pageList); + KWPage *page = new KWPage(this, TQMIN( TQMAX(index, m_firstPage), lastPageNumber()+1 )); + TQPtrListIterator<KWPage> pages(m_pageList); while(pages.current() && pages.current()->pageNumber() < index) ++pages; while(pages.current()) { @@ -165,7 +165,7 @@ double KWPageManager::bottomOfPage(int pageNum) const { double KWPageManager::pageOffset(int pageNum, bool bottom) const { if(pageNum < m_firstPage) return 0; - QPtrListIterator<KWPage> pages(m_pageList); + TQPtrListIterator<KWPage> pages(m_pageList); double offset = 0.0; while(pages.current()) { if(pages.current()->pageNumber() == pageNum) { @@ -185,7 +185,7 @@ void KWPageManager::removePage(int pageNumber) { void KWPageManager::removePage(KWPage *page) { if(!page) return; - QPtrListIterator<KWPage> pages(m_pageList); + TQPtrListIterator<KWPage> pages(m_pageList); while(pages.current() && pages.current()->pageNumber() <= page->pageNumber()) ++pages; while(pages.current()) { @@ -196,8 +196,8 @@ void KWPageManager::removePage(KWPage *page) { m_pageList.remove(page); } -void KWPageManager::setDefaultPage(const KoPageLayout &layout) { - m_defaultPageLayout = layout; +void KWPageManager::setDefaultPage(const KoPageLayout &tqlayout) { + m_defaultPageLayout = tqlayout; // make sure we have 1 default, either pageBound or left/right bound. if(m_defaultPageLayout.ptLeft < 0 || m_defaultPageLayout.ptRight < 0) { m_defaultPageLayout.ptLeft = -1; @@ -205,8 +205,8 @@ void KWPageManager::setDefaultPage(const KoPageLayout &layout) { } else { m_defaultPageLayout.ptPageEdge = -1; m_defaultPageLayout.ptBindingSide = -1; - m_defaultPageLayout.ptLeft = QMAX(m_defaultPageLayout.ptLeft, 0); - m_defaultPageLayout.ptRight = QMAX(m_defaultPageLayout.ptRight, 0); + m_defaultPageLayout.ptLeft = TQMAX(m_defaultPageLayout.ptLeft, 0); + m_defaultPageLayout.ptRight = TQMAX(m_defaultPageLayout.ptRight, 0); } //kdDebug() << "setDefaultPage l:" << m_defaultPageLayout.ptLeft << ", r: " << m_defaultPageLayout.ptRight << ", a: " << m_defaultPageLayout.ptPageEdge << ", b: " << m_defaultPageLayout.ptBindingSide << endl; } @@ -214,7 +214,7 @@ void KWPageManager::setDefaultPage(const KoPageLayout &layout) { KoPoint KWPageManager::clipToDocument(const KoPoint &point) { int page=m_firstPage; double startOfpage = 0.0; - QPtrListIterator<KWPage> pages(m_pageList); + TQPtrListIterator<KWPage> pages(m_pageList); while(pages.current()) { startOfpage += pages.current()->height(); if(startOfpage >= point.y()) @@ -222,9 +222,9 @@ KoPoint KWPageManager::clipToDocument(const KoPoint &point) { page++; ++pages; } - page = QMIN(page, lastPageNumber()); + page = TQMIN(page, lastPageNumber()); KoRect rect = this->page(page)->rect(); - if(rect.contains(point)) + if(rect.tqcontains(point)) return point; KoPoint rc(point); @@ -241,7 +241,7 @@ KoPoint KWPageManager::clipToDocument(const KoPoint &point) { } // **** PageList **** -int KWPageManager::PageList::compareItems(QPtrCollection::Item a, QPtrCollection::Item b) +int KWPageManager::PageList::compareItems(TQPtrCollection::Item a, TQPtrCollection::Item b) { int pa = ((KWPage *)a)->pageNumber(); int pb = ((KWPage *)b)->pageNumber(); |