// Set the position of the horizontal scrollbar. void QsciScintillaQt::SetHorizontalScrollPos() { QScrollBar *sb = qsb->horizontalScrollBar(); bool was_blocked = sb->blockSignals(true); sb->setValue(xOffset); sb->blockSignals(was_blocked); }
// Set the position of the vertical scrollbar. void QsciScintillaQt::SetVerticalScrollPos() { QScrollBar *sb = qsb->verticalScrollBar(); bool was_blocked = sb->blockSignals(true); sb->setValue(topLine); sb->blockSignals(was_blocked); }
void QtScrollBarFactory::slotSingleStepChanged(QtProperty *property, int step) { if (!m_createdEditors.contains(property)) return; QListIterator<QScrollBar *> itEditor(m_createdEditors[property]); while (itEditor.hasNext()) { QScrollBar *editor = itEditor.next(); editor->blockSignals(true); editor->setSingleStep(step); editor->blockSignals(false); } }
void QtScrollBarFactory::slotRangeChanged(QtProperty *property, int min, int max) { if (!m_createdEditors.contains(property)) return; QtIntPropertyManager *manager = this->propertyManager(property); if (!manager) return; QListIterator<QScrollBar *> itEditor( m_createdEditors[property]); while (itEditor.hasNext()) { QScrollBar *editor = itEditor.next(); editor->blockSignals(true); editor->setRange(min, max); editor->setValue(manager->value(property)); editor->blockSignals(false); } }
void MainWindow::updateScrollBar( bool blockSignals ) { QScrollBar* sb = ui->horizontalScrollBar; if ( PlotsArea==NULL || !PlotsArea->isZoomed() ) { sb->hide(); } else { const FrameInterval intv = PlotsArea->visibleFrames(); sb->blockSignals( blockSignals ); sb->setRange( 0, PlotsArea->numFrames() - intv.count() + 1 ); sb->setValue( intv.from ); sb->setPageStep( intv.count() ); sb->setSingleStep( intv.count() ); sb->blockSignals( false ); sb->show(); } }