[Digikam-devel] branches/digikam/0.8-experimental/digikamimageplugins/solarize
Gilles Caulier
caulier.gilles at free.fr
Tue Jun 28 15:34:26 BST 2005
SVN commit 429676 by cgilles:
digiKam Solarize Image tool :
- Preview resizable.
- Remember dialog size.
- Fix cursor rules.
CCMAIL: digikam-devel at kde.org
M +18 -13 imageeffect_solarize.cpp
M +1 -0 imageeffect_solarize.h
--- branches/digikam/0.8-experimental/digikamimageplugins/solarize/imageeffect_solarize.cpp #429675:429676
@@ -108,24 +108,23 @@
// -------------------------------------------------------------
- QVGroupBox *gbox = new QVGroupBox(i18n("Preview"), plainPage());
- QFrame *frame = new QFrame(gbox);
+ QFrame *frame = new QFrame(plainPage());
frame->setFrameStyle(QFrame::Panel|QFrame::Sunken);
QVBoxLayout* l = new QVBoxLayout(frame, 5, 0);
- m_previewWidget = new Digikam::ImageWidget(480, 320,frame);
- l->addWidget(m_previewWidget, 0, Qt::AlignCenter);
- topLayout->addWidget(gbox);
-
+ m_previewWidget = new Digikam::ImageWidget(480, 320, frame);
+ QWhatsThis::add( m_previewWidget, i18n("<p>This is the solarize effect preview"));
+ l->addWidget(m_previewWidget, 0);
+ topLayout->addWidget(frame, 10);
+
QHBoxLayout *hlay = new QHBoxLayout(topLayout);
QLabel *label = new QLabel(i18n("Intensity:"), plainPage());
m_numInput = new KDoubleNumInput(plainPage());
m_numInput->setPrecision(1);
m_numInput->setRange(0.0, 100.0, 0.1, true);
- hlay->addWidget(label,1);
- hlay->addWidget(m_numInput,5);
+ hlay->addWidget(label, 1);
+ hlay->addWidget(m_numInput, 5);
- adjustSize();
- disableResize();
+ resize(configDialogSize("Solarize Image Tool Dialog"));
// -------------------------------------------------------------
@@ -135,7 +134,7 @@
ImageEffect_Solarize::~ImageEffect_Solarize()
{
-
+ saveDialogSize("Solarize Image Tool Dialog");
}
void ImageEffect_Solarize::slotHelp()
@@ -151,6 +150,12 @@
e->accept();
}
+void ImageEffect_Solarize::resizeEvent(QResizeEvent *)
+{
+ m_previewWidget->updateImageIface();
+ slotEffect();
+}
+
void ImageEffect_Solarize::slotEffect()
{
Digikam::ImageIface* iface = m_previewWidget->imageIface();
@@ -172,7 +177,7 @@
void ImageEffect_Solarize::slotOk()
{
- m_parent->setCursor( KCursor::waitCursor() );
+ kapp->setOverrideCursor( KCursor::waitCursor() );
Digikam::ImageIface* iface = m_previewWidget->imageIface();
uint* data = iface->getOriginalData();
@@ -190,7 +195,7 @@
delete [] data;
}
- m_parent->setCursor( KCursor::arrowCursor() );
+ kapp->restoreOverrideCursor();
accept();
}
--- branches/digikam/0.8-experimental/digikamimageplugins/solarize/imageeffect_solarize.h #429675:429676
@@ -53,6 +53,7 @@
void solarize(double factor, uint *data, int w, int h);
void closeEvent(QCloseEvent *e);
+ void resizeEvent(QResizeEvent *e);
private:
More information about the Digikam-devel
mailing list