void FontButton::fontDialog2 (QFont font) { _font = font; setFontButton(); _changed = TRUE; emit valueChanged(); }
FontButton::FontButton (QWidget *w, QFont f) : QPushButton (w) { _font = f; QObject::connect(this, SIGNAL(clicked()), this, SLOT(fontDialog())); setMaximumHeight(25); setFontButton(); setText(tr("Font")); _changed = FALSE; }
void FontButton::fontDialog () { bool ok; QFont f = QFontDialog::getFont(&ok, font, this); if (ok) { if (font != f) { font = f; setFontButton(); changed = TRUE; emit valueChanged(); } } }