Esempio n. 1
0
KisHairyBristleOption::KisHairyBristleOption()
    : KisPaintOpOption(i18n("Bristle options"), KisPaintOpOption::generalCategory(), false)
{
    m_checkable = false;
    m_options = new KisBristleOptionsWidget();

    // signals
    connect(m_options->mousePressureCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->thresholdCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->rndBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->scaleBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->shearBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->densityBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->connectedCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->antialiasCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->compositingCBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    setConfigurationPage(m_options);
}
KisBrushOptionWidget::KisBrushOptionWidget()
        : KisPaintOpOption(i18n("Brush Tip"), KisPaintOpOption::brushCategory(), true)
{
    m_checkable = false;
    m_brushSelectionWidget = new KisBrushSelectionWidget();
    connect(m_brushSelectionWidget, SIGNAL(sigPrecisionChanged()), SIGNAL(sigSettingChanged()));
    connect(m_brushSelectionWidget, SIGNAL(sigBrushChanged()), SLOT(brushChanged()));
    m_brushSelectionWidget->hide();
    setConfigurationPage(m_brushSelectionWidget);
    m_brushOption.setBrush(brush());
}
void KisCompositeOpOption::changeCompositeOp(const KoID& compositeOp)
{
    if(compositeOp.id() == m_currCompositeOpID)
        return;
    
    m_prevCompositeOpID = m_currCompositeOpID;
    m_currCompositeOpID = compositeOp.id();
    
    if(m_createConfigWidget) {
        m_label->setText(compositeOp.name());
        m_bnEraser->blockSignals(true);
        m_bnEraser->setChecked(m_currCompositeOpID == "erase");
        m_bnEraser->blockSignals(false);
    }
    
    emit sigSettingChanged();
}
Esempio n. 4
0
    setupBrushPreviewSignals();
    setConfigurationPage(m_options);
}


void KisSprayShapeOption::setupBrushPreviewSignals()
{
    connect(m_options->proportionalBox, SIGNAL(toggled(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->proportionalBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));

    connect(m_options->shapeBox, SIGNAL(currentIndexChanged(int)), SIGNAL(sigSettingChanged()));
    connect(m_options->widthSpin, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
    connect(m_options->heightSpin, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));

    connect(m_options->aspectButton, SIGNAL(keepAspectRatioChanged(bool)), SIGNAL(sigSettingChanged()));
    connect(m_options->imageUrl, SIGNAL(textChanged(QString)), SIGNAL(sigSettingChanged()));
}


KisSprayShapeOption::~KisSprayShapeOption()
{
    delete m_options;
}

int KisSprayShapeOption::shape() const
{
    return m_options->shapeBox->currentIndex();
}


void KisSprayShapeOption::writeOptionSetting(KisPropertiesConfiguration* setting) const
void KisPressureScatterOptionWidget::yAxisEnabled(bool enable)
{
    static_cast<KisPressureScatterOption*>(curveOption())->enableAxisY(enable);
    emit sigSettingChanged();
}
KisHatchingOptions::KisHatchingOptions()
        : KisPaintOpOption(i18n("Hatching options"), KisPaintOpOption::brushCategory(), false)
{
    m_checkable = false;
    m_options = new KisHatchingOptionsWidget();
    
    connect(m_options->angleKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->separationKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->thicknessKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->originXKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
    connect(m_options->originYKisDoubleSliderSpinBox, SIGNAL(valueChanged(qreal)), SIGNAL(sigSettingChanged()));
   
    connect(m_options->noCrosshatchingRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
    connect(m_options->perpendicularRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
    connect(m_options->minusThenPlusRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
    connect(m_options->plusThenMinusRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
    connect(m_options->moirePatternRadioButton, SIGNAL(clicked(bool)),SIGNAL(sigSettingChanged()));
    
    connect(m_options->separationIntervalSpinBox, SIGNAL(valueChanged(int)),SIGNAL(sigSettingChanged()));
    
    setConfigurationPage(m_options);
}
void KisPaintOpOption::setChecked(bool checked)
{
    m_d->checked = checked;
    emit sigSettingChanged();
}
Esempio n. 8
0
void KisDuplicateOpOption::readOptionSetting(const KisPropertiesConfiguration* setting)
{
    m_optionWidget->cbHealing->setChecked( setting->getBool( "Duplicateop/Healing", false ) );
    m_optionWidget->cbPerspective->setChecked( setting->getBool( "Duplicateop/CorrectPerspective", false ) );
    emit sigSettingChanged();
}
void KisPressureMirrorOptionWidget::verticalMirrorChanged(bool mirror)
{
    static_cast<KisPressureMirrorOption*>(curveOption())->enableVerticalMirror(mirror);
    emit sigSettingChanged();
}
void KisBrushOptionWidget::brushChanged()
{
    m_brushOption.setBrush(brush());
    emit sigSettingChanged();
}