From kde-commits Mon Nov 30 22:37:41 2009 From: =?utf-8?q?Luk=C3=A1=C5=A1=20Tvrd=C3=BD?= Date: Mon, 30 Nov 2009 22:37:41 +0000 To: kde-commits Subject: koffice/krita/plugins/paintops/spray Message-Id: <1259620661.819642.373.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=125962066725419 SVN commit 1056816 by lukast: Optimize the image handling a bit. Don't scale image, it is already scaled in prepareImage() M +1 -12 kis_spray_shape_option.cpp M +3 -4 kis_spray_shape_option.h --- trunk/koffice/krita/plugins/paintops/spray/kis_spray_shape_option.cpp #1056815:1056816 @@ -49,7 +49,7 @@ connect(m_options->randomSlider,SIGNAL(valueChanged(int)),this,SLOT(randomValueChanged(int))); connect(m_options->followSlider,SIGNAL(valueChanged(int)),this,SLOT(followValueChanged(int))); - connect(m_options->imageUrl,SIGNAL(urlSelected(KUrl)),this,SLOT(prepareImage())); + connect(m_options->imageUrl,SIGNAL(textChanged(QString)),this,SLOT(prepareImage())); setConfigurationPage(m_options); } @@ -117,17 +117,6 @@ } - - -QImage KisSprayShapeOption::image() -{ - m_image = QImage( m_options->imageUrl->url().toLocalFile() ); - m_image = m_image.scaled( width(), height() ); - return m_image; -} - - - bool KisSprayShapeOption::fixedRotation() const { return m_options->fixedRotation->isChecked(); --- trunk/koffice/krita/plugins/paintops/spray/kis_spray_shape_option.h #1056815:1056816 @@ -55,11 +55,10 @@ bool followCursor() const; qreal followCursorWeigth() const; - QImage image(); - - /// TODO + QImage image() const { return m_image; } + + /// TODO: serialization void writeOptionSetting(KisPropertiesConfiguration* setting) const; - /// TODO void readOptionSetting(const KisPropertiesConfiguration* setting); private: KisShapeOptionsWidget * m_options;