Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/kis_tool_paint.cc
Context not available. | |||||
80 | #include <kis_canvas_resource_provider.h> | 80 | #include <kis_canvas_resource_provider.h> | ||
---|---|---|---|---|---|
81 | 81 | | |||
82 | 82 | | |||
83 | KisToolPaint::KisToolPaint(KoCanvasBase * canvas, const QCursor & cursor) | 83 | KisToolPaint::KisToolPaint(KoCanvasBase *canvas, const QCursor &cursor) | ||
84 | : KisTool(canvas, cursor), | 84 | : KisTool(canvas, cursor), | ||
85 | m_showColorPreview(false), | 85 | m_showColorPreview(false), | ||
86 | m_colorPreviewShowComparePlate(false), | 86 | m_colorPreviewShowComparePlate(false), | ||
Context not available. | |||||
107 | m_standardBrushSizes.push_back(maxSize); | 107 | m_standardBrushSizes.push_back(maxSize); | ||
108 | } | 108 | } | ||
109 | 109 | | |||
110 | KisCanvas2 * kiscanvas = dynamic_cast<KisCanvas2*>(canvas); | 110 | KisCanvas2 *kiscanvas = dynamic_cast<KisCanvas2*>(canvas); | ||
111 | KisActionManager *actionManager = kiscanvas->viewManager()->actionManager(); | 111 | KisActionManager *actionManager = kiscanvas->viewManager()->actionManager(); | ||
112 | 112 | | |||
113 | // XXX: Perhaps a better place for these? | 113 | // XXX: Perhaps a better place for these? | ||
Context not available. | |||||
343 | }; | 343 | }; | ||
344 | 344 | | |||
345 | repaintDecorations(); | 345 | repaintDecorations(); | ||
346 | | ||||
347 | } | 346 | } | ||
348 | 347 | | |||
349 | bool KisToolPaint::isPickingAction(AlternateAction action) { | 348 | bool KisToolPaint::isPickingAction(AlternateAction action) { | ||
Context not available. | |||||
500 | 499 | | |||
501 | QWidget * KisToolPaint::createOptionWidget() | 500 | QWidget * KisToolPaint::createOptionWidget() | ||
502 | { | 501 | { | ||
503 | QWidget * optionWidget = new QWidget(); | 502 | QWidget *optionWidget = new QWidget(); | ||
504 | optionWidget->setObjectName(toolId()); | 503 | optionWidget->setObjectName(toolId()); | ||
505 | 504 | | |||
506 | QVBoxLayout* verticalLayout = new QVBoxLayout(optionWidget); | 505 | QVBoxLayout *verticalLayout = new QVBoxLayout(optionWidget); | ||
507 | verticalLayout->setObjectName("KisToolPaint::OptionWidget::VerticalLayout"); | 506 | verticalLayout->setObjectName("KisToolPaint::OptionWidget::VerticalLayout"); | ||
508 | verticalLayout->setContentsMargins(0,0,0,0); | 507 | verticalLayout->setContentsMargins(0,0,0,0); | ||
509 | verticalLayout->setSpacing(5); | 508 | verticalLayout->setSpacing(5); | ||
Context not available. | |||||
523 | m_optionsWidgetLayout->setSpacing(5); | 522 | m_optionsWidgetLayout->setSpacing(5); | ||
524 | 523 | | |||
525 | if (!quickHelp().isEmpty()) { | 524 | if (!quickHelp().isEmpty()) { | ||
526 | QPushButton* push = new QPushButton(KisIconUtils::loadIcon("help-contents"), QString(), optionWidget); | 525 | QPushButton *push = new QPushButton(KisIconUtils::loadIcon("help-contents"), QString(), optionWidget); | ||
527 | connect(push, SIGNAL(clicked()), this, SLOT(slotPopupQuickHelp())); | 526 | connect(push, SIGNAL(clicked()), this, SLOT(slotPopupQuickHelp())); | ||
528 | 527 | | |||
529 | QHBoxLayout* hLayout = new QHBoxLayout(optionWidget); | 528 | QHBoxLayout *hLayout = new QHBoxLayout(optionWidget); | ||
530 | hLayout->addWidget(push); | 529 | hLayout->addWidget(push); | ||
531 | hLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed)); | 530 | hLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed)); | ||
532 | verticalLayout->addLayout(hLayout); | 531 | verticalLayout->addLayout(hLayout); | ||
Context not available. | |||||
625 | { | 624 | { | ||
626 | KisTool::setupPaintAction(action); | 625 | KisTool::setupPaintAction(action); | ||
627 | action->setOpacity(m_opacity / qreal(255.0)); | 626 | action->setOpacity(m_opacity / qreal(255.0)); | ||
628 | const KoCompositeOp* op = compositeOp(); | 627 | const KoCompositeOp *op = compositeOp(); | ||
629 | if (op) { | 628 | if (op) { | ||
630 | action->setCompositeOp(op->id()); | 629 | action->setCompositeOp(op->id()); | ||
631 | } | 630 | } | ||
Context not available. |