本文整理汇总了C++中QScrollBar::blockSignals方法的典型用法代码示例。如果您正苦于以下问题:C++ QScrollBar::blockSignals方法的具体用法?C++ QScrollBar::blockSignals怎么用?C++ QScrollBar::blockSignals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QScrollBar
的用法示例。
在下文中一共展示了QScrollBar::blockSignals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetHorizontalScrollPos
// 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);
}
示例2: SetVerticalScrollPos
// 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);
}
示例3: slotSingleStepChanged
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);
}
}
示例4: slotRangeChanged
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);
}
}
示例5: updateScrollBar
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();
}
}