|
|
|
@ -42,8 +42,8 @@ KisAutobrush::KisAutobrush(TQWidget *parent, const char* name, const TQString& c
|
|
|
|
|
connect((TQObject*)comboBoxShape, TQT_SIGNAL(activated(int)), this, TQT_SLOT(paramChanged()));
|
|
|
|
|
spinBoxWidth->setMinValue(1);
|
|
|
|
|
connect(spinBoxWidth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxWidthChanged(int)));
|
|
|
|
|
spinBoxHeigth->setMinValue(1);
|
|
|
|
|
connect(spinBoxHeigth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHeigthChanged(int)));
|
|
|
|
|
spinBoxHeight->setMinValue(1);
|
|
|
|
|
connect(spinBoxHeight,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHeightChanged(int)));
|
|
|
|
|
spinBoxHorizontal->setMinValue(0);
|
|
|
|
|
connect(spinBoxHorizontal,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHorizontalChanged(int)));
|
|
|
|
|
spinBoxVertical->setMinValue(0);
|
|
|
|
@ -73,16 +73,16 @@ void KisAutobrush::activate()
|
|
|
|
|
void KisAutobrush::paramChanged()
|
|
|
|
|
{
|
|
|
|
|
TQ_INT32 fh = TQMIN( spinBoxWidth->value()/2, spinBoxHorizontal->value() ) ;
|
|
|
|
|
TQ_INT32 fv = TQMIN( spinBoxHeigth->value()/2, spinBoxVertical->value() );
|
|
|
|
|
TQ_INT32 fv = TQMIN( spinBoxHeight->value()/2, spinBoxVertical->value() );
|
|
|
|
|
KisAutobrushShape* kas;
|
|
|
|
|
|
|
|
|
|
if(comboBoxShape->currentItem() == 0) // use index compare instead of comparing a translatable string
|
|
|
|
|
{
|
|
|
|
|
kas = new KisAutobrushCircleShape(spinBoxWidth->value(), spinBoxHeigth->value(), fh, fv);
|
|
|
|
|
kas = new KisAutobrushCircleShape(spinBoxWidth->value(), spinBoxHeight->value(), fh, fv);
|
|
|
|
|
TQ_CHECK_PTR(kas);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
kas = new KisAutobrushRectShape(spinBoxWidth->value(), spinBoxHeigth->value(), fh, fv);
|
|
|
|
|
kas = new KisAutobrushRectShape(spinBoxWidth->value(), spinBoxHeight->value(), fh, fv);
|
|
|
|
|
TQ_CHECK_PTR(kas);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -119,12 +119,12 @@ void KisAutobrush::spinBoxWidthChanged(int a)
|
|
|
|
|
spinBoxHorizontal->setMaxValue(a/2);
|
|
|
|
|
if(m_linkSize)
|
|
|
|
|
{
|
|
|
|
|
spinBoxHeigth->setValue(a);
|
|
|
|
|
spinBoxHeight->setValue(a);
|
|
|
|
|
spinBoxVertical->setMaxValue(a/2);
|
|
|
|
|
}
|
|
|
|
|
this->paramChanged();
|
|
|
|
|
}
|
|
|
|
|
void KisAutobrush::spinBoxHeigthChanged(int a)
|
|
|
|
|
void KisAutobrush::spinBoxHeightChanged(int a)
|
|
|
|
|
{
|
|
|
|
|
spinBoxVertical->setMaxValue(a/2);
|
|
|
|
|
if(m_linkSize)
|
|
|
|
|