/** Handler for changing the background colour of an integrated peak. */ void PeaksWorkspaceWidget::onBackgroundColourClicked() { QColorDialog colourDlg; QColor selectedColour = colourDlg.getColor(); if (selectedColour.isValid()) { ui.btnBackgroundColor->setBackgroundColor(selectedColour); emit backgroundColourChanged(this->m_ws, selectedColour); } }
void ColorWidget::mousePressEvent(QMouseEvent *) { QColorDialog cDialog; QColor color = cDialog.getColor(TranslateToQColor(_color)); if (color.isValid()) _color = TranslateToFloat3(color); update(); }
void ColorLabel::selectColor() { QColorDialog cDlg; QColor newColor = cDlg.getColor(mColor, this, text()); if(newColor.isValid()) setColor(newColor); }
void agente::mouseDoubleClickEvent(QMouseEvent* E){ if(E->button() ==Qt::LeftButton){ if(isChecked()){ QColorDialog* d = new QColorDialog(this); QPixmap P(":/recursos/testigo.png"); color_ = d->getColor(); P.fill(color_); labelColor_.setPixmap(P); } } }
void SettingsDialog::chooseColor(QWidget* widget) { QToolButton* but = qobject_cast<QToolButton*>(widget); QString colorName = but->text(); QColorDialog selector; QColor color(SETTINGS->get("Color", colorName).toString()); color = selector.getColor(color); if (color.isValid()) { SETTINGS->set("Color", colorName, color.name()); updateColorToolButtonColor(but); } }
void MainWindow::on_selectColour_clicked() { QColor mainWinColour(ui->spinRed->value(),ui->spinGreen->value(),ui->spinBlue->value()); QColorDialog chooseColour; mainWinColour = chooseColour.getColor(mainWinColour); if (mainWinColour.isValid()) { ui->spinRed->setValue(mainWinColour.red()); ui->spinGreen->setValue(mainWinColour.green()); ui->spinBlue->setValue(mainWinColour.blue()); } }
void ClusterColorDialog::onSetColorClicked() { QColorDialog cd; QColor c=cd.getColor(); int id=currentClusterIndex; ClusterColorScheme::getSingleton()[id].r=c.red(); ClusterColorScheme::getSingleton()[id].g=c.green(); ClusterColorScheme::getSingleton()[id].b=c.blue(); onClusterColorChanged(); }
void sub3dtoolguiAdvance::changeColorOutline() { QColorDialog nc; QColor c; c = nc.getColor(QColor(_data->cOutline.r, _data->cOutline.g, _data->cOutline.b)); if(c.isValid()) { QPalette pal = ui->lineColorOutline->palette(); pal.setColor(ui->lineColorOutline->backgroundRole(), c); ui->lineColorOutline->setPalette(pal); } }
void ConnectionDialog::colorSelectTert() { QColorDialog* ColorDiag = new QColorDialog(); *this->color3 = ColorDiag->getColor(); QPixmap* colorDisplay = new QPixmap(25, 25); colorDisplay->fill(*this->color3); this->ui->tertColorImage->setPixmap(*colorDisplay); // Set image to current label this->updateShipImage(this->ui->shipNames->currentText()); }
void QG_DlgOptionsGeneral::set_color(QComboBox* combo, QColor custom) { QColor current; current.setNamedColor(combo->lineEdit()->text()); QColorDialog dlg; dlg.setCustomColor(0, custom.rgb()); QColor color = dlg.getColor(current, this, "Select Color", QColorDialog::DontUseNativeDialog); if (color.isValid()) { combo->lineEdit()->setText(color.name()); } }
void FamiliasTPV::on_mui_seleccionarcolor_clicked() { QColor coloractual; if (QColor::isValidColor(mui_colortpvfamilia->text())) { coloractual.setNamedColor(mui_colortpvfamilia->text()); } else { coloractual.setNamedColor("#FFFFFF"); } // end if QColorDialog colordialog; QColor color = colordialog.getColor(coloractual, this); mui_colortpvfamilia->setText(color.name()); }
void MainWindow::pickTheColor() { QSqlQuery q; //q.exec(QLatin1String("INSERT INTO images(genreId, bigPath, smallPath,Y,I,Q) VALUES (1,'C:/1.jpg','C:/2.jpg',140,20,20)")); //q.exec(QLatin1String("INSERT INTO Y(imageId, x, y, sign) VALUES (1,1,1,1)")); q.exec(QLatin1String("SELECT bigPath,smallPath,Y,I,Q FROM images")); q.first(); qDebug()<<" [0]= "<<QString(q.value(0).toString())<<" [1]= "<<QString(q.value(1).toString())<<" [2]= "<<QString(q.value(2).toString())<<" [3]= "<<QString(q.value(3).toString()); //qDebug()<<"111"; QColorDialog dialog; currColor=dialog.getColor(currColor); ui->widget_2->setColor(currColor); }