void PdfView::zoomOut() { if (scalerIndex > 0) { scalerIndex--; _pageImage = QPixmap(); setupPage(pageIndex()); update(); } }
void PdfView::zoomIn() { if (scalerIndex < scalingStrategies.size() - 1) { scalerIndex++; _pageImage = QPixmap(); setupPage(pageIndex()); update(); } }
void PMSettingsDialog::registerPage( QWidget* topPage, PMSettingsDialogPage* page ) { int i = pageIndex( topPage ); if( i < 0 ) kdError( PMArea ) << "PMSettingsDialog: Registered settings page" << " not found" << endl; else { m_pages.push_back( PMRegisteredSettingsPage( topPage, page, i ) ); connect( page, SIGNAL( repaintViews( ) ), SLOT( slotRepaint( ) ) ); connect( page, SIGNAL( showMe( ) ), SLOT( slotShowPage( ) ) ); } }
bool PdfView::setDocument(const QString &path) { Poppler::Document *oldDoc = doc; doc = Poppler::Document::load(path); delete oldDoc; if (doc) { doc->setRenderHint(Poppler::Document::Antialiasing); doc->setRenderHint(Poppler::Document::TextAntialiasing); contentsChanged(QUrl::fromLocalFile(path)); _pageImage = QPixmap(); setupPage(pageIndex()); } return doc; }
VoiceDialog::VoiceDialog (NMainFrameWidget *mainWidget, int staffNr, QList<NStaff> *staffList) : KDialogBase (Tabbed, // dialogFace kapp->makeStdCaption(i18n("Voices")), // caption Help | User1 | Ok | Apply | Cancel, // buttonMask Close, // defaultButton mainWidget, // parent "VoiceDialog", // name (for internal use only) true, // modal true, // separator i18n("C&reate voice") // user1 ), mainWidget_(mainWidget), staffList_(staffList) { unsigned int i = 1; QHBox * firstHBox = 0; for (QListIterator<NStaff> staffIterator(*staffList); staffIterator.current(); ++staffIterator, ++i ) { pageList_.append(new QList<VoiceBox>()); QHBox *currentPage = addHBoxPage (staffIterator.current()->staffName_.isEmpty() ? i18n("Staff %1").arg(i) : staffIterator.current()->staffName_, QString::null ); if (firstHBox == 0) firstHBox = currentPage; QListIterator<NVoice> voiceIterator(staffIterator.current()->voicelist_); unsigned int j = 1; for (QListIterator<NVoice> voiceIterator(staffIterator.current()->voicelist_); voiceIterator.current(); ++voiceIterator, ++j ) { pageList_.current()->append (new VoiceBox(currentPage, this, 0, j, voiceIterator.current())); } } firstPageIdx_ = pageIndex(firstHBox); /* there seems to be a bug in activePageIndex() it does not start with 0 */ showPage(staffNr); }
void KonviConfigDialog::addPageInternal(QWidget *page, const QStringList &items, const QString &pixmapName, const QString &header) { if(d->shown) { kdDebug(240) << "KonviConfigDialog::addPage: can not add a page after the dialog has been shown."; return; } switch(d->type) { case TreeList: case IconList: case Tabbed: { QVBox *frame = addVBoxPage(items, header, SmallIcon(pixmapName, 16)); frame->setSpacing( 0 ); frame->setMargin( 0 ); page->reparent(((QWidget*)frame), 0, QPoint()); m_lastAddedIndex = pageIndex(frame); } break; case Swallow: { page->reparent(this, 0, QPoint()); setMainWidget(page); } break; case Plain: { QFrame *main = plainPage(); QVBoxLayout *topLayout = new QVBoxLayout( main, 0, 0 ); page->reparent(((QWidget*)main), 0, QPoint()); topLayout->addWidget( page ); } break; default: kdDebug(240) << "KonviConfigDialog::addpage: unknown type."; } }
void KMoneyThingMainWidget::activatePage(KMoneyThingMainWidget::Page page) { switch(page) { case homePage: showPage(pageIndex(homeFrame)); break; case accountsPage: showPage(pageIndex(accountsFrame)); break; case calendarPage: showPage(pageIndex(calendarFrame)); break; case categoriesPage: showPage(pageIndex(categoriesFrame)); break; case findPage: showPage(pageIndex(findFrame)); break; case transactionsPage: showPage(pageIndex(transactionsFrame)); break; } }
void BookTextView::paint() { FBView::paint(); std::string pn; ZLStringUtil::appendNumber(pn, pageIndex()); FBReader::Instance().setVisualParameter(FBReader::PageIndexParameter, pn); }
void PdfView::resizeEvent(QResizeEvent *event) { RDocView::resizeEvent(event); _pageImage = QPixmap(); setupPage(pageIndex()); }