void MsgFormatterWidget::handleTextColor () { QBrush brush = GetActualCharFormat ().foreground (); const QColor& color = QColorDialog::getColor (brush.color (), Edit_); if (!color.isValid ()) return; CharFormatActor ([color] (QTextFormat *fmt) { fmt->setForeground (QBrush (color)); }); }
void MsgFormatterWidget::handleFont () { QFont font = GetActualCharFormat ().font (); bool ok = false; font = QFontDialog::getFont (&ok, font, Edit_); if (!ok) return; CharFormatActor ([font] (QTextCharFormat *fmt) { fmt->setFont (font); }); }
void MsgFormatterWidget::handleTextColor () { QBrush brush = GetActualCharFormat ().foreground (); const QColor& color = QColorDialog::getColor (brush.color (), Edit_); if (!color.isValid ()) return; CharFormatActor (boost::bind (&QTextFormat::setForeground, _1, QBrush (color))); }
void MsgFormatterWidget::handleFont () { QFont font = GetActualCharFormat ().font (); bool ok = false; font = QFontDialog::getFont (&ok, font, Edit_); if (!ok) return; CharFormatActor (boost::bind (&QTextCharFormat::setFont, _1, font)); }