/****************************************************************************
** Form interface generated from reading ui file 'sq_imagebcg.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#ifndef UI_SQ_IMAGEBCG_H
#define UI_SQ_IMAGEBCG_H

#include <ntqvariant.h>
#include <ntqpixmap.h>
#include <ntqdialog.h>
#include <tqimage.h>
#include <tqstringlist.h>
#include "sq_imageedit.h"

class TQVBoxLayout;
class TQHBoxLayout;
class TQGridLayout;
class TQSpacerItem;
class SQ_BCGLabel;
class SQ_Label;
class TQWidgetStack;
class TQWidget;
class TQSpinBox;
class TQPushButton;
class KDoubleSpinBox;
class TQSlider;
class TQGroupBox;
class TQLabel;
class TQFrame;

class SQ_ImageBCG : public TQDialog
{
    TQ_OBJECT

public:
    SQ_ImageBCG( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
    ~SQ_ImageBCG();

    TQWidgetStack* widgetStackParams;
    TQWidget* WStackPage;
    TQSpinBox* spinB;
    TQPushButton* pushResetG;
    TQPushButton* pushResetC;
    KDoubleSpinBox* spinG;
    TQSpinBox* spinC;
    TQPushButton* pushResetB;
    SQ_Label* sQ_LabelB;
    TQSlider* sliderB;
    SQ_Label* sQ_LabelC;
    TQSlider* sliderC;
    SQ_Label* sQ_LabelG;
    TQSlider* sliderG;
    TQWidget* WStackPage_2;
    TQPushButton* pushResetRed;
    TQSpinBox* spinRed;
    TQSpinBox* spinGreen;
    TQPushButton* pushResetGreen;
    TQPushButton* pushResetBlue;
    TQSpinBox* spinBlue;
    SQ_Label* sQ_LabelBlue;
    TQSlider* sliderBlue;
    SQ_Label* sQ_LabelGreen;
    TQSlider* sliderGreen;
    SQ_Label* sQ_LabelRed;
    TQSlider* sliderRed;
    TQGroupBox* groupBox3;
    TQPushButton* push2;
    TQPushButton* push1;
    TQLabel* text;
    TQPushButton* pushGO;
    TQPushButton* pushCancel;
    TQFrame* line2;
    TQLabel* textLabel3;
    SQ_BCGLabel* pixmap1;
    TQLabel* textLabel4;
    SQ_BCGLabel* pixmap;

    void setPreviewImage( const TQImage & im );
    static SQ_ImageBCG * instance();

signals:
    void bcg(SQ_ImageBCGOptions*);

protected:
    TQGridLayout* SQ_ImageBCGLayout;
    TQSpacerItem* spacer12_2;
    TQSpacerItem* spacer11;
    TQGridLayout* WStackPageLayout;
    TQHBoxLayout* layout6;
    TQHBoxLayout* layout5;
    TQHBoxLayout* layout4;
    TQGridLayout* WStackPageLayout_2;
    TQHBoxLayout* layout1;
    TQHBoxLayout* layout2;
    TQHBoxLayout* layout3;
    TQGridLayout* groupBox3Layout;
    TQSpacerItem* spacer26;
    TQSpacerItem* spacer27;
    TQHBoxLayout* layout8;
    TQSpacerItem* spacer3;
    TQGridLayout* layout15;
    TQSpacerItem* spacer13;
    TQSpacerItem* spacer35;
    TQSpacerItem* spacer34;

protected slots:
    virtual void languageChange();

private:
    int id;
    TQImage sample, sample_saved;
    TQStringList strings;
    static SQ_ImageBCG *m_inst;

    TQPixmap image0;

    void init();
    int RGB2Y( int r, int g, int b );
    void assignNewImage( const TQImage & im );
    void changeImage( int b, int c, int g1, int red, int green, int blue );

private slots:
    void slotResetG();
    void slotResetC();
    void slotResetB();
    void slotResetRed();
    void slotResetGreen();
    void slotResetBlue();
    void slotStartBCG();
    void slotBChanged( int v );
    void slotCChanged( int v );
    void slotRedChanged( int v );
    void slotGreenChanged( int v );
    void slotBlueChanged( int v );
    void slotGChanged( int v );
    void slotGSpinChanged( double v );
    void slotPush();

};

#endif // SQ_IMAGEBCG_H
