本文整理汇总了C++中KoSelection::position方法的典型用法代码示例。如果您正苦于以下问题:C++ KoSelection::position方法的具体用法?C++ KoSelection::position怎么用?C++ KoSelection::position使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoSelection
的用法示例。
在下文中一共展示了KoSelection::position方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KoInteractionStrategy
ShapeMoveStrategy::ShapeMoveStrategy( KoTool *tool, KoCanvasBase *canvas, const QPointF &clicked)
: KoInteractionStrategy(tool, canvas)
, m_start(clicked)
{
QList<KoShape*> selectedShapes = canvas->shapeManager()->selection()->selectedShapes(KoFlake::TopLevelSelection);
QRectF boundingRect;
foreach(KoShape *shape, selectedShapes) {
if( ! shape->isEditable() )
continue;
m_selectedShapes << shape;
m_previousPositions << shape->position();
m_newPositions << shape->position();
boundingRect = boundingRect.unite( shape->boundingRect() );
}
KoSelection * selection = m_canvas->shapeManager()->selection();
m_initialOffset = selection->absolutePosition( SelectionDecorator::hotPosition() ) - m_start;
m_initialSelectionPosition = selection->position();
m_canvas->snapGuide()->setIgnoredShapes( selection->selectedShapes( KoFlake::FullSelection ) );
tool->setStatusText( i18n("Press ALT to hold x- or y-position.") );
}