Beispiel #1
0
QWidget *Filter::widget(QWidget *parent)
{
    FilterWidget * fw = new FilterWidget(parent);
    fw->setColorMode(mColorMode);
    for (int i = 0; i < 5; i++)
    {
        fw->setAffectedChannel(i, mAffectedChannel[i]);
        fw->setThreshold(i, mThreshold[i]);
    }
    connect(this, SIGNAL(colorModeChanged(int)), fw, SLOT(setColorMode(int)));
    connect(this, SIGNAL(affectedChannelChanged(int,bool)), fw, SLOT(setAffectedChannel(int,bool)));
    connect(this, SIGNAL(thresholdChanged(int,int)), fw, SLOT(setThreshold(int,int)));
    connect(fw, SIGNAL(colorModeChanged(int)), this, SLOT(setColorMode(int)));
    connect(fw, SIGNAL(affectedChannelChanged(int,bool)), this, SLOT(setAffectedChannel(int,bool)));
    connect(fw, SIGNAL(thresholdChanged(int,int)), this, SLOT(setThreshold(int,int)));
    return fw;
}