summaryrefslogtreecommitdiffstats
path: root/src/imageedit
diff options
context:
space:
mode:
Diffstat (limited to 'src/imageedit')
-rw-r--r--src/imageedit/CMakeLists.txt13
-rw-r--r--src/imageedit/sq_bcglabel.cpp28
-rw-r--r--src/imageedit/sq_bcglabel.h34
-rw-r--r--src/imageedit/sq_converter.cpp444
-rw-r--r--src/imageedit/sq_converter.h120
-rw-r--r--src/imageedit/sq_imagebcg.ui989
-rw-r--r--src/imageedit/sq_imagebcg.ui.h241
-rw-r--r--src/imageedit/sq_imageconvert.ui343
-rw-r--r--src/imageedit/sq_imageconvert.ui.h214
-rw-r--r--src/imageedit/sq_imageedit.h84
-rw-r--r--src/imageedit/sq_imageeditoptions.ui226
-rw-r--r--src/imageedit/sq_imageeditoptions.ui.h52
-rw-r--r--src/imageedit/sq_imagefilter.ui1559
-rw-r--r--src/imageedit/sq_imagefilter.ui.h610
-rw-r--r--src/imageedit/sq_label.cpp78
-rw-r--r--src/imageedit/sq_label.h41
-rw-r--r--src/imageedit/sq_writeoption.ui168
17 files changed, 5244 insertions, 0 deletions
diff --git a/src/imageedit/CMakeLists.txt b/src/imageedit/CMakeLists.txt
new file mode 100644
index 0000000..d86b7f3
--- /dev/null
+++ b/src/imageedit/CMakeLists.txt
@@ -0,0 +1,13 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### imageedit library (static)
+
+tde_add_library( imageedit STATIC_PIC AUTOMOC
+ SOURCES
+ sq_writeoption.ui sq_label.cpp sq_imagefilter.ui sq_imageeditoptions.ui sq_imageconvert.ui
+ sq_imagebcg.ui sq_converter.cpp sq_bcglabel.cpp
+)
diff --git a/src/imageedit/sq_bcglabel.cpp b/src/imageedit/sq_bcglabel.cpp
new file mode 100644
index 0000000..41395e3
--- /dev/null
+++ b/src/imageedit/sq_bcglabel.cpp
@@ -0,0 +1,28 @@
+/***************************************************************************
+ sq_bcglabel.cpp - description
+ -------------------
+ begin : ??? May 4 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "sq_bcglabel.h"
+
+SQ_BCGLabel::SQ_BCGLabel(TQWidget *parent, const char *name, WFlags f) : TQLabel(parent, name, f | TQt::WNoAutoErase)
+{
+ setScaledContents(false);
+
+ setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+}
+
+SQ_BCGLabel::~SQ_BCGLabel()
+{}
diff --git a/src/imageedit/sq_bcglabel.h b/src/imageedit/sq_bcglabel.h
new file mode 100644
index 0000000..d8546a9
--- /dev/null
+++ b/src/imageedit/sq_bcglabel.h
@@ -0,0 +1,34 @@
+/***************************************************************************
+ sq_bcglabel.h - description
+ -------------------
+ begin : ??? May 4 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SQ_BCGLABEL_H
+#define SQ_BCGLABEL_H
+
+#include <tqlabel.h>
+
+/**
+ *@author Baryshev Dmitry
+ */
+
+class SQ_BCGLabel : public TQLabel
+{
+ public:
+ SQ_BCGLabel(TQWidget *parent, const char *name = 0, WFlags f = 0);
+ ~SQ_BCGLabel();
+};
+
+#endif
diff --git a/src/imageedit/sq_converter.cpp b/src/imageedit/sq_converter.cpp
new file mode 100644
index 0000000..ebe8e72
--- /dev/null
+++ b/src/imageedit/sq_converter.cpp
@@ -0,0 +1,444 @@
+/***************************************************************************
+ sq_converter.cpp - description
+ -------------------
+ begin : ??? Mar 3 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <tqapplication.h>
+#include <tqfile.h>
+
+#include <tdemessagebox.h>
+#include <kstringhandler.h>
+#include <tdestandarddirs.h>
+#include <tdetempfile.h>
+#include <tdelocale.h>
+
+#include "ksquirrel.h"
+#include "sq_converter.h"
+#include "sq_widgetstack.h"
+#include "sq_diroperator.h"
+#include "sq_libraryhandler.h"
+#include "sq_config.h"
+#include "sq_errorstring.h"
+#include "sq_imageloader.h"
+#include "sq_imageconvert.h"
+
+SQ_Converter * SQ_Converter::m_sing = 0;
+
+SQ_Converter::SQ_Converter(TQObject *parent) : TQObject(parent)
+{
+ m_sing = this;
+
+ err_internal = i18n("internal error") + '\n';
+ err_failed = i18n("failed") + '\n';
+
+ special_action = i18n("Converting");
+
+ image = 0;
+}
+
+SQ_Converter::~SQ_Converter()
+{
+ if(image) free(image);
+}
+
+void SQ_Converter::slotStartEdit()
+{
+ files.clear();
+
+ KFileItemList *items = (KFileItemList *)SQ_WidgetStack::instance()->selectedItems();
+
+ if(!items || !items->count())
+ {
+ KMessageBox::information(KSquirrel::app(), i18n("Select files to edit"));
+ return;
+ }
+ else if(!items->first()->url().isLocalFile())
+ {
+ KMessageBox::information(KSquirrel::app(), i18n("Converter cannot work with remote files.\nSorry"));
+ return;
+ }
+
+ KFileItem *i = items->first();
+
+ for(;i;i = items->next())
+ {
+ if(i->isFile())
+ files.append(i->url().path());
+ }
+
+ startEditPrivate();
+}
+
+TQString SQ_Converter::adjustFileName(const TQString &globalprefix, const TQString &name1, int replace, TQString putto, bool paged, int page)
+{
+ TQFileInfo ff(name1);
+ TQString name = ff.dirPath() + '/' + (replace == 0 ? globalprefix : (replace == 2 ? TQString() : globalprefix)) + ff.fileName();
+ ff = TQFileInfo(name);
+
+ TQString result, inner, filter = lw->filter;
+ TQString ext = ff.extension(false);
+ TQString prefix, suffix, name2 = name;
+ TQString spage = TQString::fromLatin1("page_%1.").arg((TQString::fromLatin1("%1").arg(page)).rightJustify(3, '0'));
+
+ if(!putto.isEmpty())
+ {
+ if(TQFile::exists(putto))
+ name2 = putto + '/' + ff.fileName();
+ }
+
+ prefix = name2;
+
+ prefix.truncate(name2.length() - ext.length());
+
+ suffix = (SQ_LibraryHandler::instance()->knownExtension(TQString::fromLatin1("*.") + ext))
+ ? TQString(lw->codec->extension(32).c_str()) : ext;
+
+ if(replace == 0 || replace == 2)
+ result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix);
+ else
+ {
+ result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix);
+
+ if(TQFile::exists(result))
+ {
+ inner = TQString::fromLatin1("1.");
+ result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix);
+ }
+ }
+
+ return result;
+}
+
+void SQ_Converter::errorjmp(jmp_buf jmp, const int code)
+{
+ error_code = code;
+ longjmp(jmp, 1);
+}
+
+void SQ_Converter::decodingCycle()
+{
+ int i, j;
+ TQString name;
+ jmp_buf jmp;
+ RGBA *scan;
+ int errors, gerrors = 0, current;
+ TQString putto;
+ int replace = imageopt.where_to_put;
+ bool brk;
+
+ SQ_Config::instance()->setGroup("Edit tools");
+
+ int allpages = SQ_Config::instance()->readNumEntry("load_pages", 0);
+ int pages_num = SQ_Config::instance()->readNumEntry("load_pages_number", 1);
+
+ if(pages_num < 1) pages_num = 1;
+
+ altw = SQ_LibraryHandler::instance()->libraryByName(SQ_Config::instance()->readEntry("altlibrary", "Portable Network Graphics"));
+ multi = SQ_Config::instance()->readBoolEntry("multi", true);
+
+ tempfile = new KTempFile;
+ tempfile->setAutoDelete(true);
+
+ if(tempfile->status())
+ {
+ KMessageBox::error(KSquirrel::app(), i18n("Temporary file creation failed"));
+ return;
+ }
+
+ tempfile->close();
+
+ TQStringList::iterator last_it = files.fromLast();
+ TQStringList::iterator itEnd = files.end();
+ convert->startConvertion(files.count());
+
+ putto = imageopt.putto;
+
+ for(TQStringList::iterator it = files.begin();it != itEnd;++it)
+ {
+ currentFile = *it;
+ last = (it == last_it);
+
+ TQFileInfo ff(*it);
+
+ emit convertText(special_action + ' ' + KStringHandler::rsqueeze(ff.fileName()) + "... ", false);
+
+ if((lr = SQ_LibraryHandler::instance()->libraryForFile(*it)))
+ {
+ lw = SQ_LibraryHandler::instance()->libraryByName(convopt.libname);
+
+ if(!lr || !lw)
+ {
+ gerrors++;
+ emit convertText(err_internal, true);
+ emit oneFileProcessed();
+ continue;
+ }
+
+ name = TQFile::encodeName(*it);
+
+ i = lr->codec->read_init(name.ascii());
+
+ if(setjmp(jmp))
+ {
+ gerrors++;
+
+ lr->codec->read_close();
+
+ emit convertText(SQ_ErrorString::instance()->stringSN(error_code), true);
+ emit oneFileProcessed();
+
+ continue;
+ }
+
+ if(i != SQE_OK)
+ errorjmp(jmp, i);
+
+ errors = 0;
+ current = 0;
+
+ while(true)
+ {
+ brk = (allpages == 1 && current) || (allpages == 2 && current == pages_num);
+
+ i = lr->codec->read_next();
+
+ im = lr->codec->image(current-1);
+
+ if(i != SQE_OK || brk)
+ {
+ if(i == SQE_NOTOK || brk)
+ {
+ if(current == 1)
+ name = adjustFileName(prefix, *it, replace, putto);
+ else
+ name = adjustFileName(prefix, *it, replace, putto, true, current);
+
+ lastFrame = last;
+
+ i = manipAndWriteDecodedImage(tempfile->name(), im);
+
+ emit convertText(errors ? (i18n("1 error", "%n errors", errors)+'\n') : SQ_ErrorString::instance()->stringSN(SQE_OK), true);
+ emit oneFileProcessed();
+
+ i = SQE_OK;
+
+ if(replace == 2)
+ {
+ emit convertText(i18n("Removing") + KStringHandler::rsqueeze(ff.fileName()) + TQString("... "), false);
+
+ bool b = TQFile::remove(*it);
+
+ emit convertText(b ? SQ_ErrorString::instance()->stringSN(SQE_OK) : err_failed, true);
+ emit oneFileProcessed();
+ }
+
+ i = copyFile(tempfile->name(), name);
+
+ break;
+ }
+ else
+ errorjmp(jmp, i);
+ }
+
+ if(current)
+ {
+ name = adjustFileName(prefix, *it, replace, putto, true, current);
+
+ lastFrame = false;
+
+ manipAndWriteDecodedImage(tempfile->name(), im);
+ i = copyFile(tempfile->name(), name);
+ }
+
+ im = lr->codec->image(current);
+
+ image = (RGBA *)realloc(image, im->w * im->h * sizeof(RGBA));
+
+ if(!image)
+ {
+ i = SQE_R_NOMEMORY;
+ errorjmp(jmp, i);
+ }
+
+ for(int pass = 0;pass < im->passes;pass++)
+ {
+ lr->codec->read_next_pass();
+
+ for(j = 0;j < im->h;j++)
+ {
+ scan = image + j * im->w;
+ i = lr->codec->read_scanline(scan);
+ errors += (int)(i != SQE_OK);
+ }
+ }
+
+ if(im->needflip)
+ fmt_utils::flipv((char *)image, im->w * sizeof(RGBA), im->h);
+
+ convert->fillWriteOptions(&opt, lw->opt);
+
+ opt.alpha = im->hasalpha;
+
+ current++;
+ }
+
+ lr->codec->read_close();
+ }
+ else
+ {
+ emit convertText(SQ_ErrorString::instance()->stringSN(SQE_R_NOTSUPPORTED), true);
+ emit oneFileProcessed();
+ }
+ }
+
+ if(image)
+ {
+ free(image);
+ image = 0;
+ }
+
+ delete convert;
+ delete tempfile;
+
+ if(imageopt.close && !gerrors)
+ emit done(true);
+ else
+ emit done(false);
+}
+
+int SQ_Converter::manipAndWriteDecodedImage(const TQString &name, fmt_image *im)
+{
+ int passes = opt.interlaced ? lw->opt.passes : 1;
+ int s, j, err;
+ RGBA *scan = 0;
+
+ scan = new RGBA [im->w];
+
+ if(!scan)
+ return SQE_W_NOMEMORY;
+
+ err = lw->codec->write_init(name.ascii(), *im, opt);
+
+ if(err != SQE_OK)
+ goto error_exit;
+
+ err = lw->codec->write_next();
+
+ if(err != SQE_OK)
+ goto error_exit;
+
+ for(s = 0;s < passes;s++)
+ {
+ err = lw->codec->write_next_pass();
+
+ if(err != SQE_OK)
+ goto error_exit;
+
+ for(j = 0;j < im->h;j++)
+ {
+ if(lw->opt.needflip)
+ determineNextScan(*im, scan, im->h-j-1);
+ else
+ determineNextScan(*im, scan, j);
+
+ err = lw->codec->write_scanline(scan);
+
+ if(err != SQE_OK)
+ goto error_exit;
+ }
+ }
+
+ err = SQE_OK;
+
+ error_exit:
+
+ lw->codec->write_close();
+
+ delete scan;
+
+ return err;
+}
+
+int SQ_Converter::copyFile(const TQString &src, const TQString &dst) const
+{
+ TQFile f_src(src), f_dst(dst);
+ TQ_LONG read;
+ char data[4096];
+
+ if(!f_src.open(IO_ReadOnly))
+ return SQE_R_NOFILE;
+
+ if(!f_dst.open(IO_WriteOnly))
+ {
+ f_src.close();
+ return SQE_W_NOFILE;
+ }
+
+ while(!f_src.atEnd())
+ {
+ read = f_src.readBlock(data, sizeof(data));
+
+ f_dst.writeBlock(data, read);
+
+ if(f_dst.status() != IO_Ok || f_src.status() != IO_Ok)
+ {
+ f_src.close();
+ f_dst.close();
+
+ return SQE_W_ERROR;
+ }
+ }
+
+ f_src.close();
+ f_dst.close();
+
+ return SQE_OK;
+}
+
+void SQ_Converter::determineNextScan(const fmt_image &im, RGBA *scan, int y)
+{
+ memcpy(scan, image + y * im.w, im.w * sizeof(RGBA));
+}
+
+void SQ_Converter::startEditPrivate()
+{
+ convert = new SQ_ImageConvert(KSquirrel::app());
+ convert->setCaption(i18n("Convert 1 file", "Convert %n files", files.count()));
+
+ connect(convert, TQ_SIGNAL(convert(SQ_ImageOptions*, SQ_ImageConvertOptions*)), this, TQ_SLOT(slotStartConvert(SQ_ImageOptions*, SQ_ImageConvertOptions*)));
+ connect(this, TQ_SIGNAL(convertText(const TQString &, bool)), convert, TQ_SLOT(slotDebugText(const TQString &, bool)));
+ connect(this, TQ_SIGNAL(oneFileProcessed()), convert, TQ_SLOT(slotOneProcessed()));
+ connect(this, TQ_SIGNAL(done(bool)), convert, TQ_SLOT(slotDone(bool)));
+
+ convert->exec();
+}
+
+void SQ_Converter::slotStartConvert(SQ_ImageOptions *o, SQ_ImageConvertOptions *copt)
+{
+ imageopt = *o;
+ convopt = *copt;
+
+ decodingCycle();
+}
+
+#include "sq_converter.moc"
diff --git a/src/imageedit/sq_converter.h b/src/imageedit/sq_converter.h
new file mode 100644
index 0000000..414dfe1
--- /dev/null
+++ b/src/imageedit/sq_converter.h
@@ -0,0 +1,120 @@
+/***************************************************************************
+ sq_converter.h - description
+ -------------------
+ begin : ??? Mar 3 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SQ_CONVERTER_H
+#define SQ_CONVERTER_H
+
+#include <tqobject.h>
+#include <tqstringlist.h>
+
+#include <sstream>
+#include <csetjmp>
+
+#include <ksquirrel-libs/fmt_utils.h>
+#include <ksquirrel-libs/fmt_codec_base.h>
+#include <ksquirrel-libs/error.h>
+
+#include "sq_imageedit.h"
+
+struct SQ_LIBRARY;
+
+class KTempFile;
+
+class SQ_ImageConvert;
+class SQ_ImageConvertOptions;
+
+/*
+ * Base class for all edit tools. It contains all methods needed by
+ * converter, resizer, printer etc. It decodes an image, writes it back to
+ * disk. All specific actions (like colorizing, resizing etc.) are done by
+ * appropriate edit tool.
+ */
+
+class SQ_Converter : public TQObject
+{
+ TQ_OBJECT
+
+
+ public:
+ SQ_Converter(TQObject *parent);
+ ~SQ_Converter();
+
+ public:
+ static SQ_Converter* instance() { return m_sing; }
+
+ private:
+ /*
+ * Create edit tool-specific dialog, and wait for user
+ * input
+ */
+ void startEditPrivate();
+
+ /*
+ * Do something with decoded image(manipDecodedImage()) and write it
+ * on disk.
+ */
+ int manipAndWriteDecodedImage(const TQString &name, fmt_image *im);
+
+ /*
+ * Main decoding loop.
+ */
+ void decodingCycle();
+
+ /*
+ * Determine file name. In this file SQ_Converter will save new image.
+ */
+ TQString adjustFileName(const TQString &globalprefix, const TQString &name, int replace,
+ TQString putto, bool paged = false, int page = 0);
+
+ void determineNextScan(const fmt_image &im, RGBA *scan, int y);
+
+ /*
+ * Copy file :-)
+ */
+ int copyFile(const TQString &src, const TQString &dst) const;
+
+ void errorjmp(jmp_buf jmp, const int code);
+
+ signals:
+ void convertText(const TQString &, bool);
+ void oneFileProcessed();
+ void done(bool allok);
+
+ private slots:
+ void slotStartEdit();
+ void slotStartConvert(SQ_ImageOptions*, SQ_ImageConvertOptions*);
+
+ protected:
+ TQStringList files;
+ TQString err_internal, err_failed;
+ TQString currentFile;
+ int error_code, current_page;
+ SQ_ImageOptions imageopt;
+ fmt_writeoptions opt;
+ SQ_LIBRARY *lr, *lw, *altw;
+ RGBA *image;
+ TQString special_action, prefix;
+ bool multi, last, lastFrame;
+ KTempFile *tempfile;
+ fmt_image *im;
+ static SQ_Converter *m_sing;
+
+ SQ_ImageConvert *convert;
+ SQ_ImageConvertOptions convopt;
+};
+
+#endif
diff --git a/src/imageedit/sq_imagebcg.ui b/src/imageedit/sq_imagebcg.ui
new file mode 100644
index 0000000..0e3d8f8
--- /dev/null
+++ b/src/imageedit/sq_imagebcg.ui
@@ -0,0 +1,989 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SQ_ImageBCG</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>SQ_ImageBCG</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>564</width>
+ <height>391</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Color balance</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQWidgetStack" row="1" column="0" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>widgetStackParams</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <widget class="TQSpinBox" row="2" column="0">
+ <property name="name">
+ <cstring>spinB</cstring>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>pushResetG</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>pushResetC</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KDoubleSpinBox" row="2" column="2">
+ <property name="name">
+ <cstring>spinG</cstring>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="2" column="1">
+ <property name="name">
+ <cstring>spinC</cstring>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pushResetB</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelB</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderB</cstring>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Brightness</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="1">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelC</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderC</cstring>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Contrast</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="2">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelG</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderG</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="maxValue">
+ <number>600</number>
+ </property>
+ <property name="value">
+ <number>100</number>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>22</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Gamma</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <widget class="TQPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pushResetRed</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="2" column="0">
+ <property name="name">
+ <cstring>spinRed</cstring>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="2" column="1">
+ <property name="name">
+ <cstring>spinGreen</cstring>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>pushResetGreen</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>pushResetBlue</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="2" column="2">
+ <property name="name">
+ <cstring>spinBlue</cstring>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="2">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelBlue</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderBlue</cstring>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Blue</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="1">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelGreen</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderGreen</cstring>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Green</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_Label">
+ <property name="name">
+ <cstring>sQ_LabelRed</cstring>
+ </property>
+ </widget>
+ <widget class="TQSlider">
+ <property name="name">
+ <cstring>sliderRed</cstring>
+ </property>
+ <property name="minValue">
+ <number>-255</number>
+ </property>
+ <property name="maxValue">
+ <number>255</number>
+ </property>
+ <property name="tickmarks">
+ <enum>Above</enum>
+ </property>
+ <property name="tickInterval">
+ <number>25</number>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Red</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>6</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="TQPushButton" row="0" column="4">
+ <property name="name">
+ <cstring>push2</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>push1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer26</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="2">
+ <property name="name">
+ <cstring>text</cstring>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignCenter</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer12_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>249</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushGO</cstring>
+ </property>
+ <property name="text">
+ <string>Colorize</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="Line" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>line2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLayoutWidget" row="2" column="1">
+ <property name="name">
+ <cstring>layout15</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Original image:</string>
+ </property>
+ </widget>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer35</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="SQ_BCGLabel" row="1" column="3">
+ <property name="name">
+ <cstring>pixmap1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>160</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Image after colorizing:</string>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer34</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="SQ_BCGLabel" row="1" column="1">
+ <property name="name">
+ <cstring>pixmap</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>160</height>
+ </size>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>SQ_BCGLabel</class>
+ <header location="local">sq_bcglabel.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+ <customwidget>
+ <class>SQ_Label</class>
+ <header location="local">sq_label.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>spinRed</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotRedChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>spinGreen</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotGreenChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>spinG</sender>
+ <signal>valueChanged(double)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotGSpinChanged(double)</slot>
+ </connection>
+ <connection>
+ <sender>spinC</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotCChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>spinBlue</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotBlueChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>spinB</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotBChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderRed</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotRedChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderGreen</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotGreenChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderG</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotGChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderC</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotCChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderBlue</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotBlueChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>sliderB</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotBChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>pushResetRed</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetRed()</slot>
+ </connection>
+ <connection>
+ <sender>pushResetGreen</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetGreen()</slot>
+ </connection>
+ <connection>
+ <sender>pushResetG</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetG()</slot>
+ </connection>
+ <connection>
+ <sender>pushResetC</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetC()</slot>
+ </connection>
+ <connection>
+ <sender>pushResetBlue</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetBlue()</slot>
+ </connection>
+ <connection>
+ <sender>pushResetB</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotResetB()</slot>
+ </connection>
+ <connection>
+ <sender>pushGO</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotStartBCG()</slot>
+ </connection>
+ <connection>
+ <sender>push2</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotPush()</slot>
+ </connection>
+ <connection>
+ <sender>push1</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>slotPush()</slot>
+ </connection>
+ <connection>
+ <sender>pushCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageBCG</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>push1</tabstop>
+ <tabstop>push2</tabstop>
+ <tabstop>pushResetRed</tabstop>
+ <tabstop>pushResetGreen</tabstop>
+ <tabstop>pushResetBlue</tabstop>
+ <tabstop>sliderRed</tabstop>
+ <tabstop>sliderGreen</tabstop>
+ <tabstop>sliderBlue</tabstop>
+ <tabstop>spinRed</tabstop>
+ <tabstop>spinGreen</tabstop>
+ <tabstop>spinBlue</tabstop>
+ <tabstop>pushGO</tabstop>
+ <tabstop>pushCancel</tabstop>
+ <tabstop>pushResetB</tabstop>
+ <tabstop>pushResetC</tabstop>
+ <tabstop>pushResetG</tabstop>
+ <tabstop>sliderB</tabstop>
+ <tabstop>sliderC</tabstop>
+ <tabstop>sliderG</tabstop>
+ <tabstop>spinB</tabstop>
+ <tabstop>spinC</tabstop>
+ <tabstop>spinG</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in declaration">sq_imageedit.h</include>
+ <include location="global" impldecl="in declaration">tqimage.h</include>
+ <include location="global" impldecl="in declaration">tqstringlist.h</include>
+ <include location="local" impldecl="in implementation">fmt_filters.h</include>
+ <include location="global" impldecl="in implementation">knuminput.h</include>
+ <include location="global" impldecl="in implementation">ksquirrel-libs/fmt_defs.h</include>
+ <include location="global" impldecl="in implementation">ksquirrel-libs/fmt_types.h</include>
+ <include location="global" impldecl="in implementation">tdestandarddirs.h</include>
+ <include location="global" impldecl="in implementation">sq_bcglabel.h</include>
+ <include location="local" impldecl="in implementation">sq_config.h</include>
+ <include location="local" impldecl="in implementation">sq_iconloader.h</include>
+ <include location="local" impldecl="in implementation">sq_imagebcg.ui.h</include>
+ <include location="global" impldecl="in implementation">sq_label.h</include>
+</includes>
+<variables>
+ <variable access="private">int id;</variable>
+ <variable access="private">TQImage sample, sample_saved;</variable>
+ <variable access="private">TQStringList strings;</variable>
+ <variable access="private">static SQ_ImageBCG *m_inst;</variable>
+</variables>
+<signals>
+ <signal>bcg(SQ_ImageBCGOptions*)</signal>
+</signals>
+<slots>
+ <slot access="private" specifier="non virtual">slotResetG()</slot>
+ <slot access="private" specifier="non virtual">slotResetC()</slot>
+ <slot access="private" specifier="non virtual">slotResetB()</slot>
+ <slot access="private" specifier="non virtual">slotResetRed()</slot>
+ <slot access="private" specifier="non virtual">slotResetGreen()</slot>
+ <slot access="private" specifier="non virtual">slotResetBlue()</slot>
+ <slot access="private" specifier="non virtual">slotStartBCG()</slot>
+ <slot access="private" specifier="non virtual">slotBChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotCChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotRedChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotGreenChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotBlueChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotGChanged( int v )</slot>
+ <slot access="private" specifier="non virtual">slotGSpinChanged( double v )</slot>
+ <slot access="private" specifier="non virtual">slotPush()</slot>
+</slots>
+<functions>
+ <function access="private" specifier="non virtual">init()</function>
+ <function access="private" specifier="non virtual" returnType="int">RGB2Y( int r, int g, int b )</function>
+ <function access="private" specifier="non virtual">assignNewImage( const TQImage &amp; im )</function>
+ <function access="private" specifier="non virtual">changeImage( int b, int c, int g1, int red, int green, int blue )</function>
+ <function specifier="non virtual">setPreviewImage( const TQImage &amp; im )</function>
+ <function specifier="static" returnType="SQ_ImageBCG *">instance()</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/imageedit/sq_imagebcg.ui.h b/src/imageedit/sq_imagebcg.ui.h
new file mode 100644
index 0000000..31c3516
--- /dev/null
+++ b/src/imageedit/sq_imagebcg.ui.h
@@ -0,0 +1,241 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** TQt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+SQ_ImageBCG * SQ_ImageBCG::m_inst = 0;
+
+void SQ_ImageBCG::init()
+{
+ m_inst = this;
+
+ TQPixmap p = TQPixmap::fromMimeSource(locate("data", "images/imageedit/reset_value.png"));
+
+ sQ_LabelB->setSingle(true);
+ sQ_LabelC->setSingle(true);
+ sQ_LabelG->setSingle(true);
+ sQ_LabelB->setText(tr2i18n("Brightness"));
+ sQ_LabelC->setText(tr2i18n("Contrast"));
+ sQ_LabelG->setText(tr2i18n("Gamma"));
+ sQ_LabelRed->setText(tr2i18n("Red"), tr2i18n("Cyan"));
+ sQ_LabelGreen->setText(tr2i18n("Green"), tr2i18n("Magenta"));
+ sQ_LabelBlue->setText(tr2i18n("Blue"), tr2i18n("Yellow"));
+
+ pushResetB->setPixmap(p);
+ pushResetC->setPixmap(p);
+ pushResetG->setPixmap(p);
+ pushResetRed->setPixmap(p);
+ pushResetGreen->setPixmap(p);
+ pushResetBlue->setPixmap(p);
+
+ strings.append(TQString("<b>") + tr2i18n("Brightness") + ",&nbsp;" + tr2i18n("Contrast") + ",&nbsp;" + tr2i18n("Gamma") + "</b>");
+ strings.append(TQString("<b>") + tr2i18n("Red") + ",&nbsp;" + tr2i18n("Green") + ",&nbsp;" + tr2i18n("Blue") + "</b>");
+
+ id = 0;
+ widgetStackParams->raiseWidget(id);
+ text->setText(strings[id]);
+
+ TQPixmap tool1 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton.png"));
+ TQPixmap tool2 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton2.png"));
+ push1->setPixmap(tool1);
+ push2->setPixmap(tool2);
+
+ spinG->setRange(0, 6.0, 0.01, 2);
+ spinG->setValue(1.0);
+ connect(spinG, TQ_SIGNAL(valueChanged(int)), spinG, TQ_SLOT(slotValueChanged(int)));
+}
+
+void SQ_ImageBCG::slotResetG()
+{
+ sliderG->setValue(100);
+}
+
+void SQ_ImageBCG::slotResetC()
+{
+ sliderC->setValue(0);
+}
+
+void SQ_ImageBCG::slotResetB()
+{
+ sliderB->setValue(0);
+}
+
+void SQ_ImageBCG::slotResetRed()
+{
+ sliderRed->setValue(0);
+}
+
+void SQ_ImageBCG::slotResetGreen()
+{
+ sliderGreen->setValue(0);
+}
+
+void SQ_ImageBCG::slotResetBlue()
+{
+ sliderBlue->setValue(0);
+}
+
+void SQ_ImageBCG::slotStartBCG()
+{
+ SQ_ImageBCGOptions opt;
+ opt.b = sliderB->value();
+ opt.c = sliderC->value();
+ opt.g = sliderG->value();
+ opt.red = sliderRed->value();
+ opt.green = sliderGreen->value();
+ opt.blue = sliderBlue->value();
+
+ emit bcg(&opt);
+}
+
+int SQ_ImageBCG::RGB2Y(int r, int g, int b)
+{
+ return (int)((double)r * 0.299 + (double)g * 0.587 + (double)b * 0.114);
+}
+
+void SQ_ImageBCG::slotBChanged(int v)
+{
+ spinB->blockSignals(true);
+ sliderB->blockSignals(true);
+ spinB->setValue(v);
+ sliderB->setValue(v);
+ spinB->blockSignals(false);
+ sliderB->blockSignals(false);
+
+ changeImage(v, sliderC->value(), sliderG->value(), sliderRed->value(), sliderGreen->value(), sliderBlue->value());
+}
+
+void SQ_ImageBCG::slotCChanged(int v)
+{
+ spinC->blockSignals(true);
+ sliderC->blockSignals(true);
+ spinC->setValue(v);
+ sliderC->setValue(v);
+ spinC->blockSignals(false);
+ sliderC->blockSignals(false);
+
+ changeImage(sliderB->value(), v, sliderG->value(), sliderRed->value(), sliderGreen->value(), sliderBlue->value());
+}
+
+void SQ_ImageBCG::slotRedChanged(int v)
+{
+ spinRed->blockSignals(true);
+ sliderRed->blockSignals(true);
+ spinRed->setValue(v);
+ sliderRed->setValue(v);
+ spinRed->blockSignals(false);
+ sliderRed->blockSignals(false);
+
+ changeImage(sliderB->value(), sliderC->value(), sliderG->value(), v, sliderGreen->value(), sliderBlue->value());
+}
+
+void SQ_ImageBCG::slotGreenChanged(int v)
+{
+ spinGreen->blockSignals(true);
+ sliderGreen->blockSignals(true);
+ spinGreen->setValue(v);
+ sliderGreen->setValue(v);
+ spinGreen->blockSignals(false);
+ sliderGreen->blockSignals(false);
+
+ changeImage(sliderB->value(), sliderC->value(), sliderG->value(), sliderRed->value(), v, sliderBlue->value());
+}
+
+void SQ_ImageBCG::slotBlueChanged(int v)
+{
+ spinBlue->blockSignals(true);
+ sliderBlue->blockSignals(true);
+ spinBlue->setValue(v);
+ sliderBlue->setValue(v);
+ spinBlue->blockSignals(false);
+ sliderBlue->blockSignals(false);
+
+ changeImage(sliderB->value(), sliderC->value(), sliderG->value(), sliderRed->value(), sliderGreen->value(), v);
+}
+
+void SQ_ImageBCG::slotGChanged(int v)
+{
+ double g = (double)v / 100.0;
+ spinG->blockSignals(true);
+ spinG->setValue(g);
+ spinG->blockSignals(false);
+
+ changeImage(sliderB->value(), sliderC->value(), v, sliderRed->value(), sliderGreen->value(), sliderBlue->value());
+}
+
+void SQ_ImageBCG::slotGSpinChanged(double v)
+{
+ int val = (int)(v * 100.0);
+ sliderG->blockSignals(true);
+ sliderG->setValue(val);
+ sliderG->blockSignals(false);
+
+ changeImage(sliderB->value(), sliderC->value(), val, sliderRed->value(), sliderGreen->value(), sliderBlue->value());
+}
+
+void SQ_ImageBCG::assignNewImage(const TQImage &im)
+{
+ TQPixmap p;
+ p.convertFromImage(im);
+ pixmap1->setPixmap(p);
+}
+
+void SQ_ImageBCG::changeImage(int b, int c, int g1, int red, int green, int blue)
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ double g = (double)g1 / 100.0;
+
+ sample = sample_saved.copy();
+
+ // change brightness
+ fmt_filters::brightness(fmt_filters::image(sample.bits(), sample.width(), sample.height()), b);
+
+ //change contrast
+ if(c)
+ fmt_filters::contrast(fmt_filters::image(sample.bits(), sample.width(), sample.height()), c);
+
+ // change gamma
+ if(g1 != 100)
+ fmt_filters::gamma(fmt_filters::image(sample.bits(), sample.width(), sample.height()), g);
+
+ if(red || green || blue)
+ fmt_filters::colorize(fmt_filters::image(sample.bits(), sample.width(), sample.height()), blue, green, red);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageBCG::slotPush()
+{
+ if(!id) id = 1;
+ else id = 0;
+
+ widgetStackParams->raiseWidget(id);
+ text->setText(strings[id]);
+}
+
+void SQ_ImageBCG::setPreviewImage(const TQImage &im)
+{
+ if(im.isNull()) return;
+
+ sample = im.copy();
+ sample_saved = sample.copy();
+
+ TQPixmap p;
+
+ p.convertFromImage(sample_saved);
+ pixmap->setPixmap(p);
+ pixmap1->setPixmap(p);
+
+ changeImage(sliderB->value(), sliderC->value(), sliderG->value(), sliderRed->value(), sliderGreen->value(), sliderBlue->value());
+}
+
+SQ_ImageBCG* SQ_ImageBCG::instance()
+{
+ return m_inst;
+}
diff --git a/src/imageedit/sq_imageconvert.ui b/src/imageedit/sq_imageconvert.ui
new file mode 100644
index 0000000..350ab7a
--- /dev/null
+++ b/src/imageedit/sq_imageconvert.ui
@@ -0,0 +1,343 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SQ_ImageConvert</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>SQ_ImageConvert</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>436</width>
+ <height>324</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>SQ_ImageConvert</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>237</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushConvert</cstring>
+ </property>
+ <property name="text">
+ <string>Convert</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="Line" row="1" column="0">
+ <property name="name">
+ <cstring>line8</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="TQWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>widgetStack</cstring>
+ </property>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="TQGroupBox" row="0" column="1">
+ <property name="name">
+ <cstring>groupBoxActions</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="TQPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pushOptions</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>26</width>
+ <height>155</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pushWriteOptions</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="toggleButton">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Conversion options</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>col1</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>col2</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>tableLib</cstring>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="TQTextEdit" row="0" column="0">
+ <property name="name">
+ <cstring>textResult</cstring>
+ </property>
+ <property name="wordWrap">
+ <enum>NoWrap</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="undoRedoEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="KProgress" row="1" column="0">
+ <property name="name">
+ <cstring>progress</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>pushCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageConvert</receiver>
+ <slot>slotReject()</slot>
+ </connection>
+ <connection>
+ <sender>pushOptions</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageConvert</receiver>
+ <slot>slotOptions()</slot>
+ </connection>
+ <connection>
+ <sender>pushWriteOptions</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>SQ_ImageConvert</receiver>
+ <slot>slotShowExtWrapper(bool)</slot>
+ </connection>
+ <connection>
+ <sender>pushConvert</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageConvert</receiver>
+ <slot>slotStartConvert()</slot>
+ </connection>
+ <connection>
+ <sender>tableLib</sender>
+ <signal>currentChanged(TQListViewItem*)</signal>
+ <receiver>SQ_ImageConvert</receiver>
+ <slot>slotCurrentLibraryChanged(TQListViewItem*)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tableLib</tabstop>
+ <tabstop>pushOptions</tabstop>
+ <tabstop>pushWriteOptions</tabstop>
+ <tabstop>pushConvert</tabstop>
+ <tabstop>pushCancel</tabstop>
+ <tabstop>textResult</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in declaration">sq_imageedit.h</include>
+ <include location="global" impldecl="in implementation">knuminput.h</include>
+ <include location="global" impldecl="in implementation">kprogress.h</include>
+ <include location="global" impldecl="in implementation">ksquirrel-libs/fmt_defs.h</include>
+ <include location="global" impldecl="in implementation">ksquirrel-libs/fmt_types.h</include>
+ <include location="global" impldecl="in implementation">tdestandarddirs.h</include>
+ <include location="local" impldecl="in implementation">sq_config.h</include>
+ <include location="local" impldecl="in implementation">sq_errorstring.h</include>
+ <include location="local" impldecl="in implementation">sq_iconloader.h</include>
+ <include location="local" impldecl="in implementation">sq_imageconvert.ui.h</include>
+ <include location="local" impldecl="in implementation">sq_imageeditoptions.h</include>
+ <include location="local" impldecl="in implementation">sq_libraryhandler.h</include>
+ <include location="local" impldecl="in implementation">sq_writeoption.h</include>
+ <include location="global" impldecl="in implementation">tqapplication.h</include>
+ <include location="global" impldecl="in implementation">tqcheckbox.h</include>
+ <include location="global" impldecl="in implementation">tqfileinfo.h</include>
+ <include location="global" impldecl="in implementation">tqheader.h</include>
+</includes>
+<forwards>
+ <forward>struct fmt_writeoptions;</forward>
+ <forward>struct fmt_writeoptionsabs;</forward>
+</forwards>
+<variables>
+ <variable access="private">SQ_ImageOptions imageopt;</variable>
+ <variable access="private">int paragraph;</variable>
+ <variable access="private">bool done;</variable>
+</variables>
+<signals>
+ <signal>convert(SQ_ImageOptions*, SQ_ImageConvertOptions*)</signal>
+</signals>
+<slots>
+ <slot>slotShowExtWrapper( bool show )</slot>
+ <slot access="private">createExtension()</slot>
+ <slot access="private">slotDebugText( const TQString &amp; text, bool bold )</slot>
+ <slot access="private">slotStartConvert()</slot>
+ <slot access="private">slotOneProcessed()</slot>
+ <slot access="private">slotCurrentLibraryChanged( TQListViewItem * i )</slot>
+ <slot access="private">slotOptions()</slot>
+ <slot access="private">slotDone( bool close )</slot>
+ <slot access="private">slotReject()</slot>
+</slots>
+<functions>
+ <function>init()</function>
+ <function access="private">initLibs()</function>
+ <function>startConvertion( int count )</function>
+ <function>fillWriteOptions( fmt_writeoptions * opt, const fmt_writeoptionsabs &amp; opt2 )</function>
+ <function access="protected">closeEvent( TQCloseEvent * e )</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/imageedit/sq_imageconvert.ui.h b/src/imageedit/sq_imageconvert.ui.h
new file mode 100644
index 0000000..7979c49
--- /dev/null
+++ b/src/imageedit/sq_imageconvert.ui.h
@@ -0,0 +1,214 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** TQt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+void SQ_ImageConvert::init()
+{
+ tableLib->header()->hide();
+
+ createExtension();
+
+ initLibs();
+
+ pushWriteOptions->setPixmap(TQPixmap(locate("data", "images/imageedit/resize_toolbutton2.png")));
+ pushOptions->setPixmap(SQ_IconLoader::instance()->loadIcon("configure", TDEIcon::Desktop, TDEIcon::SizeSmall));
+
+ SQ_Config::instance()->setGroup("Image edit options");
+
+ imageopt.putto = SQ_Config::instance()->readEntry("convert_putto", TQString());
+ imageopt.where_to_put = SQ_Config::instance()->readNumEntry("convert_where_to_put", 0);
+ imageopt.close = SQ_Config::instance()->readBoolEntry("convert_close", true);
+
+ done = true;
+}
+
+void SQ_ImageConvert::initLibs()
+{
+ TQListViewItem *first;
+
+ TQValueVector<SQ_LIBRARY>::iterator itEnd = SQ_LibraryHandler::instance()->end();
+
+ for(TQValueVector<SQ_LIBRARY>::iterator it = SQ_LibraryHandler::instance()->begin();
+ it != itEnd;++it)
+ {
+ if((*it).writestatic)
+ {
+ TQFileInfo libfileinfo((*it).libpath);
+ TQListViewItem *item = new TQListViewItem(tableLib, TQString(), TQString((*it).quickinfo));
+
+ item->setPixmap(0, (*it).mime);
+
+ tableLib->insertItem(item);
+ }
+ }
+
+ first = tableLib->firstChild();
+
+ if(first)
+ {
+ tableLib->setSelected(first, true);
+ slotCurrentLibraryChanged(first);
+ }
+}
+
+void SQ_ImageConvert::slotShowExtWrapper(bool show)
+{
+ showExtension(show);
+}
+
+void SQ_ImageConvert::createExtension()
+{
+ SQ_WriteOption *c = new SQ_WriteOption(this);
+ c->slider->setRange(0, 255, 1, true);
+ setExtension(c);
+ setOrientation(TQt::Horizontal);
+}
+
+void SQ_ImageConvert::slotDebugText(const TQString &text, bool bold)
+{
+ textResult->setBold(bold);
+ textResult->insertAt(text, paragraph, textResult->paragraphLength(paragraph));
+ textResult->setBold(false);
+}
+
+void SQ_ImageConvert::slotStartConvert()
+{
+ pushConvert->setDefault(false);
+ pushConvert->setDisabled(true);
+ pushCancel->setDefault(true);
+ pushCancel->setFocus();
+ widgetStack->raiseWidget(1);
+ showExtension(false);
+
+ tqApp->processEvents();
+
+ TQListViewItem *i = tableLib->selectedItem();
+
+ if(!i)
+ return;
+
+ SQ_ImageConvertOptions copt;
+ copt.libname = i->text(1);
+
+ emit convert(&imageopt, &copt);
+}
+
+void SQ_ImageConvert::startConvertion(int count)
+{
+ done = false;
+ paragraph = 0;
+ progress->setProgress(0);
+ progress->setTotalSteps(count);
+}
+
+void SQ_ImageConvert::slotOneProcessed()
+{
+ progress->advance(1);
+ paragraph++;
+}
+
+void SQ_ImageConvert::slotCurrentLibraryChanged( TQListViewItem * i)
+{
+ if(!i)
+ return;
+
+ TQString name = i->text(1);
+
+ SQ_LIBRARY *l = SQ_LibraryHandler::instance()->libraryByName(name);
+
+ if(!l)
+ return;
+
+ SQ_WriteOption *e = (SQ_WriteOption*)extension();
+
+ if(!e)
+ return;
+
+ e->widgetStack->raiseWidget(0);
+
+ bool bslider = (l->opt.compression_scheme == CompressionInternal && (l->opt.compression_min || l->opt.compression_max));
+
+ e->slider->setShown(bslider);
+ e->checkRLE->setShown(!bslider);
+
+ if(bslider)
+ {
+ e->slider->setRange(l->opt.compression_min, l->opt.compression_max, 1, true);
+ e->slider->setValue(l->opt.compression_def);
+ }
+
+ bool rle = true;
+
+ if(!(l->opt.compression_scheme & CompressionRLE))
+ {
+ e->checkRLE->hide();
+ rle = false;
+ }
+
+ bool binter = l->opt.interlaced;
+
+ e->checkInterlaced->setShown(binter);
+
+ if(!binter && !rle && !bslider)
+ e->widgetStack->raiseWidget(1);
+}
+
+void SQ_ImageConvert::fillWriteOptions(fmt_writeoptions *opt, const fmt_writeoptionsabs &opt2)
+{
+ SQ_WriteOption *e = (SQ_WriteOption*)extension();
+
+ if(!e)
+ return;
+
+ opt->interlaced = (opt2.interlaced) ? e->checkInterlaced->isChecked() : false;
+
+ if(opt2.compression_scheme == CompressionInternal)
+ opt->compression_scheme = CompressionInternal;
+ else if(opt2.compression_scheme == CompressionRLE)
+ opt->compression_scheme = (e->checkRLE->isChecked()) ? CompressionRLE : CompressionNo;
+ else
+ opt->compression_scheme = CompressionNo;
+
+ opt->compression_level = (opt->compression_scheme != CompressionNo) ? e->slider->value() : 0;
+}
+
+void SQ_ImageConvert::slotOptions()
+{
+ SQ_ImageEditOptions o(this);
+
+ // SQ_ImageEditOptions will write needed TDEConfig entries, if
+ // exec() will return TQDialog::Accepted
+ o.setConfigPrefix("convert");
+
+ o.exec(&imageopt);
+}
+
+void SQ_ImageConvert::slotDone(bool close)
+{
+ done = true;
+
+ if(close)
+ reject();
+}
+
+void SQ_ImageConvert::slotReject()
+{
+ if(done)
+ reject();
+}
+
+void SQ_ImageConvert::closeEvent(TQCloseEvent *e)
+{
+ if(done)
+ e->accept();
+ else
+ {
+ e->ignore();
+ TQWhatsThis::display(SQ_ErrorString::instance()->string(SQE_NOTFINISHED));
+ }
+}
diff --git a/src/imageedit/sq_imageedit.h b/src/imageedit/sq_imageedit.h
new file mode 100644
index 0000000..a93e26b
--- /dev/null
+++ b/src/imageedit/sq_imageedit.h
@@ -0,0 +1,84 @@
+/***************************************************************************
+ sq_imageedit.h - description
+ -------------------
+ begin : ðÔÎ áÐÒ 29 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SQ_IMAGEEDIT_H
+#define SQ_IMAGEEDIT_H
+
+#include <tqfont.h>
+#include <tqcolor.h>
+
+#include "fmt_filters.h"
+
+struct SQ_ImageOptions
+{
+ TQString putto;
+ int where_to_put;
+ bool close;
+};
+
+struct SQ_ImageBCGOptions
+{
+ int b, c, g;
+ int red, green, blue;
+};
+
+struct SQ_ImageConvertOptions
+{
+ TQString libname;
+};
+
+struct SQ_ImageFilterOptions
+{
+ int type;
+
+ bool _bool;
+ fmt_filters::rgb rgb1, rgb2;
+ float _float;
+ unsigned int _uint;
+ double _double1, _double2;
+};
+
+namespace F
+{
+ enum ftype
+ {
+ fblend = 0,
+ fblur,
+ fdesaturate,
+ fdespeckle,
+ fedge,
+ femboss,
+ fequalize,
+ ffade,
+ fflatten,
+ fimplode,
+ fnegative,
+ fnoise,
+ foil,
+ fshade,
+ fsharpen,
+ fsolarize,
+ fspread,
+ fswapRGB,
+ fswirl,
+ fthreshold,
+ fgray,
+ fredeye
+ };
+}
+
+#endif
diff --git a/src/imageedit/sq_imageeditoptions.ui b/src/imageedit/sq_imageeditoptions.ui
new file mode 100644
index 0000000..1435010
--- /dev/null
+++ b/src/imageedit/sq_imageeditoptions.ui
@@ -0,0 +1,226 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SQ_ImageEditOptions</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>SQ_ImageEditOptions</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>465</width>
+ <height>266</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Edit options</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQButtonGroup" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>New files</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <widget class="TQRadioButton" row="3" column="0">
+ <property name="name">
+ <cstring>radioPutHere</cstring>
+ </property>
+ <property name="text">
+ <string>Place here</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>radioReplace</cstring>
+ </property>
+ <property name="text">
+ <string>Replace original files</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="4" column="0">
+ <property name="name">
+ <cstring>kurl</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioCurrentDir</cstring>
+ </property>
+ <property name="text">
+ <string>Place files in current directory, renaming them if necessary</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioCurrentDir_2</cstring>
+ </property>
+ <property name="text">
+ <string>Place files in current directory, replacing existing files</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>0</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>checkClose</cstring>
+ </property>
+ <property name="text">
+ <string>Close, when all operations succeeded</string>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>pushOK</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="4" column="2">
+ <property name="name">
+ <cstring>pushCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ <spacer row="4" column="0">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>260</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="Line" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>pushOK</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageEditOptions</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>pushCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageEditOptions</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>radioPutHere</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>kurl</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>radioCurrentDir_2</tabstop>
+ <tabstop>radioCurrentDir</tabstop>
+ <tabstop>radioReplace</tabstop>
+ <tabstop>radioPutHere</tabstop>
+ <tabstop>kurl</tabstop>
+ <tabstop>checkClose</tabstop>
+ <tabstop>pushOK</tabstop>
+ <tabstop>pushCancel</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">klineedit.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+ <include location="global" impldecl="in implementation">kurlrequester.h</include>
+ <include location="local" impldecl="in implementation">sq_config.h</include>
+ <include location="local" impldecl="in implementation">sq_imageedit.h</include>
+ <include location="local" impldecl="in implementation">sq_imageeditoptions.ui.h</include>
+</includes>
+<forwards>
+ <forward>class SQ_ImageOptions;</forward>
+</forwards>
+<variables>
+ <variable access="private">int index;</variable>
+ <variable access="private">TQString putto, prefix;</variable>
+</variables>
+<functions>
+ <function access="private" specifier="non virtual">init()</function>
+ <function returnType="int">exec( SQ_ImageOptions * o )</function>
+ <function>setConfigPrefix( const TQString &amp; pr )</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/imageedit/sq_imageeditoptions.ui.h b/src/imageedit/sq_imageeditoptions.ui.h
new file mode 100644
index 0000000..7640ce0
--- /dev/null
+++ b/src/imageedit/sq_imageeditoptions.ui.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** TQt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+void SQ_ImageEditOptions::init()
+{
+ KFile::Mode mode = static_cast<KFile::Mode>(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
+ kurl->setMode(mode);
+}
+
+int SQ_ImageEditOptions::exec(SQ_ImageOptions *o)
+{
+ kurl->setURL(o->putto);
+
+ TQButton *b = buttonGroup1->find(o->where_to_put);
+
+ if(b)
+ b->animateClick();
+ else
+ {
+ tqWarning("SQ_ImageEditOptions::exec: wrong button Id");
+ radioCurrentDir->animateClick();
+ }
+
+ checkClose->setChecked(o->close);
+
+ int result = TQDialog::exec();
+
+ if(result == TQDialog::Accepted)
+ {
+ o->putto = (kurl->isEnabled()) ? kurl->url() : TQString();
+ o->where_to_put = buttonGroup1->selectedId();
+ o->close = checkClose->isChecked();
+
+ SQ_Config::instance()->setGroup("Image edit options");
+ SQ_Config::instance()->writeEntry(prefix + "_putto", o->putto);
+ SQ_Config::instance()->writeEntry(prefix + "_where_to_put", o->where_to_put);
+ SQ_Config::instance()->writeEntry(prefix + "_close", o->close);
+ }
+
+ return result;
+}
+
+void SQ_ImageEditOptions::setConfigPrefix( const TQString &pr )
+{
+ prefix = pr;
+}
diff --git a/src/imageedit/sq_imagefilter.ui b/src/imageedit/sq_imagefilter.ui
new file mode 100644
index 0000000..0e50f97
--- /dev/null
+++ b/src/imageedit/sq_imagefilter.ui
@@ -0,0 +1,1559 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SQ_ImageFilter</class>
+<widget class="TQDialog">
+ <property name="name">
+ <cstring>SQ_ImageFilter</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>537</width>
+ <height>421</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Filter</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQWidgetStack" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>widgetStackFilters</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>blendWidget</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Color:</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="0" column="1">
+ <property name="name">
+ <cstring>pushBlendColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>blendOpacity</cstring>
+ </property>
+ <property name="label">
+ <string>Opacity</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer9_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="1" column="0">
+ <property name="name">
+ <cstring>blurSigma</cstring>
+ </property>
+ <property name="label">
+ <string>Sigma</string>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>blurRadius</cstring>
+ </property>
+ <property name="label">
+ <string>Radius</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>2</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer10_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>45</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>desaturateValue</cstring>
+ </property>
+ <property name="label">
+ <string>Factor</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>3</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="text">
+ <string>There are no special options available for this filter. Just click "Filter".</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>11</width>
+ <height>26</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>4</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>edgeRadius</cstring>
+ </property>
+ <property name="label">
+ <string>Radius</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>5</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="1" column="0">
+ <property name="name">
+ <cstring>embossSigma</cstring>
+ </property>
+ <property name="label">
+ <string>Sigma</string>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>embossRadius</cstring>
+ </property>
+ <property name="label">
+ <string>Radius</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>6</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="text">
+ <string>There are no special options available for this filter. Just click "Filter".</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer11_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>11</width>
+ <height>14</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>7</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton" row="0" column="1">
+ <property name="name">
+ <cstring>fadeColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Color:</string>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>fadeValue</cstring>
+ </property>
+ <property name="label">
+ <string>Value</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>8</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KColorButton" row="0" column="1">
+ <property name="name">
+ <cstring>flattenColor1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>10</width>
+ <height>11</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KColorButton" row="1" column="1">
+ <property name="name">
+ <cstring>flattenColor2</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_4_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Color 1:</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_4_3</cstring>
+ </property>
+ <property name="text">
+ <string>Color 2:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>9</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer15_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>25</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>implodeFactor</cstring>
+ </property>
+ <property name="label">
+ <string>Factor</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>10</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer11_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>11</width>
+ <height>14</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_2_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="text">
+ <string>There are no special options available for this filter. Just click "Filter".</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>11</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>buttonGroupNoise</cstring>
+ </property>
+ <property name="title">
+ <string>Noise type</string>
+ </property>
+ <property name="exclusive">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <widget class="TQRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Uniform</string>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>radioButton1_4</cstring>
+ </property>
+ <property name="text">
+ <string>Impulse</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>3</number>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>radioButton1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Multiplicative Gaussian</string>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="2" column="1">
+ <property name="name">
+ <cstring>radioButton1_6</cstring>
+ </property>
+ <property name="text">
+ <string>Poisson</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Gaussian</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="1" column="1">
+ <property name="name">
+ <cstring>radioButton1_5</cstring>
+ </property>
+ <property name="text">
+ <string>Laplacian</string>
+ </property>
+ <property name="buttonGroupId">
+ <number>4</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>12</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer15_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>35</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>oilRadius</cstring>
+ </property>
+ <property name="label">
+ <string>Radius</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>13</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>shadeColor</cstring>
+ </property>
+ <property name="text">
+ <string>Color</string>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="2" column="0">
+ <property name="name">
+ <cstring>shadeElev</cstring>
+ </property>
+ <property name="label">
+ <string>Elevation</string>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="1" column="0">
+ <property name="name">
+ <cstring>shadeAzim</cstring>
+ </property>
+ <property name="label">
+ <string>Azimuth</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>14</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer13_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="1" column="0">
+ <property name="name">
+ <cstring>sharpenSigma</cstring>
+ </property>
+ <property name="label">
+ <string>Sigma</string>
+ </property>
+ </widget>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>sharpenRadius</cstring>
+ </property>
+ <property name="label">
+ <string>Radius</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>15</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer13_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>60</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>solarizeValue</cstring>
+ </property>
+ <property name="label">
+ <string>Factor</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>16</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer24</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>35</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>spreadValue</cstring>
+ </property>
+ <property name="label">
+ <string>Amount</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>17</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>buttonGroupSwapRGB</cstring>
+ </property>
+ <property name="title">
+ <string>Type</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <property name="spacing">
+ <number>2</number>
+ </property>
+ <widget class="TQRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioButton7</cstring>
+ </property>
+ <property name="text">
+ <string>GBR</string>
+ </property>
+ </widget>
+ <widget class="TQRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioButton8</cstring>
+ </property>
+ <property name="text">
+ <string>BRG</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer25</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>11</width>
+ <height>41</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>18</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer13_2_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>25</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KDoubleNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>swirlAngle</cstring>
+ </property>
+ <property name="label">
+ <string>Degrees</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>19</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer24_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>75</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>thresholdValue</cstring>
+ </property>
+ <property name="label">
+ <string>Threshold</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>20</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_2_2_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <property name="text">
+ <string>There are no special options available for this filter. Just click "Filter".</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer11_2_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>11</width>
+ <height>113</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>21</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>thresholdRE</cstring>
+ </property>
+ <property name="label">
+ <string>Threshold</string>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer26_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>71</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer27</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer14</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>285</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushFilter</cstring>
+ </property>
+ <property name="text">
+ <string>Filter</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>pushCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="Line" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>line7</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="TQListBox" row="0" column="0" rowspan="4" colspan="1">
+ <item>
+ <property name="text">
+ <string>Blend</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Blur</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Desaturate</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Despeckle</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Edge</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Emboss</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Equalize</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Fade</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Flatten</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Implode</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Negative</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Noise</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Oil</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Shade</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Sharpen</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Solarize</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Spread</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Swap colors</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Swirl</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Threshold</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Grayscale</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Redeye</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>listMain</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>140</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <spacer row="3" column="2">
+ <property name="name">
+ <cstring>spacer26</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="SQ_BCGLabel" row="1" column="3">
+ <property name="name">
+ <cstring>pixmap1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>160</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="1">
+ <property name="name">
+ <cstring>textLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Original image:</string>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer27_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer28</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="SQ_BCGLabel" row="1" column="1">
+ <property name="name">
+ <cstring>pixmap</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>160</width>
+ <height>160</height>
+ </size>
+ </property>
+ </widget>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer27_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>1</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Image after filtering:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>SQ_BCGLabel</class>
+ <header location="local">sq_bcglabel.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>pushCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageFilter</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>pushFilter</sender>
+ <signal>clicked()</signal>
+ <receiver>SQ_ImageFilter</receiver>
+ <slot>slotStartFiltering()</slot>
+ </connection>
+ <connection>
+ <sender>listMain</sender>
+ <signal>selectionChanged()</signal>
+ <receiver>SQ_ImageFilter</receiver>
+ <slot>slotShowPage()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>pushFilter</tabstop>
+ <tabstop>pushCancel</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in declaration">sq_imageedit.h</include>
+ <include location="global" impldecl="in declaration">tqimage.h</include>
+ <include location="local" impldecl="in implementation">fmt_filters.h</include>
+ <include location="global" impldecl="in implementation">kcolorbutton.h</include>
+ <include location="global" impldecl="in implementation">knuminput.h</include>
+ <include location="global" impldecl="in implementation">sq_bcglabel.h</include>
+ <include location="local" impldecl="in implementation">sq_config.h</include>
+ <include location="local" impldecl="in implementation">sq_iconloader.h</include>
+ <include location="local" impldecl="in implementation">sq_imagefilter.ui.h</include>
+</includes>
+<variables>
+ <variable access="private">TQImage sample, sample_saved;</variable>
+ <variable access="private">static SQ_ImageFilter *m_inst;</variable>
+</variables>
+<signals>
+ <signal>filter(SQ_ImageFilterOptions*)</signal>
+</signals>
+<slots>
+ <slot access="private" specifier="non virtual">slotStartFiltering()</slot>
+ <slot access="private" specifier="non virtual">slotShowPage()</slot>
+ <slot access="private" specifier="non virtual">swapRGB()</slot>
+ <slot access="private" specifier="non virtual">blend()</slot>
+ <slot access="private" specifier="non virtual">fade()</slot>
+ <slot access="private" specifier="non virtual">desaturate()</slot>
+ <slot access="private" specifier="non virtual">threshold()</slot>
+ <slot access="private" specifier="non virtual">solarize()</slot>
+ <slot access="private" specifier="non virtual">spread()</slot>
+ <slot access="private" specifier="non virtual">swirl()</slot>
+ <slot access="private" specifier="non virtual">noise()</slot>
+ <slot access="private" specifier="non virtual">redeye()</slot>
+ <slot access="private" specifier="non virtual">flatten()</slot>
+ <slot access="private" specifier="non virtual">shade()</slot>
+ <slot access="private" specifier="non virtual">blur()</slot>
+ <slot access="private" specifier="non virtual">implode()</slot>
+ <slot access="private" specifier="non virtual">edge()</slot>
+ <slot access="private" specifier="non virtual">emboss()</slot>
+ <slot access="private" specifier="non virtual">sharpen()</slot>
+ <slot access="private" specifier="non virtual">oil()</slot>
+</slots>
+<functions>
+ <function access="private" specifier="non virtual">init()</function>
+ <function specifier="non virtual">setPreviewImage( const TQImage &amp; im )</function>
+ <function access="private" specifier="non virtual">assignNewImage( const TQImage &amp; im )</function>
+ <function access="private" specifier="non virtual">negative()</function>
+ <function access="private" specifier="non virtual">togray()</function>
+ <function access="private" specifier="non virtual">equalize()</function>
+ <function access="private" specifier="non virtual">despeckle()</function>
+ <function access="private" specifier="non virtual">hackConnect()</function>
+ <function specifier="static" returnType="SQ_ImageFilter *">instance()</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/imageedit/sq_imagefilter.ui.h b/src/imageedit/sq_imagefilter.ui.h
new file mode 100644
index 0000000..18eb263
--- /dev/null
+++ b/src/imageedit/sq_imagefilter.ui.h
@@ -0,0 +1,610 @@
+/****************************************************************************
+** ui.h extension file, included from the uic-generated form implementation.
+**
+** If you wish to add, delete or rename functions or slots use
+** TQt Designer which will update this file, preserving your code. Create an
+** init() function in place of a constructor, and a destroy() function in
+** place of a destructor.
+*****************************************************************************/
+
+SQ_ImageFilter * SQ_ImageFilter::m_inst = 0;
+
+void SQ_ImageFilter::init()
+{
+ m_inst = this;
+
+ // restore NumInputs...
+ const double sigmaMax = 99.9, sigmaMin = 0.01;
+ const double radiusMax = 99.9, radiusMin = 0.01;
+
+ blendOpacity->setRange(0.0f, 1.0f, 0.01, true);
+ fadeValue->setRange(0.0f, 1.0f, 0.01f, true);
+ desaturateValue->setRange(0.0f, 1.0f, 0.01, true);
+ thresholdValue->setRange(0, 255, 1, true);
+ thresholdRE->setRange(0, 255, 1, true);
+ solarizeValue->setRange(0.0f, 50.0f, 0.01f, true);
+ spreadValue->setRange(1, 10, 1, true);
+ swirlAngle->setRange(-720.0f, 720.0f, 0.1f, true);
+ shadeAzim->setRange(0.0f, 90.0f, 0.01f, true);
+ shadeElev->setRange(0.0f, 90.0f, 0.01f, true);
+ blurRadius->setRange(radiusMin, radiusMax, 0.01f, true);
+ blurSigma->setRange(sigmaMin, 50.0, 0.01f, true);
+ implodeFactor->setRange(0, 100, 1, true);
+ edgeRadius->setRange((int)radiusMin, 30, 1, true);
+ embossRadius->setRange(radiusMin, radiusMax, 0.01f, true);
+ embossSigma->setRange(sigmaMin, sigmaMax, 0.01f, true);
+ sharpenRadius->setRange(radiusMin, radiusMax, 0.01f, true);
+ sharpenSigma->setRange(sigmaMin, 30.0, 0.01f, true);
+ oilRadius->setRange(1, 5, 1, true);
+
+ SQ_Config::instance()->setGroup("Image edit options");
+
+ buttonGroupSwapRGB->setButton(SQ_Config::instance()->readNumEntry("filter_swapRGB", 0));
+ // blend
+ TQColor c;
+ c.setNamedColor(SQ_Config::instance()->readEntry("filter_blend_color", "#00ff00"));
+ pushBlendColor->setColor(c);
+ blendOpacity->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_blend_opacity", 0.5));
+
+ // fade
+ c.setNamedColor(SQ_Config::instance()->readEntry("filter_flend_color", "#00ff00"));
+ fadeColor->setColor(c);
+ fadeValue->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_fade_value", 0.5));
+
+ // desaturate
+ desaturateValue->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_desaturate_value", 0.5));
+
+ // threshold
+ thresholdValue->setValue(SQ_Config::instance()->readNumEntry("filter_threshold_value", 1));
+
+ // threshold for redeye
+ thresholdRE->setValue(SQ_Config::instance()->readNumEntry("filter_threshold_redeye", 10));
+
+ // solarize
+ solarizeValue->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_solarize_value", 0.5));
+
+ // spread
+ spreadValue->setValue(SQ_Config::instance()->readNumEntry("filter_spread_value", 1));
+
+ // swirl
+ swirlAngle->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_swirl_value", 0.0));
+
+ // noise
+ buttonGroupNoise->setButton(SQ_Config::instance()->readNumEntry("filter_noise", 0));
+
+ // flatten
+ c.setNamedColor(SQ_Config::instance()->readEntry("filter_flatten_color1", "#00ff00"));
+ flattenColor1->setColor(c);
+ c.setNamedColor(SQ_Config::instance()->readEntry("filter_flatten_color2", "#00ff00"));
+ flattenColor2->setColor(c);
+
+ // shade
+ shadeAzim->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_shade_azim", 0.1));
+ shadeElev->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_shade_elev", 0.1));
+
+ if(SQ_Config::instance()->readBoolEntry("filter_shade_color", false))
+ shadeColor->toggle();
+
+ // blur
+ blurRadius->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_blur_radius", 0.1));
+ blurSigma->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_blur_sigma", 0.1));
+
+ // implode
+ implodeFactor->setValue(SQ_Config::instance()->readNumEntry("filter_implode_factor", 1));
+
+ // edge
+ edgeRadius->setValue(SQ_Config::instance()->readNumEntry("filter_egde_radius", 1));
+
+ // emboss
+ embossRadius->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_emboss_radius", 0.1));
+ embossSigma->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_emboss_sigma", 0.1));
+
+ // sharpen
+ sharpenRadius->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_sharpen_radius", 0.1));
+ sharpenSigma->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_sharpen_sigma", 0.1));
+
+ // oil
+ oilRadius->setValue(SQ_Config::instance()->readNumEntry("filter_oil_radius", 1));
+
+ listMain->setCurrentItem(SQ_Config::instance()->readNumEntry("filter_filter", 0));
+
+ hackConnect();
+}
+
+void SQ_ImageFilter::slotStartFiltering()
+{
+ SQ_Config *tdeconf = SQ_Config::instance();
+
+ tdeconf->setGroup("Image edit options");
+ tdeconf->writeEntry("filter_swapRGB", buttonGroupSwapRGB->selectedId());
+ tdeconf->writeEntry("filter_blend_color", pushBlendColor->color().name());
+ tdeconf->writeEntry("filter_blend_opacity", blendOpacity->value());
+ tdeconf->writeEntry("filter_fade_color", fadeColor->color().name());
+ tdeconf->writeEntry("filter_fade_value", fadeValue->value());
+ tdeconf->writeEntry("filter_desaturate_value", desaturateValue->value());
+ tdeconf->writeEntry("filter_threshold_value", thresholdValue->value());
+ tdeconf->writeEntry("filter_threshold_redeye", thresholdRE->value());
+ tdeconf->writeEntry("filter_solarize_value", solarizeValue->value());
+ tdeconf->writeEntry("filter_spread_value", spreadValue->value());
+ tdeconf->writeEntry("filter_swirl_value", swirlAngle->value());
+ tdeconf->writeEntry("filter_noise", buttonGroupNoise->selectedId());
+ tdeconf->writeEntry("filter_flatten_color1", flattenColor1->color().name());
+ tdeconf->writeEntry("filter_flatten_color2", flattenColor2->color().name());
+ tdeconf->writeEntry("filter_shade_azim", shadeAzim->value());
+ tdeconf->writeEntry("filter_shade_elev", shadeElev->value());
+ tdeconf->writeEntry("filter_shade_color", shadeColor->isChecked());
+ tdeconf->writeEntry("filter_blur_radius", blurRadius->value());
+ tdeconf->writeEntry("filter_blur_sigma", blurSigma->value());
+ tdeconf->writeEntry("filter_implode_factor", implodeFactor->value());
+ tdeconf->writeEntry("filter_egde_radius", edgeRadius->value());
+ tdeconf->writeEntry("filter_emboss_radius", embossRadius->value());
+ tdeconf->writeEntry("filter_emboss_sigma", embossSigma->value());
+ tdeconf->writeEntry("filter_sharpen_radius", sharpenRadius->value());
+ tdeconf->writeEntry("filter_sharpen_sigma", sharpenSigma->value());
+ tdeconf->writeEntry("filter_oil_radius", oilRadius->value());
+ tdeconf->writeEntry("filter_filter", listMain->currentItem());
+
+ SQ_ImageFilterOptions opt;
+
+ opt.type = listMain->currentItem();
+
+ switch(opt.type)
+ {
+ case F::fblend:
+ {
+ TQColor c = pushBlendColor->color();
+ opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue());
+ opt._float = blendOpacity->value();
+ }
+ break;
+ case F::fblur: opt._double1 = blurRadius->value(); opt._double2 = blurSigma->value(); break;
+ case F::fdesaturate: opt._float = (float)desaturateValue->value(); break;
+ case F::fdespeckle: break;
+ case F::fedge: opt._double1 = (double)edgeRadius->value(); break;
+ case F::femboss: opt._double1 = embossRadius->value(); opt._double2 = embossSigma->value(); break;
+ case F::fequalize: break;
+ case F::ffade:
+ {
+ TQColor c = fadeColor->color();
+ opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue());
+ opt._float = (float)fadeValue->value();
+ }
+ break;
+ case F::fflatten:
+ {
+ TQColor c = flattenColor1->color();
+ opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue());
+ c = flattenColor2->color();
+ opt.rgb2 = fmt_filters::rgb(c.red(), c.green(), c.blue());
+ }
+ break;
+ case F::fimplode: opt._double1 = implodeFactor->value(); break;
+ case F::fnegative: break;
+ case F::fnoise: opt._uint = buttonGroupNoise->selectedId(); break;
+ case F::foil: opt._double1 = (double)oilRadius->value(); break;
+ case F::fshade: opt._bool = shadeColor->isChecked(); opt._double1 = shadeAzim->value(); opt._double2 = shadeElev->value(); break;
+ case F::fsharpen: opt._double1 = sharpenRadius->value(); opt._double2 = sharpenSigma->value();break;
+ case F::fsolarize: opt._double1 = solarizeValue->value(); break;
+ case F::fspread: opt._uint = spreadValue->value(); break;
+ case F::fswapRGB: opt._uint = buttonGroupSwapRGB->selectedId(); break;
+ case F::fswirl: opt._double1 = swirlAngle->value(); break;
+ case F::fthreshold: opt._uint = thresholdValue->value(); break;
+ case F::fgray: break;
+ case F::fredeye: opt._uint = thresholdRE->value(); break;
+ }
+
+ emit filter(&opt);
+}
+
+void SQ_ImageFilter::slotShowPage()
+{
+ int id = listMain->currentItem();
+
+ widgetStackFilters->raiseWidget(id);
+
+ switch(id)
+ {
+ case F::fblend: blend(); break;
+ case F::fblur: blur(); break;
+ case F::fdesaturate: desaturate(); break;
+ case F::fdespeckle: despeckle(); break;
+ case F::fedge: edge(); break;
+ case F::femboss: emboss(); break;
+ case F::fequalize: equalize(); break;
+ case F::ffade: fade(); break;
+ case F::fflatten: flatten(); break;
+ case F::fimplode: implode(); break;
+ case F::fnegative: negative(); break;
+ case F::fnoise: noise(); break;
+ case F::foil: oil(); break;
+ case F::fshade: shade(); break;
+ case F::fsharpen: sharpen(); break;
+ case F::fsolarize: solarize(); break;
+ case F::fspread: spread(); break;
+ case F::fswapRGB: swapRGB(); break;
+ case F::fswirl: swirl(); break;
+ case F::fthreshold: threshold(); break;
+ case F::fgray: togray(); break;
+ case F::fredeye: redeye(); break;
+ }
+}
+
+void SQ_ImageFilter::setPreviewImage(const TQImage &im)
+{
+ if(im.isNull()) return;
+
+ sample = im.copy();
+ sample_saved = sample.copy();
+
+ TQPixmap p;
+
+ p.convertFromImage(sample_saved);
+ pixmap->setPixmap(p);
+ pixmap1->setPixmap(p);
+
+ slotShowPage();
+}
+
+void SQ_ImageFilter::assignNewImage(const TQImage &im)
+{
+ TQPixmap p;
+ p.convertFromImage(im);
+ pixmap1->setPixmap(p);
+}
+
+void SQ_ImageFilter::swapRGB()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ int id = buttonGroupSwapRGB->selectedId();
+
+ if(id == -1)
+ return;
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::swapRGB(im, (id ? fmt_filters::GBR : fmt_filters::BRG));
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::negative()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::negative(im);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::blend()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ TQColor c = pushBlendColor->color();
+
+ fmt_filters::rgb rgb(c.red(), c.green(), c.blue());
+
+ fmt_filters::blend(im, rgb, blendOpacity->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::fade()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ TQColor c = fadeColor->color();
+
+ fmt_filters::fade(im, fmt_filters::rgb(c.red(), c.green(), c.blue()), fadeValue->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::togray()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::gray(im);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::desaturate()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::desaturate(im, desaturateValue->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::threshold()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::threshold(im, thresholdValue->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::solarize()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::solarize(im, solarizeValue->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::spread()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::spread(im, spreadValue->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::swirl()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::swirl(im, swirlAngle->value(), fmt_filters::rgba(255,255,255,255));
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::noise()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::noise(im, (fmt_filters::NoiseType)buttonGroupNoise->selectedId());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::redeye()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::redeye(im, im.w, im.h, 0, 0, thresholdRE->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::flatten()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ TQColor c1 = flattenColor1->color();
+ TQColor c2 = flattenColor2->color();
+
+ fmt_filters::flatten(im, fmt_filters::rgb(c1.red(), c1.green(), c1.blue()), fmt_filters::rgb(c2.red(), c2.green(), c2.blue()));
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::shade()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::shade(im, shadeColor->isChecked(), shadeAzim->value(), shadeElev->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::equalize()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::equalize(im);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::blur()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::blur(im, blurRadius->value(), blurSigma->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::despeckle()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::despeckle(im);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::implode()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::implode(im, implodeFactor->value(), fmt_filters::white);
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::edge()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::edge(im, (double)edgeRadius->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::emboss()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::emboss(im, embossRadius->value(), embossSigma->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::sharpen()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::sharpen(im, sharpenRadius->value(), sharpenSigma->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::oil()
+{
+ if(sample.isNull() || sample_saved.isNull())
+ return;
+
+ sample = sample_saved.copy();
+
+ fmt_filters::image im(sample.bits(), sample.width(), sample.height());
+
+ fmt_filters::oil(im, oilRadius->value());
+
+ assignNewImage(sample);
+}
+
+void SQ_ImageFilter::hackConnect()
+{
+ connect( blendOpacity, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( blend() ) );
+ connect( pushBlendColor, TQ_SIGNAL( changed(const TQColor&) ), this, TQ_SLOT( blend() ) );
+ connect( blurRadius, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( blur() ) );
+ connect( blurSigma, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( blur() ) );
+ connect( desaturateValue, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( desaturate() ) );
+ connect( edgeRadius, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( edge() ) );
+ connect( embossRadius, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( emboss() ) );
+ connect( embossSigma, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( emboss() ) );
+ connect( fadeColor, TQ_SIGNAL( changed(const TQColor&) ), this, TQ_SLOT( fade() ) );
+ connect( fadeValue, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( fade() ) );
+ connect( flattenColor1, TQ_SIGNAL( changed(const TQColor&) ), this, TQ_SLOT( flatten() ) );
+ connect( flattenColor2, TQ_SIGNAL( changed(const TQColor&) ), this, TQ_SLOT( flatten() ) );
+ connect( implodeFactor, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( implode() ) );
+ connect( buttonGroupNoise, TQ_SIGNAL( clicked(int) ), this, TQ_SLOT( noise() ) );
+ connect( oilRadius, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( oil() ) );
+ connect( shadeAzim, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( shade() ) );
+ connect( shadeColor, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( shade() ) );
+ connect( shadeElev, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( shade() ) );
+ connect( sharpenRadius, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( sharpen() ) );
+ connect( sharpenSigma, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( sharpen() ) );
+ connect( solarizeValue, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( solarize() ) );
+ connect( spreadValue, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( spread() ) );
+ connect( buttonGroupSwapRGB, TQ_SIGNAL( clicked(int) ), this, TQ_SLOT( swapRGB() ) );
+ connect( swirlAngle, TQ_SIGNAL( valueChanged(double) ), this, TQ_SLOT( swirl() ) );
+ connect( thresholdValue, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( threshold() ) );
+ connect( thresholdRE, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( redeye() ) );
+}
+
+SQ_ImageFilter* SQ_ImageFilter::instance()
+{
+ return m_inst;
+}
diff --git a/src/imageedit/sq_label.cpp b/src/imageedit/sq_label.cpp
new file mode 100644
index 0000000..a55a6eb
--- /dev/null
+++ b/src/imageedit/sq_label.cpp
@@ -0,0 +1,78 @@
+/***************************************************************************
+ sq_label.cpp - description
+ -------------------
+ begin : June 10 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <tqpainter.h>
+
+#include "sq_label.h"
+
+#define MARGIN 15
+
+SQ_Label::SQ_Label(TQWidget *parent, const char *name) : TQWidget(parent, name), single(false)
+{}
+
+SQ_Label::~SQ_Label()
+{}
+
+void SQ_Label::paintEvent(TQPaintEvent *)
+{
+ if((single && ltext.isEmpty() && rtext.isEmpty()) || (!single && ltext.isEmpty()))
+ return;
+
+ TQPainter paint(this);
+
+ TQFont font = paint.font();
+ font.setBold(true);
+ font.setPointSize(10);
+ paint.setFont(font);
+
+ if(!single)
+ {
+ paint.translate((width() + paint.fontMetrics().height()) / 2, height());
+ paint.rotate(-90);
+ paint.drawText(MARGIN, 0, ltext);
+
+ paint.translate(height() - paint.fontMetrics().width(rtext), 0);
+ paint.drawText(-MARGIN, 0, rtext);
+ }
+ else
+ {
+ paint.translate((width() + paint.fontMetrics().height()) / 2,
+ (height() + paint.fontMetrics().width(ltext)) / 2);
+ paint.rotate(-90);
+ paint.drawText(0, 0, ltext);
+ }
+}
+
+void SQ_Label::setText(const TQString &lt, const TQString &rt)
+{
+ ltext = lt;
+ rtext = rt;
+
+ update();
+}
+
+void SQ_Label::setText(const TQString &lt)
+{
+ ltext = lt;
+
+ update();
+}
+
+void SQ_Label::setSingle(bool s)
+{
+ single = s;
+}
diff --git a/src/imageedit/sq_label.h b/src/imageedit/sq_label.h
new file mode 100644
index 0000000..6d0edd5
--- /dev/null
+++ b/src/imageedit/sq_label.h
@@ -0,0 +1,41 @@
+/***************************************************************************
+ sq_label.h - description
+ -------------------
+ begin : June 10 2005
+ copyright : (C) 2005 by Baryshev Dmitry
+ email : ksquirrel.iv@gmail.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 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef SQ_LABEL_H
+#define SQ_LABEL_H
+
+#include <tqwidget.h>
+
+class SQ_Label : public TQWidget
+{
+ public:
+ SQ_Label(TQWidget *parent = 0, const char *name = 0);
+ ~SQ_Label();
+
+ void setText(const TQString &lt, const TQString &rt);
+ void setText(const TQString &lt);
+ void setSingle(bool s);
+
+ protected:
+ void paintEvent(TQPaintEvent *);
+
+ private:
+ TQString ltext, rtext;
+ bool single;
+};
+
+#endif
diff --git a/src/imageedit/sq_writeoption.ui b/src/imageedit/sq_writeoption.ui
new file mode 100644
index 0000000..43cf07e
--- /dev/null
+++ b/src/imageedit/sq_writeoption.ui
@@ -0,0 +1,168 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>SQ_WriteOption</class>
+<widget class="TQWidget">
+ <property name="name">
+ <cstring>SQ_WriteOption</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>250</width>
+ <height>340</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>SQ_WriteOption</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>widgetStack</cstring>
+ </property>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="TQGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>checkRLE</cstring>
+ </property>
+ <property name="text">
+ <string>RLE compression</string>
+ </property>
+ </widget>
+ <widget class="KIntNumInput" row="0" column="0">
+ <property name="name">
+ <cstring>slider</cstring>
+ </property>
+ <property name="label">
+ <string>Compression level</string>
+ </property>
+ </widget>
+ <widget class="TQCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>checkInterlaced</cstring>
+ </property>
+ <property name="text">
+ <string>Interlaced</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="TQGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;i&gt;No special options available for this format&lt;/i&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignTop|AlignHCenter</set>
+ </property>
+ <property name="indent">
+ <number>20</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<layoutdefaults spacing="6" margin="11"/>
+<includes>
+ <include location="global" impldecl="in implementation">knuminput.h</include>
+</includes>
+</UI>