void gNodeComponentWidget::selectComponentColor() { QColorDialog w; if(!w.exec())return; QColor q = w.selectedColor(); m_component->setColor(q.red(),q.green(),q.blue()); }
void ColorListEditorWidget::on_AddColorButton__released () { QColorDialog dia (this); if (dia.exec () != QDialog::Accepted) return; AddColor (dia.selectedColor ()); }
void XYZTextEditor::textColor() { QColor color; QColorDialog *dlg = new QColorDialog(this); if (dlg->exec() == QDialog::Accepted) { color = dlg->selectedColor(); } else return; QTextCharFormat fmt; fmt.setForeground( QBrush( color ) ); mergeFormatOnWordOrSelection(fmt); }
void PageSettingDlg::selectColor() { QColor color; QColorDialog *dlg = new QColorDialog(color, this); if (dlg->exec() == QDialog::Accepted) { color = dlg->selectedColor(); } else return; strColor = colorToString(color); pageSetting.borderColor = strColor; ui->lblBorderColor->setStyleSheet("QLabel {background-color: "+strColor+"}"); }
void FenetreParametresAffichage::on_pushButtonCouleurPointsAxes_clicked() { ParametresPoint parametresPointsAxes = this->parametresAffichage.getParametresPointsAxes(); QColorDialog* fenetreCouleurPointsAxes = new QColorDialog( QColor(parametresPointsAxes.getCouleurPoint()), this); if (fenetreCouleurPointsAxes->exec() == QColorDialog::Rejected) return; parametresPointsAxes.setCouleurPoint(fenetreCouleurPointsAxes->selectedColor().rgb()); this->parametresAffichage.setParametresPointsAxes(parametresPointsAxes); this->actualiserElementsGraphiques(); }
void SettingsWindow::on_textColorChangeButton_clicked() { QColorDialog dialog; dialog.setWindowTitle("select a color for selector items text"); if(dialog.exec()) { QColor color=dialog.selectedColor(); QString name=color.name(); ui->textColorPreview->setStyleSheet("QLabel{\n background:"+name+";\n background-repeat: repeat-y;\n background-position: left;\n}"); ui->textColorPreview->setText(name); } }
void SettingsWidget::showColourDialog() { QColorDialog colorDialog; colorDialog.setCurrentColor(settings.tableColour); if (colorDialog.exec() == QDialog::Accepted) { QColor colour = colorDialog.selectedColor(); settings.tableColour = colour.name(); QString colourStyleSheet = "background-color: " + colour.name() + ";"; ui->colourButton->setStyleSheet(colourStyleSheet); applySettings(); } }
void EnvironmentSettingsDialog::on_highlightBarColor_clicked() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "CSPSoftware", "NESICIDE"); QColorDialog dlg; dlg.setCurrentColor(m_highlightBarColor); if (dlg.exec() == QColorDialog::Accepted) { m_highlightBarColor = dlg.selectedColor(); m_scintilla->setMarkerBackgroundColor(m_highlightBarColor,Marker_Highlight); } }
void EnvironmentSettingsDialog::on_styleColor_clicked() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "CSPSoftware", "NESICIDE"); QColorDialog dlg; int style = ui->styleName->itemData(ui->styleName->currentIndex()).toInt(); dlg.setCurrentColor(m_lexer->color(style)); if (dlg.exec() == QColorDialog::Accepted) { QColor chosenColor = dlg.selectedColor(); m_lexer->setColor(chosenColor,style); } }
void EnvironmentSettingsDialog::on_backgroundColor_clicked() { QSettings settings(QSettings::IniFormat, QSettings::UserScope, "CSPSoftware", "NESICIDE"); QColorDialog dlg; dlg.setCurrentColor(m_lexer->defaultPaper()); if (dlg.exec() == QColorDialog::Accepted) { QColor chosenColor = dlg.selectedColor(); m_lexer->setDefaultPaper(chosenColor); m_lexer->setPaper(chosenColor,-1); } }
void ListItemSettingsEditor::selectColor() { QColorDialog dialog; if (dialog.exec()) { QColor color = dialog.selectedColor(); QString senderName = sender()->objectName(); if ("textColorToolButton" == senderName) { m_listitem->setTextColor(color); ui->textColorLineEdit->setText(color.name(QColor::HexRgb)); } else if ("backgroundColorToolButton" == senderName) { m_listitem->setBackgroundColor(color); ui->backgroundColorLineEdit->setText(color.name(QColor::HexRgb)); } } setupForm(); }
void QConsoleWidgetPrivate:: selectAndSetFontColor() { auto color_ = this->textCharFormat.foreground().color(); QColorDialog * dialog = new QColorDialog(color_); if (dialog->exec()) { color_ = dialog->selectedColor(); this->textCharFormat.setForeground(color_); super->updateCharFormat(); } dialog->deleteLater(); }
void ApplicationPreferencesDialog::colorToolButtonClicked() { QToolButton *toolButton = dynamic_cast< QToolButton * >(sender()); assert(toolButton); QColorDialog colorDlg; int result = colorDlg.exec(); QColor selectedColor; if(result == QDialog::Accepted) { selectedColor = colorDlg.selectedColor(); QPixmap pixmap(20, 20); pixmap.fill(selectedColor); toolButton->setIcon(pixmap); if(toolButton == ui->ui_unconnectedRailsToolButton) { m_unconnectedRailsColor = selectedColor; } else if(toolButton == ui->ui_connectedRailsToolButton) { m_connectedRailsColor = selectedColor; } else if(toolButton == ui->ui_systemFunctionToolButton) { m_systemFunctionColor = selectedColor; } else if(toolButton == ui->ui_functionNamesToolButton) { m_functionNamesColor = selectedColor; } else if(toolButton == ui->ui_functionCallsToolButton) { m_functionCallsColor = selectedColor; } else if(toolButton == ui->ui_stringsToolButton) { m_stringsColor = selectedColor; } else if(toolButton == ui->ui_variablesToolButton) { m_variablesColor = selectedColor; } else if(toolButton == ui->ui_grabbedTextToolButton) { m_grabbedTextColor = selectedColor; } } }
void ItemAction::selectColorText() { QColorDialog *colorDialog = new QColorDialog(this); if (colorDialog->exec() == QDialog::Rejected) { delete colorDialog; return; } QColor color = colorDialog->selectedColor(); delete colorDialog; colorButton_->setToolTip(color.name()); QPixmap pixmap(14, 14); pixmap.fill(color); colorButton_->setIcon(pixmap); }
void LabelDialog::selectColorBg() { QColorDialog *colorDialog = new QColorDialog(this); if (colorDialog->exec() == QDialog::Rejected) { delete colorDialog; return; } QColor color = colorDialog->selectedColor(); delete colorDialog; colorBgStr_ = color.name(); QPixmap pixmap(14, 14); pixmap.fill(color); colorBgButton_->setIcon(pixmap); }
void EditFldDlg::chooseColor() { QColor color; if (sender() == ui->btnColorF) color = colorFromString(ui->lblColorF->styleSheet()); if (sender() == ui->btnColorB) color = colorFromString(ui->lblColorB->styleSheet()); QColorDialog *dlg = new QColorDialog(color, this); if (dlg->exec() == QDialog::Accepted) { color = dlg->selectedColor(); } else return; QString strColor = colorToString(color); if (sender() == ui->btnColorB) ui->lblColorB->setStyleSheet("QLabel {background-color: "+strColor+"}"); if (sender() == ui->btnColorF) ui->lblColorF->setStyleSheet("QLabel {background-color: "+strColor+"}"); encodeHighLightingString(); }
void PlanSimSubpanel::onToolColor() { QTreeWidgetItem* item = right->ui->treeSimViews->currentItem(); QString viewName = item->data(0, Qt::UserRole + 1).toString(); QString portName = item->data(0, Qt::UserRole + 2).toString(); if (portName == "") { return; } else { QColorDialog* colorDialog = new QColorDialog(left); colorDialog->setOptions(QColorDialog::DontUseNativeDialog); if (colorDialog->exec()) { portToPlot* p = getPortToPlot(viewName, portName); p->color = colorDialog->selectedColor(); onTreeItemSelected(); updateCustomPlot(); } } }
void GameObjectLightComponentWidget::on_m_ColorChangerButton_clicked() { if (!m_IsReady) { return; } Light* light = nullptr; //////////////////////////////////////// // Verify LOC and Get Light Object light = GetLight(); if(light == nullptr) { AETODO("Add log"); return; } //////////////////////////////////////// // Get QColor from Dialog QColorDialog qColorDiaglog; int result = qColorDiaglog.exec(); if(result != QDialog::Accepted) { return; } QColor qColor = qColorDiaglog.selectedColor(); //////////////////////////////////////// // Set Color to Widget SetColorToColorWidget(qColor); //////////////////////////////////////// // Set Color to Instance Color color = AEQTHelpers::GetColorFromQColor(qColor); light->SetColor(color); }
void ShowPicture::onBtnColorSettingClicked() { QColorDialog* colorDlg = new QColorDialog; colorDlg->exec(); QColor selectColor = colorDlg->selectedColor(); }