Beispiel #1
0
void LinearLayoutAttached::setSpacing(int s)
{
    if (m_spacing != s) {
        m_spacing = s;
        emit spacingChanged(reinterpret_cast<QGraphicsLayoutItem*>(parent()), m_spacing);
    }
}
Beispiel #2
0
void QDeclarativeBasePositioner::setSpacing(int s)
{
    Q_D(QDeclarativeBasePositioner);
    if (s==d->spacing)
        return;
    d->spacing = s;
    prePositioning();
    emit spacingChanged();
}
Beispiel #3
0
void DColorPicker::setSpacing(int spacing)
{
    if(spacing == m_spacing)
        return;

    m_spacing = spacing;
    resize();

    emit spacingChanged(spacing);
}
Beispiel #4
0
void FontConfig::setCharSpacing(int s) {
    if (m_char_spacing!=s) {
        m_char_spacing = s;
        spacingChanged();
    }
}
Beispiel #5
0
void FontConfig::setLineSpacing(int s) {
    if (m_line_spacing!=s) {
        m_line_spacing = s;
        spacingChanged();
    }
}
Beispiel #6
0
void BrushEngine::setSpacing(int spacing) {
    if (this->spacing == spacing) return;
    this->spacing = spacing;
    emit spacingChanged(spacing);
}
Beispiel #7
0
FontBuilder::FontBuilder(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::FontBuilder),
    m_image_writer(0)
{
    ui->setupUi(this);



    m_font_config = new FontConfig(this);
    bool font_config_block = m_font_config->blockSignals(true);
    connect(m_font_config,SIGNAL(nameChanged()),this,SLOT(onFontNameChanged()));
    connect(m_font_config,SIGNAL(sizeChanged()),this,SLOT(onFontNameChanged()));

    m_font_renderer = new FontRenderer(this,m_font_config);

    connect(m_font_renderer,SIGNAL(imagesChanged()),this,SLOT(onRenderedChanged()));

    m_layout_config = new LayoutConfig(this);
    m_layout_data = new LayoutData(this);

    connect(m_layout_data,SIGNAL(layoutChanged()),this,SLOT(onLayoutChanged()));

    m_layouter = 0;
    m_layouter_factory = new LayouterFactory(this);

    bool b = ui->comboBoxLayouter->blockSignals(true);
    ui->comboBoxLayouter->clear();
    ui->comboBoxLayouter->addItems(m_layouter_factory->names());

    m_output_config = new OutputConfig(this);

    QSettings settings("FontBuilder.ini", QSettings::IniFormat);
    QStringList loadList = settings.childGroups();
    loadList.removeOne("default");
    m_model = new QStringListModel(this);
    m_model->setStringList(loadList);

    ui->listView->setModel(m_model);
    ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);

    settings.beginGroup("default");
    restoreGeometry(settings.value("geometry").toByteArray());
    readConfig(settings,"fontconfig",m_font_config);
    m_font_config->normalize();
    readConfig(settings,"layoutconfig",m_layout_config);
    readConfig(settings,"outputconfig",m_output_config);
    ui->checkBoxDrawGrid->setChecked(settings.value("draw_grid").toBool());
    settings.endGroup();

    ui->widgetFontPreview->setDrawGrid(ui->checkBoxDrawGrid->isChecked());
    connect(ui->checkBoxDrawGrid,SIGNAL(toggled(bool)),this,SLOT(on_checkBoxDrawGrid_toggled(bool)));

    ui->frameCharacters->setConfig(m_font_config);
    ui->frameFontOptions->setConfig(m_font_config);
    if (!m_layout_config->layouter().isEmpty()) {
        for (int i=0;i<ui->comboBoxLayouter->count();i++)
            if (ui->comboBoxLayouter->itemText(i)==m_layout_config->layouter())
                ui->comboBoxLayouter->setCurrentIndex(i);
    }
    ui->frameLayoutConfig->setConfig(m_layout_config);


    m_exporter_factory = new ExporterFactory(this);
    ui->frameOutput->setExporters(m_exporter_factory->names());

    m_image_writer_factory = new ImageWriterFactory(this);
    ui->frameOutput->setImageWriters(m_image_writer_factory->names());
    ui->frameOutput->setChnlTypes(
                QStringList() <<"Alpha" << "RGB");

    ui->comboBoxLayouter->blockSignals(b);
    this->on_comboBoxLayouter_currentIndexChanged(
            ui->comboBoxLayouter->currentText());

    ui->frameOutput->setConfig(m_output_config);
    m_font_renderer->renderAs(m_output_config->chnlType(), false);
    ui->frameFontSelect->setConfig(m_font_config, true);

    ui->fontTestFrame->setLayoutData(m_layout_data);
    ui->fontTestFrame->setRendererData(&m_font_renderer->data());
    ui->fontTestFrame->setFontConfig(m_font_config);

    ui->widgetFontPreview->setLayoutData(m_layout_data);
    ui->widgetFontPreview->setRendererData(&m_font_renderer->data());
    ui->widgetFontPreview->setLayoutConfig(m_layout_config);

    m_font_config->blockSignals(font_config_block);
    m_font_config->emmitChange();

    connect(m_font_config,SIGNAL(spacingChanged()),this,SLOT(onSpacingChanged()));
    ui->fontTestFrame->refresh();

    m_font_loader = new FontLoader(this);
}
void QQuickStretchColumnContainer::setSpacing (int spacing) {
    if (m_spacing != spacing) {
        m_spacing = spacing;
        emit spacingChanged (spacing);
    }
}
void StretchLayoutBase::setSpacing(int spacing) {
	if (m_spacing != spacing) {
		m_spacing = spacing;
		emit spacingChanged();
	}
}