void iUserControlColorChooser::onValueChangedBExpanded(iWidget* source) { _sliderB->setValue(_valueChooserBExpanded->getValue()); _valueChooserB->setValue(_valueChooserBExpanded->getValue()); updateColorHSV(); updateWidgets(); }
void iUserControlColorChooser::onSliderChangedA(iWidget* source) { _valueChooserA->setValue(_sliderA->getValue()); _valueChooserAExpanded->setValue(_sliderR->getValue()); updateColorHSV(); updateWidgets(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QImage *ppm = new QImage(":/ico/egshuai.ico"); ui->aboutlable->setPixmap(QPixmap::fromImage(*ppm)); ui->aboutlable->resize(ppm->width(),ppm->height()); /*IP工具相关*/ findipport=new FindipPort(); httpreply=new HttpReply(); connect(findipport,SIGNAL(signalres(QString,QColor)),ui->textEdit_2,SLOT(addcolortext(QString,QColor))); connect(httpreply,SIGNAL(signalres(QString,QColor)),ui->textEdit_2,SLOT(addcolortext(QString,QColor))); /*颜色编辑器相关*/ colorProcessor=new ColorProcessor(ui->hSelector, ui->colorselect); connect( ui->hSelector, SIGNAL(hueChanged(QColor)), ui->colorselect, SLOT(changeHue(QColor))); connect(ui->colorselect,SIGNAL(colorChanged(QColor)),ui->widget_2,SLOT(changeColor(QColor))); connect(ui->colorselect,SIGNAL(colorChanged(QColor)),this,SLOT(updateColorText(QColor))); connect(ui->screenimg,SIGNAL(colorchanged(QColor)),ui->widget_2,SLOT(changeColor(QColor))); connect(ui->screenimg,SIGNAL(colorchanged(QColor)),ui->colorselect, SLOT(changeHue(QColor))); connect(ui->screenimg,SIGNAL(colorchanged(QColor)),this,SLOT(updateColorText(QColor))); connect(ui->screenimg,SIGNAL(colorchanged(QColor)),ui->hSelector,SLOT(colorchanged(QColor))); connect( ui->HSV, SIGNAL(textEdited(QString)), this, SLOT(updateColorHSV(QString)) ); connect( ui->RGB, SIGNAL(textEdited(QString)), this, SLOT(updateColorRGB(QString)) ); connect( ui->CMYK, SIGNAL(textEdited(QString)), this, SLOT(updateColorCMYK(QString)) ); connect( ui->Hex, SIGNAL(textEdited(QString)), this, SLOT(updateColorHex(QString)) ); }