Krita Source Code Documentation
Loading...
Searching...
No Matches
KoStrokeConfigWidget.cpp File Reference
#include "KoStrokeConfigWidget.h"
#include <QMenu>
#include <QToolButton>
#include <QButtonGroup>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QSizePolicy>
#include <KisSignalMapper.h>
#include <klocalizedstring.h>
#include <KoIcon.h>
#include <KoUnit.h>
#include <KoLineStyleSelector.h>
#include <KoUnitDoubleSpinBox.h>
#include <KoMarkerSelector.h>
#include <KoColorPopupAction.h>
#include <KoMarker.h>
#include <KoShapeStroke.h>
#include <KoPathShape.h>
#include <KoMarkerCollection.h>
#include <KoPathShapeMarkerCommand.h>
#include <KoCanvasBase.h>
#include <KoCanvasController.h>
#include <KoCanvasResourceProvider.h>
#include <KoDocumentResourceManager.h>
#include <KoSelection.h>
#include <KoShapeController.h>
#include <KoShapeStrokeCommand.h>
#include <KoShapeStrokeModel.h>
#include <KoSelectedShapesProxy.h>
#include "ui_KoStrokeConfigWidget.h"
#include <KoFlakeUtils.h>
#include <KoFillConfigWidget.h>
#include "kis_canvas_resource_provider.h"
#include "kis_acyclic_signal_connector.h"
#include <kis_signal_compressor.h>
#include "kis_double_parse_unit_spin_box.h"

Go to the source code of this file.

Classes

class  CapNJoinMenu
 
struct  CheckShapeMarkerPolicy
 
struct  CheckShapeStrokeCapJoinPolicy
 
struct  CheckShapeStrokeDashesPolicy
 
struct  CheckShapeStrokeStyleBasePolicy
 
struct  CheckShapeStrokeWidthPolicy
 
class  KoStrokeConfigWidget
 A widget for configuring the stroke of a shape. More...
 

Functions

template<typename ModifyFunction >
auto applyChangeToStrokes (KoCanvasBase *canvas, ModifyFunction modifyFunction) -> decltype(modifyFunction(KoShapeStrokeSP()), void())
 

Function Documentation

◆ applyChangeToStrokes()

template<typename ModifyFunction >
auto applyChangeToStrokes ( KoCanvasBase * canvas,
ModifyFunction modifyFunction ) -> decltype(modifyFunction(KoShapeStrokeSP()), void())

Definition at line 494 of file KoStrokeConfigWidget.cpp.

496{
497 KoSelection *selection = canvas->selectedShapesProxy()->selection();
498
499 if (!selection) return;
500
501 QList<KoShape*> shapes = selection->selectedEditableShapes();
502
503 KUndo2Command *command = KoFlake::modifyShapesStrokes(shapes, modifyFunction);
504
505 if (command) {
506 canvas->addCommand(command);
507 }
508}
virtual void addCommand(KUndo2Command *command)=0
virtual KoSelectedShapesProxy * selectedShapesProxy() const =0
selectedShapesProxy() is a special interface for keeping a persistent connections to selectionChanged...
virtual KoSelection * selection()=0
const QList< KoShape * > selectedEditableShapes() const
auto modifyShapesStrokes(QList< KoShape * > shapes, ModifyFunction modifyFunction) -> decltype(modifyFunction(KoShapeStrokeSP()),(KUndo2Command *)(0))

References KoFlake::modifyShapesStrokes(), and KoSelection::selectedEditableShapes().