Ejemplo n.º 1
0
void DepthComboBox::toDouble(const QString & string )
{
    bool ok = false;
    double d = string.toDouble(&ok);

    if (ok) {
        emit depthChanged(d);
    } else {
        emit depthChanged(-1);
    }
}
Ejemplo n.º 2
0
void FlameGraph::rebuild()
{
    qDeleteAll(childItems());
    childItems().clear();
    m_depth = 0;

    if (!m_model) {
        emit depthChanged(m_depth);
        return;
    }

    m_depth = buildNode(QModelIndex(), this, 0);
    emit depthChanged(m_depth);
}
Ejemplo n.º 3
0
void TestItem::setDepth(int depth){
    if (depth != m_depth){
        m_depth = depth;
        emit depthChanged();
        emit dataChanged();
    }
}
Ejemplo n.º 4
0
void CanvasContextAttributes::setDepth(bool value)
{
    if (m_depth == value)
        return;

    m_depth = value;
    emit depthChanged(value);
}
Ejemplo n.º 5
0
void AbstractLocationOutput::setDepth(double depth)
{
    if (m_depth != depth) {
        m_depth = depth;

        emit depthChanged(m_depth);
        emit wasModified();
    }
}
Ejemplo n.º 6
0
void ModControl::setupUi()
{
    QVBoxLayout* layout = new QVBoxLayout(this);

    ModDial* dial = new ModDial(title_, this, dockSize_);

    connect(dial, &ModDial::scaledValueChanged,
            [=] (double value)
    {
        emit controlChanged(value);
    });

    layout->addWidget(dial);

    ModDockUi* dock = new ModDockUi(dockSize_, wrap_, this);

    connect(dock, &ModDockUi::depthChanged,
            [=] (ModDockUi::index_t index, double value)
    {
        dial->setModArcValue(index, value);
        emit depthChanged(index, value);
    });

    connect(dock, &ModDockUi::modUnitInserted,
            [=] (ModDockUi::index_t index, const ModUnitUi& mod)
    {
        emit modUnitInserted(index, mod);
        dial->setModUnitUiForModArc(index, mod);
    });

    connect(dock, &ModDockUi::modUnitRemoved,
            [=] (ModDockUi::index_t index)
    {
        dial->removeModUnitUiForModArc(index);
        emit modUnitRemoved(index);
    });

    connect(dock, &ModDockUi::itemHovered,
            [=] (ModDockUi::index_t index)
    {
        dial->showModArc(index);
    });

    // Adding the dock in a grid layout centers
    // it in the parent layout
    QGridLayout* dockLayout = new QGridLayout;

    dockLayout->addWidget(dock);

    layout->addLayout(dockLayout);

    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

    QWidget::setMouseTracking(true);
}
clQmlCircularBar::clQmlCircularBar(QQuickPaintedItem *parent) :
    QQuickPaintedItem(parent)
{
    __horizontalDepth = 10;
    __start_angle = 180;
    __span_angle = 0;
    __color = "white";
    __barImage = QImage("bar_active.png");

    //update painting of the shape upon changes of properties.
    connect(this, SIGNAL(colorChanged()), this, SLOT(update()));
    connect(this, SIGNAL(depthChanged()), this, SLOT(update()));
    connect(this, SIGNAL(startAngleChanged()), this, SLOT(update()));
    connect(this, SIGNAL(spanAngleChanged()), this, SLOT(update()));
    connect(this, SIGNAL(progressChanged()), this, SLOT(update()));
}