/* ============================================================ * * This file is a part of kipi-plugins project * http://www.kipi-plugins.org * * Date : 2004-10-01 * Description : a kipi plugin to batch process images * * Copyright (C) 2004-2007 by Gilles Caulier * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ // Include files for TQt #include #include #include #include #include #include #include #include #include // Include files for KDE #include #include #include // Local includes #include "effectoptionsdialog.h" #include "effectoptionsdialog.moc" namespace KIPIBatchProcessImagesPlugin { EffectOptionsDialog::EffectOptionsDialog(TQWidget *parent, int EffectType) : KDialogBase( parent, "EffectOptionsDialog", true, i18n("Effect Options"), Ok|Cancel, Ok, false) { TQWidget* box = new TQWidget( this ); setMainWidget(box); TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() ); TQString whatsThis; if (EffectType == 0) // Adaptive threshold { TQLabel *m_label_latWidth = new TQLabel (i18n("Width:"), box); dvlay->addWidget( m_label_latWidth ); m_latWidth = new KIntNumInput(50, box); m_latWidth->setRange(0, 200, 1, true ); TQWhatsThis::add( m_latWidth, i18n("

Select here the value which represents the width " "of the local neighborhood.") ); m_label_latWidth->setBuddy( m_latWidth ); dvlay->addWidget( m_latWidth ); TQLabel *m_label_latHeight = new TQLabel (i18n("Height:"), box); dvlay->addWidget( m_label_latHeight ); m_latHeight = new KIntNumInput(50, box); m_latHeight->setRange(0, 200, 1, true ); TQWhatsThis::add( m_latHeight, i18n("

Select here the value which represents the height of " "the local neighborhood.") ); m_label_latHeight->setBuddy( m_latHeight ); dvlay->addWidget( m_latHeight ); TQLabel *m_label_latOffset = new TQLabel (i18n("Offset:"), box); dvlay->addWidget( m_label_latOffset ); m_latOffset = new KIntNumInput(1, box); m_latOffset->setRange(0, 200, 1, true ); TQWhatsThis::add( m_latOffset, i18n("

Select here the value which represents the mean offset.") ); m_label_latOffset->setBuddy( m_latOffset ); dvlay->addWidget( m_latOffset ); } if (EffectType == 1) // Charcoal { TQLabel *m_label_charcoalRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_charcoalRadius ); m_charcoalRadius = new KIntNumInput(3, box); m_charcoalRadius->setRange(0, 20, 1, true ); TQWhatsThis::add( m_charcoalRadius, i18n("

Select here the value which represents the " "radius of the pixel neighborhood.") ); m_label_charcoalRadius->setBuddy( m_charcoalRadius ); dvlay->addWidget( m_charcoalRadius ); TQLabel *m_label_charcoalDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_charcoalDeviation ); m_charcoalDeviation = new KIntNumInput(3, box); m_charcoalDeviation->setRange(0, 20, 1, true ); TQWhatsThis::add( m_charcoalDeviation, i18n("

Select here the value which represents the " "standard deviation of the Gaussian, in pixels.") ); m_label_charcoalDeviation->setBuddy( m_charcoalDeviation ); dvlay->addWidget( m_charcoalDeviation ); } if (EffectType == 2) // Detect edges { TQLabel *m_label_edgeRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_edgeRadius ); m_edgeRadius = new KIntNumInput(3, box); m_edgeRadius->setRange(0, 20, 1, true ); TQWhatsThis::add( m_edgeRadius, i18n("

Select here the value which represents the radius of " "the pixel neighborhood. Radius defines the radius of the " "convolution filter. If you use a radius of 0 the algorithm selects " "a suitable radius.") ); m_label_edgeRadius->setBuddy( m_edgeRadius ); dvlay->addWidget( m_edgeRadius ); } if (EffectType == 3) // Emboss { TQLabel *m_label_embossRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_embossRadius ); m_embossRadius = new KIntNumInput(3, box); m_embossRadius->setRange(0, 20, 1, true ); TQWhatsThis::add( m_embossRadius, i18n("

Select here the value which represents the radius of the " "pixel neighborhood. For reasonable results, radius should be " "larger than deviation. If you use a radius of 0 the algorithm " "selects a suitable radius.") ); m_label_embossRadius->setBuddy( m_embossRadius ); dvlay->addWidget( m_embossRadius ); TQLabel *m_label_embossDeviation = new TQLabel (i18n("Deviation:"), box); dvlay->addWidget( m_label_embossDeviation ); m_embossDeviation = new KIntNumInput(3, box); m_embossDeviation->setRange(0, 20, 1, true ); TQWhatsThis::add( m_embossDeviation, i18n("

Select here the value which represents the standard " "deviation of the Gaussian, in pixels.") ); m_label_embossDeviation->setBuddy( m_embossDeviation ); dvlay->addWidget( m_embossDeviation ); } if (EffectType == 4) // Implode { TQLabel *m_label_implodeFactor = new TQLabel (i18n("Factor:"), box); dvlay->addWidget( m_label_implodeFactor ); m_implodeFactor = new KIntNumInput(1, box); m_implodeFactor->setRange(0, 20, 1, true ); TQWhatsThis::add( m_implodeFactor, i18n("

Select here the value which represents the extent of " "the implosion.") ); m_label_implodeFactor->setBuddy( m_implodeFactor ); dvlay->addWidget( m_implodeFactor ); } if (EffectType == 5) // Paint { TQLabel *m_label_paintRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_paintRadius ); m_paintRadius = new KIntNumInput(3, box); m_paintRadius->setRange(0, 20, 1, true ); TQWhatsThis::add( m_paintRadius, i18n("

Select here the value which represents the radius of " "the circular neighborhood. Each pixel is replaced by the " "most frequent color occurring in a circular region defined " "by the radius.") ); m_label_paintRadius->setBuddy( m_paintRadius ); dvlay->addWidget( m_paintRadius ); } if (EffectType == 6) // Shade light { TQLabel *m_label_shadeAzimuth = new TQLabel (i18n("Azimuth:"), box); dvlay->addWidget( m_label_shadeAzimuth ); m_shadeAzimuth = new KIntNumInput(40, box); m_shadeAzimuth->setRange(0, 360, 1, true ); TQWhatsThis::add( m_shadeAzimuth, i18n("

Select here the value which represents the azimuth of " "the light source direction. The azimuth is measured in degrees " "above the x axis.") ); m_label_shadeAzimuth->setBuddy( m_shadeAzimuth ); dvlay->addWidget( m_shadeAzimuth ); TQLabel *m_label_shadeElevation = new TQLabel (i18n("Elevation:"), box); dvlay->addWidget( m_label_shadeElevation ); m_shadeElevation = new KIntNumInput(40, box); m_shadeElevation->setRange(0, 500, 1, true ); TQWhatsThis::add( m_shadeElevation, i18n("

Select here the value which represents the elevation of " "the light source direction. The elevation is measured in " "pixels above the Z axis.") ); m_label_shadeElevation->setBuddy( m_shadeElevation ); dvlay->addWidget( m_shadeElevation ); } if (EffectType == 7) // Solarize { TQLabel *m_label_solarizeFactor = new TQLabel (i18n("Factor:"), box); dvlay->addWidget( m_label_solarizeFactor ); m_solarizeFactor = new KIntNumInput(3, box); m_solarizeFactor->setRange(0, 99, 1, true ); TQWhatsThis::add( m_solarizeFactor, i18n("

Select here the value which represents the percent-" "threshold of the solarize intensity.") ); m_label_solarizeFactor->setBuddy( m_solarizeFactor ); dvlay->addWidget( m_solarizeFactor ); } if (EffectType == 8) // Spread { TQLabel *m_label_spreadRadius = new TQLabel (i18n("Radius:"), box); dvlay->addWidget( m_label_spreadRadius ); m_spreadRadius = new KIntNumInput(10, box); m_spreadRadius->setRange(0, 200, 1, true ); TQWhatsThis::add( m_spreadRadius, i18n("

Select here the value which represents the random " "pixel in a neighborhood of this extent.") ); m_label_spreadRadius->setBuddy( m_spreadRadius ); dvlay->addWidget( m_spreadRadius ); } if (EffectType == 9) // Swirl { TQLabel *m_label_swirlDegrees = new TQLabel (i18n("Degrees:"), box); dvlay->addWidget( m_label_swirlDegrees ); m_swirlDegrees = new KIntNumInput(45, box); m_swirlDegrees->setRange(0, 360, 1, true ); TQWhatsThis::add( m_swirlDegrees, i18n("

Select here the value which represents the tightness of " "the swirling effect. You get a more dramatic effect as the " "degrees move from 1 to 360.") ); m_label_swirlDegrees->setBuddy( m_swirlDegrees ); dvlay->addWidget( m_swirlDegrees ); } if (EffectType == 10) // Wave { TQLabel *m_label_waveAmplitude = new TQLabel (i18n("Amplitude:"), box); dvlay->addWidget( m_label_waveAmplitude ); m_waveAmplitude = new KIntNumInput(50, box); m_waveAmplitude->setRange(0, 200, 1, true ); TQWhatsThis::add( m_waveAmplitude, i18n("

Select here the value which represents the amplitude of " "the sine wave.") ); m_label_waveAmplitude->setBuddy( m_waveAmplitude ); dvlay->addWidget( m_waveAmplitude ); TQLabel *m_label_waveLength = new TQLabel (i18n("Length:"), box); dvlay->addWidget( m_label_waveLength ); m_waveLength = new KIntNumInput(100, box); m_waveLength->setRange(0, 200, 1, true ); TQWhatsThis::add( m_waveLength, i18n("

Select here the value which represents the wave length " "of the sine wave.") ); m_label_waveLength->setBuddy( m_waveLength ); dvlay->addWidget( m_waveLength ); } } EffectOptionsDialog::~EffectOptionsDialog() { } } // NameSpace KIPIBatchProcessImagesPlugin