void DocumentHandler::setFontFamily(const QString &arg)
{
    QTextCursor cursor = textCursor();
    if (cursor.isNull())
        return;
    QTextCharFormat format;
    format.setFontFamily(arg);
    mergeFormatOnWordOrSelection(format);
    emit fontFamilyChanged();
}
void DocumentHandler::reset()
{
    emit fontFamilyChanged();
    emit alignmentChanged();
    emit boldChanged();
    emit italicChanged();
    emit underlineChanged();
    emit fontSizeChanged();
    emit textColorChanged();
}
ArtisticTextShapeConfigWidget::ArtisticTextShapeConfigWidget(ArtisticTextTool *textTool)
    : m_textTool(textTool)
{
    Q_ASSERT(m_textTool);

    widget.setupUi( this );

    widget.bold->setDefaultAction(textTool->action("artistictext_font_bold"));
    widget.italic->setDefaultAction(textTool->action("artistictext_font_italic"));
    widget.superScript->setDefaultAction(textTool->action("artistictext_superscript"));
    widget.subScript->setDefaultAction(textTool->action("artistictext_subscript"));
    widget.anchorStart->setDefaultAction(textTool->action("artistictext_anchor_start"));
    widget.anchorMiddle->setDefaultAction(textTool->action("artistictext_anchor_middle"));
    widget.anchorEnd->setDefaultAction(textTool->action("artistictext_anchor_end"));
    widget.fontSize->setRange( 2, 1000 );

    connect(widget.fontFamily, SIGNAL(currentFontChanged(QFont)), this, SIGNAL(fontFamilyChanged(QFont)));
    connect(widget.fontSize, SIGNAL(valueChanged(int)), this, SIGNAL(fontSizeChanged(int)));
}
void RelationalField::setfontFamily(QString arg) {
    if (m_fontFamily != arg) {
        m_fontFamily = arg;
        emit fontFamilyChanged(arg);
    }
}