这篇教程C++ updateBoundingRect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateBoundingRect函数的典型用法代码示例。如果您正苦于以下问题:C++ updateBoundingRect函数的具体用法?C++ updateBoundingRect怎么用?C++ updateBoundingRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateBoundingRect函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: QSvgRendererEmbellishment::Embellishment( const PitchList *pitchList, const QPen *pen ) :MelodySymbol(pitchList, pen){ m_pitchList = pitchList; m_pen = pen; m_preceedPitch = 0; m_followPitch = 0; m_alternative = Embellishment::Regular; m_embellishTop = m_pitchList->baseLine()-m_pitchList->lineHeight()*2.5; m_graceHeight = pitchList->lineHeight() * 0.5; m_contextMenuActions = new QList<QAction *>; m_svgRenderer = new QSvgRenderer(QString(":/mainwindow/images/melody_notes_and_flags.svg"), this); QString item("melody_fill"); m_graceRect = getBoundsForId(item, 0.0, m_graceHeight ); item = "melody_fill_line"; m_graceWithLineRect = getBoundsForId(item, 0.0, m_graceHeight); item = "flag3_up"; m_flagRect = getBoundsForId(item, m_graceRect.width()*0.8); m_graceWidth = m_graceRect.width(); m_graceSpace = m_graceWidth / 4; m_spaceForLine = m_graceWithLineRect.width() - m_graceRect.width(); m_neighborsOk = false; updateBoundingRect(); /*! @todo Caching is done by every Item itself. Use QPixmapCache. */ setCacheMode(QGraphicsItem::DeviceCoordinateCache); setFlags( QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemIsSelectable);}
开发者ID:tomvodi,项目名称:LimePipes-prototype,代码行数:31,
示例2: updateBoundingRectvoid MirrorGraphicsEffect::setReflectionOffset(float value){ if(_reflectionOffset != value){ _reflectionOffset = value; updateBoundingRect(); // we have to call this function to inform everybody who interested that boundings of control has changed }}
开发者ID:andrey-str,项目名称:qt-progress-with-reflection,代码行数:7,
示例3: paintEngine/*! Store a path command in the command list /sa QPaintEngine::drawPath()*/void QwtGraphic::drawPath( const QPainterPath &path ){ const QPainter *painter = paintEngine()->painter(); if ( painter == NULL ) return; d_data->commands += QwtPainterCommand( path ); if ( !path.isEmpty() ) { const QPainterPath scaledPath = painter->transform().map( path ); QRectF pointRect = scaledPath.boundingRect(); QRectF boundingRect = pointRect; if ( painter->pen().style() != Qt::NoPen && painter->pen().brush().style() != Qt::NoBrush ) { boundingRect = qwtStrokedPathRect( painter, path ); } updateControlPointRect( pointRect ); updateBoundingRect( boundingRect ); d_data->pathInfos += PathInfo( pointRect, boundingRect, qwtHasScalablePen( painter ) ); }}
开发者ID:0vermind,项目名称:NeoLoader,代码行数:32,
示例4: minimumFrameSizevoid QgsAnnotationItem::setFrameSize( QSizeF size ){ QSizeF frameSize = minimumFrameSize().expandedTo( size ); //don't allow frame sizes below minimum mFrameSize = frameSize; updateBoundingRect(); updateBalloon();}
开发者ID:AM7000000,项目名称:QGIS,代码行数:7,
示例5: updateBoundingRectvoid BrushItem::setTileRegion(const QRegion ®ion) { if (mTileRegion == region) return; mTileRegion = region; updateBoundingRect();}
开发者ID:ATSOTECK,项目名称:Aurora-Game-Editor,代码行数:7,
示例6: updateBoundingRectvoid QgsComposerShape::setSceneRect( const QRectF& rectangle ){ // Reimplemented from QgsComposerItem as we need to call updateBoundingRect after the shape's size changes QgsComposerItem::setSceneRect( rectangle ); updateBoundingRect(); update();}
开发者ID:edigonzales,项目名称:QGIS,代码行数:7,
示例7: lockvoid VlcQmlVideoObject::paint(QPainter *painter){ lock(); if( _frame.inited ) { if (!_graphicsPainter) _graphicsPainter = new GlslPainter; Q_ASSERT(_graphicsPainter); if (!_gotSize || _frameSize.isNull()) { // TODO: do scaling ourselfs? _gotSize = true; _frameSize = QSize(_frame.width, _frame.height); updateBoundingRect(); } if (!_paintedOnce) { painter->fillRect(_boundingRect, Qt::black); _paintedOnce = true; } else { Q_ASSERT(_graphicsPainter); _graphicsPainter->setFrame(&_frame); if (!_graphicsPainter->inited()) _graphicsPainter->init(); _graphicsPainter->paint(painter, _boundingRect, this); } } unlock();}
开发者ID:RobinWuDev,项目名称:vlc-qt,代码行数:31,
示例8: QPointvoid ImageMarker::setRect(int x, int y, int w, int h) { if (d_pos == QPoint(x, y) && d_size == QSize(w, h)) return; d_pos = QPoint(x, y); d_size = QSize(w, h); updateBoundingRect();}
开发者ID:gitter-badger,项目名称:AlphaPlot,代码行数:7,
示例9: tvoid QgsMapCanvasAnnotationItem::updatePosition(){ if ( !mAnnotation ) return; if ( mAnnotation->hasFixedMapPosition() ) { QgsCoordinateTransform t( mAnnotation->mapPositionCrs(), mMapCanvas->mapSettings().destinationCrs(), QgsProject::instance() ); QgsPointXY coord = mAnnotation->mapPosition(); try { coord = t.transform( coord ); } catch ( QgsCsException & ) {} setPos( toCanvasCoordinates( coord ) ); } else { //relative position double x = mAnnotation->relativePosition().x() * mMapCanvas->width(); double y = mAnnotation->relativePosition().y() * mMapCanvas->height(); setPos( x, y ); } updateBoundingRect();}
开发者ID:AlisterH,项目名称:Quantum-GIS,代码行数:27,
示例10: QRectFvoid QgsLayoutItemGroup::resetBoundingRect(){ mBoundingRectangle = QRectF(); for ( QgsLayoutItem *item : qgis::as_const( mItems ) ) { updateBoundingRect( item ); }}
开发者ID:cz172638,项目名称:QGIS,代码行数:8,
示例11: updateBoundingRectvoid VlcQmlVideoObject::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry){ _geometry = newGeometry; updateBoundingRect(); QQuickPaintedItem::geometryChanged(newGeometry, oldGeometry);}
开发者ID:RobinWuDev,项目名称:vlc-qt,代码行数:8,
示例12: updateBoundingRectvoid QgsComposerShape::refreshSymbol(){ mMaxSymbolBleed = QgsSymbolLayerUtils::estimateMaxSymbolBleed( mShapeStyleSymbol ); updateBoundingRect(); update(); emit frameChanged();}
开发者ID:kinow,项目名称:QGIS,代码行数:8,
示例13: prepareGeometryChangevoid ScaleItem::setZoom(int z){ prepareGeometryChange(); _zoom = z; computeScale(); updateBoundingRect(); update();}
开发者ID:tumic0,项目名称:GPXSee,代码行数:8,
示例14: setTilelayervoid BrushItem::setMapEditor(MapEditor *editor) { if (mMapEditor == editor) return; mMapEditor = editor; setTilelayer(0); updateBoundingRect();}
开发者ID:ATSOTECK,项目名称:Aurora-Game-Editor,代码行数:9,
示例15: prepareGeometryChangevoid SliderInfoItem::setSide(Side side){ if (side == _side) return; prepareGeometryChange(); _side = side; updateBoundingRect();}
开发者ID:tumic0,项目名称:GPXSee,代码行数:9,
示例16: Q_Dvoid QGraphicsDropShadowEffect::setBlurRadius(qreal blurRadius){ Q_D(QGraphicsDropShadowEffect); if (qFuzzyCompare(d->filter->blurRadius(), blurRadius)) return; d->filter->setBlurRadius(blurRadius); updateBoundingRect(); emit blurRadiusChanged(blurRadius);}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:10,
示例17: updateBoundingRectvoid QgsComposerShape::refreshSymbol(){ QgsRenderContext rc = QgsComposerUtils::createRenderContextForMap( mComposition->referenceMap(), nullptr, mComposition->printResolution() ); mMaxSymbolBleed = ( 25.4 / mComposition->printResolution() ) * QgsSymbolLayerUtils::estimateMaxSymbolBleed( mShapeStyleSymbol, rc ); updateBoundingRect(); update(); emit frameChanged();}
开发者ID:cayetanobv,项目名称:QGIS,代码行数:10,
示例18: QImagevoid ShadowEffect::setBlurRadius(qreal value){ if (qFuzzyCompare(m_blurRadius, value)) { return; } m_blurRadius = value; m_shadow = QImage(); updateBoundingRect(); blurRadiusChanged(m_blurRadius);}
开发者ID:KDE,项目名称:homerun,代码行数:10,
示例19: evalItemRectvoid QgsComposerShape::setSceneRect( const QRectF& rectangle ){ // Reimplemented from QgsComposerItem as we need to call updateBoundingRect after the shape's size changes //update rect for data defined size and position QRectF evaluatedRect = evalItemRect( rectangle ); QgsComposerItem::setSceneRect( evaluatedRect ); updateBoundingRect(); update();}
开发者ID:kinow,项目名称:QGIS,代码行数:11,
示例20: setXValuevoid ImageMarker::setOrigin(const QPoint &p) { d_pos = p; if (!plot()) return; setXValue(plot()->invTransform(xAxis(), p.x())); setYValue(plot()->invTransform(yAxis(), p.y())); d_size = size(); updateBoundingRect();}
开发者ID:gitter-badger,项目名称:AlphaPlot,代码行数:11,
示例21: layoutvoid QgsLayoutItemShape::refreshSymbol(){ if ( layout() ) { QgsRenderContext rc = QgsLayoutUtils::createRenderContextForLayout( layout(), nullptr, layout()->renderContext().dpi() ); mMaxSymbolBleed = ( 25.4 / layout()->renderContext().dpi() ) * QgsSymbolLayerUtils::estimateMaxSymbolBleed( mShapeStyleSymbol.get(), rc ); } updateBoundingRect(); update(); emit frameChanged();}
开发者ID:AlisterH,项目名称:Quantum-GIS,代码行数:13,
示例22: oldPositionvoid BrushItem::setTilelayerPosition(const QPoint &pos) { if (!mTilelayer) return; const QPoint oldPosition(mTilelayer->x(), mTilelayer->y()); if (oldPosition == pos) return; mTileRegion.translate(pos - oldPosition); mTilelayer->setX(pos.x()); mTilelayer->setY(pos.y()); updateBoundingRect();}
开发者ID:ATSOTECK,项目名称:Aurora-Game-Editor,代码行数:13,
示例23: QRegionvoid BrushItem::setTilelayer(const Tilelayer *tilelayer) { delete mTilelayer; if (tilelayer) { mTilelayer = static_cast<Tilelayer*>(tilelayer->clone()); mTileRegion = mTilelayer->region(); } else { mTilelayer = 0; mTileRegion = QRegion(); } updateBoundingRect(); update();}
开发者ID:ATSOTECK,项目名称:Aurora-Game-Editor,代码行数:14,
注:本文中的updateBoundingRect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateButton函数代码示例 C++ updateAnimations函数代码示例 |