You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
4.1 KiB
113 lines
4.1 KiB
/* ============================================================
|
|
*
|
|
* 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 <caulier dot gilles at gmail dot com>
|
|
*
|
|
* 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 <tqvbox.h>
|
|
#include <tqlayout.h>
|
|
#include <tqwidget.h>
|
|
#include <tqwhatsthis.h>
|
|
#include <tqlabel.h>
|
|
#include <tqpushbutton.h>
|
|
#include <tqgroupbox.h>
|
|
#include <tqcombobox.h>
|
|
#include <tqcolor.h>
|
|
|
|
// Include files for KDE
|
|
|
|
#include <kdialogbase.h>
|
|
#include <tdelocale.h>
|
|
#include <knuminput.h>
|
|
#include <kcolorbutton.h>
|
|
|
|
// Local includes
|
|
|
|
#include "coloroptionsdialog.h"
|
|
#include "coloroptionsdialog.moc"
|
|
|
|
namespace KIPIBatchProcessImagesPlugin
|
|
{
|
|
|
|
ColorOptionsDialog::ColorOptionsDialog(TQWidget *parent, int ColorType)
|
|
: KDialogBase( parent, "ColorOptionsDialog", true,
|
|
i18n("Color Options"), Ok|Cancel, Ok, false)
|
|
{
|
|
TQWidget* box = new TQWidget( this );
|
|
setMainWidget(box);
|
|
TQVBoxLayout *dvlay = new TQVBoxLayout( box, 10, spacingHint() );
|
|
TQString whatsThis;
|
|
|
|
if (ColorType == 1) // Depth
|
|
{
|
|
TQLabel *m_label_depthValue = new TQLabel (i18n("Depth value:"), box);
|
|
dvlay->addWidget( m_label_depthValue );
|
|
m_depthValue = new TQComboBox( false, box );
|
|
m_depthValue->insertItem("8");
|
|
m_depthValue->insertItem("16");
|
|
m_depthValue->insertItem("32");
|
|
TQWhatsThis::add( m_depthValue, i18n("<p>Select here the image depth in bits.") );
|
|
m_label_depthValue->setBuddy( m_depthValue );
|
|
dvlay->addWidget( m_depthValue );
|
|
}
|
|
|
|
if (ColorType == 3) // Fuzz
|
|
{
|
|
TQLabel *m_label_fuzzDistance = new TQLabel (i18n("Distance:"), box);
|
|
dvlay->addWidget( m_label_fuzzDistance );
|
|
m_fuzzDistance = new KIntNumInput(3, box);
|
|
m_fuzzDistance->setRange(0, 20, 1, true );
|
|
TQWhatsThis::add( m_fuzzDistance, i18n("<p>Select here the fuzz distance in "
|
|
"absolute intensity units.") );
|
|
m_label_fuzzDistance->setBuddy( m_fuzzDistance );
|
|
dvlay->addWidget( m_fuzzDistance );
|
|
}
|
|
|
|
if (ColorType == 9) // Segment
|
|
{
|
|
TQLabel *m_label_segmentCluster = new TQLabel (i18n("Cluster threshold:"), box);
|
|
dvlay->addWidget( m_label_segmentCluster );
|
|
m_segmentCluster = new KIntNumInput(3, box);
|
|
m_segmentCluster->setRange(0, 20, 1, true );
|
|
TQWhatsThis::add( m_segmentCluster, i18n("<p>Select here the value which represents the minimum "
|
|
"number of pixels contained in a hexahedra before it can "
|
|
"be considered valid.") );
|
|
m_label_segmentCluster->setBuddy( m_segmentCluster );
|
|
dvlay->addWidget( m_segmentCluster );
|
|
|
|
TQLabel *m_label_segmentSmooth = new TQLabel (i18n("Smooth threshold:"), box);
|
|
dvlay->addWidget( m_label_segmentSmooth );
|
|
m_segmentSmooth = new KIntNumInput(3, box);
|
|
m_segmentSmooth->setRange(0, 20, 1, true );
|
|
TQWhatsThis::add( m_segmentSmooth, i18n("<p>Select here the value which eliminates noise in the "
|
|
"second derivative of the histogram. As the value is increased, "
|
|
"you can expect a smoother second derivative.") );
|
|
m_label_segmentSmooth->setBuddy( m_segmentSmooth );
|
|
dvlay->addWidget( m_segmentSmooth );
|
|
}
|
|
}
|
|
|
|
ColorOptionsDialog::~ColorOptionsDialog()
|
|
{
|
|
}
|
|
|
|
} // NameSpace KIPIBatchProcessImagesPlugin
|