本文整理汇总了C++中disconnectUpdateSignal函数的典型用法代码示例。如果您正苦于以下问题:C++ disconnectUpdateSignal函数的具体用法?C++ disconnectUpdateSignal怎么用?C++ disconnectUpdateSignal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了disconnectUpdateSignal函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: disconnectUpdateSignal
void QgsLayoutScaleBarWidget::mUnitsComboBox_currentIndexChanged( int index )
{
if ( !mScalebar )
{
return;
}
QVariant unitData = mUnitsComboBox->itemData( index );
if ( unitData.type() == QVariant::Invalid )
{
return;
}
disconnectUpdateSignal();
mScalebar->beginCommand( tr( "Set Scalebar Units" ) );
mScalebar->applyDefaultSize( static_cast< QgsUnitTypes::DistanceUnit >( unitData.toInt() ) );
mScalebar->update();
mUnitLabelLineEdit->setText( mScalebar->unitLabel() );
mSegmentSizeSpinBox->setValue( mScalebar->unitsPerSegment() );
mMapUnitsPerBarUnitSpinBox->setValue( mScalebar->mapUnitsPerScaleBarUnit() );
connectUpdateSignal();
mScalebar->endCommand();
}
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:25,代码来源:qgslayoutscalebarwidget.cpp
示例2: tr
void QgsComposerScaleBarWidget::segmentSizeRadioChanged( QAbstractButton *radio )
{
bool fixedSizeMode = radio == mFixedSizeRadio;
mMinWidthSpinBox->setEnabled( !fixedSizeMode );
mMaxWidthSpinBox->setEnabled( !fixedSizeMode );
mSegmentSizeSpinBox->setEnabled( fixedSizeMode );
if ( !mComposerScaleBar )
{
return;
}
mComposerScaleBar->beginCommand( tr( "Scalebar segment size mode" ), QgsComposerMergeCommand::ScaleBarSegmentSize );
disconnectUpdateSignal();
if ( mFixedSizeRadio->isChecked() )
{
mComposerScaleBar->setSegmentSizeMode( QgsScaleBarSettings::SegmentSizeFixed );
mComposerScaleBar->setNumUnitsPerSegment( mSegmentSizeSpinBox->value() );
}
else /*if(mFitWidthRadio->isChecked())*/
{
mComposerScaleBar->setSegmentSizeMode( QgsScaleBarSettings::SegmentSizeFitWidth );
}
mComposerScaleBar->update();
connectUpdateSignal();
mComposerScaleBar->endCommand();
}
开发者ID:cz172638,项目名称:QGIS,代码行数:27,代码来源:qgscomposerscalebarwidget.cpp
示例3: defined
void QgsComposerScaleBarWidget::on_mFontButton_clicked()
{
if ( !mComposerScaleBar )
{
return;
}
bool dialogAccepted;
QFont oldFont = mComposerScaleBar->font();
#if defined(Q_OS_MAC) && defined(QT_MAC_USE_COCOA)
// Native Mac dialog works only for Qt Carbon
QFont newFont = QFontDialog::getFont( &dialogAccepted, oldFont, this, QString(), QFontDialog::DontUseNativeDialog );
#else
QFont newFont = QFontDialog::getFont( &dialogAccepted, oldFont, this );
#endif
if ( dialogAccepted )
{
mComposerScaleBar->beginCommand( tr( "Scalebar font changed" ) );
disconnectUpdateSignal();
mComposerScaleBar->setFont( newFont );
connectUpdateSignal();
mComposerScaleBar->endCommand();
}
mComposerScaleBar->update();
}
开发者ID:imincik,项目名称:QGIS,代码行数:25,代码来源:qgscomposerscalebarwidget.cpp
示例4: disconnectUpdateSignal
void QgsComposerScaleBarWidget::mUnitsComboBox_currentIndexChanged( int index )
{
if ( !mComposerScaleBar )
{
return;
}
QVariant unitData = mUnitsComboBox->itemData( index );
if ( unitData.type() == QVariant::Invalid )
{
return;
}
disconnectUpdateSignal();
mComposerScaleBar->setUnits( ( QgsUnitTypes::DistanceUnit )unitData.toInt() );
switch ( mUnitsComboBox->currentIndex() )
{
case 0:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to map units" ) );
mComposerScaleBar->applyDefaultSize( QgsUnitTypes::DistanceUnknownUnit );
break;
}
case 2:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to feet" ) );
mComposerScaleBar->applyDefaultSize( QgsUnitTypes::DistanceFeet );
break;
}
case 3:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to nautical miles" ) );
mComposerScaleBar->applyDefaultSize( QgsUnitTypes::DistanceNauticalMiles );
break;
}
case 1:
default:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to meters" ) );
mComposerScaleBar->applyDefaultSize( QgsUnitTypes::DistanceMeters );
break;
}
}
mComposerScaleBar->update();
mUnitLabelLineEdit->setText( mComposerScaleBar->unitLabeling() );
mSegmentSizeSpinBox->setValue( mComposerScaleBar->numUnitsPerSegment() );
mMapUnitsPerBarUnitSpinBox->setValue( mComposerScaleBar->numMapUnitsPerScaleBarUnit() );
connectUpdateSignal();
mComposerScaleBar->endCommand();
}
开发者ID:cz172638,项目名称:QGIS,代码行数:53,代码来源:qgscomposerscalebarwidget.cpp
示例5: tr
void QgsLayoutScaleBarWidget::mHeightSpinBox_valueChanged( double d )
{
if ( !mScalebar )
{
return;
}
mScalebar->beginCommand( tr( "Set Scalebar Height" ), QgsLayoutItem::UndoScaleBarHeight );
disconnectUpdateSignal();
mScalebar->setHeight( d );
mScalebar->update();
connectUpdateSignal();
mScalebar->endCommand();
}
开发者ID:Cracert,项目名称:Quantum-GIS,代码行数:13,代码来源:qgslayoutscalebarwidget.cpp
示例6: tr
void QgsComposerScaleBarWidget::on_mFontColorButton_colorChanged( const QColor& newColor )
{
if ( !mComposerScaleBar )
{
return;
}
mComposerScaleBar->beginCommand( tr( "Scalebar font color changed" ) );
disconnectUpdateSignal();
mComposerScaleBar->setFontColor( newColor );
mComposerScaleBar->update();
connectUpdateSignal();
mComposerScaleBar->endCommand();
}
开发者ID:imincik,项目名称:QGIS,代码行数:14,代码来源:qgscomposerscalebarwidget.cpp
示例7: disconnectUpdateSignal
void QgsComposerScaleBarWidget::on_mUnitsComboBox_currentIndexChanged( int index )
{
if ( !mComposerScaleBar )
{
return;
}
QVariant unitData = mUnitsComboBox->itemData( index );
if ( unitData.type() == QVariant::Invalid )
{
return;
}
disconnectUpdateSignal();
mComposerScaleBar->setUnits(( QgsComposerScaleBar::ScaleBarUnits )unitData.toInt() );
switch ( mUnitsComboBox->currentIndex() )
{
case 0:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to map units" ) );
mComposerScaleBar->applyDefaultSize( QgsComposerScaleBar::MapUnits );
break;
}
case 2:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to feet" ) );
mComposerScaleBar->applyDefaultSize( QgsComposerScaleBar::Feet );
break;
}
case 3:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to nautical miles" ) );
mComposerScaleBar->applyDefaultSize( QgsComposerScaleBar::NauticalMiles );
break;
}
case 1:
default:
{
mComposerScaleBar->beginCommand( tr( "Scalebar changed to meters" ) );
mComposerScaleBar->applyDefaultSize( QgsComposerScaleBar::Meters );
break;
}
}
mComposerScaleBar->update();
connectUpdateSignal();
mComposerScaleBar->endCommand();
}
开发者ID:imincik,项目名称:QGIS,代码行数:48,代码来源:qgscomposerscalebarwidget.cpp
注:本文中的disconnectUpdateSignal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论