Beispiel #1
0
void WKnobComposed::setup(QDomNode node) {
    clear();

    // Set background pixmap if available
    if (!selectNode(node, "BackPath").isNull()) {
        setPixmapBackground(getPath(selectNodeQString(node, "BackPath")));
    }

    // Set background pixmap if available
    if (!selectNode(node, "Knob").isNull()) {
        setPixmapKnob(getPath(selectNodeQString(node, "Knob")));
    }

    if (!selectNode(node, "MinAngle").isNull()) {
        m_dMinAngle = selectNodeDouble(node, "MinAngle");
    }

    if (!selectNode(node, "MaxAngle").isNull()) {
        m_dMaxAngle = selectNodeDouble(node, "MaxAngle");
    }
}
Beispiel #2
0
void WKnobComposed::setup(QDomNode node, const SkinContext& context) {
    clear();

    // Set background pixmap if available
    if (context.hasNode(node, "BackPath")) {
        setPixmapBackground(context.getSkinPath(context.selectString(node, "BackPath")));
    }

    // Set background pixmap if available
    if (context.hasNode(node, "Knob")) {
        setPixmapKnob(context.getSkinPath(context.selectString(node, "Knob")));
    }

    if (context.hasNode(node, "MinAngle")) {
        m_dMinAngle = context.selectDouble(node, "MinAngle");
    }

    if (context.hasNode(node, "MaxAngle")) {
        m_dMaxAngle = context.selectDouble(node, "MaxAngle");
    }
}
Beispiel #3
0
void WKnobComposed::setup(QDomNode node, const SkinContext& context) {
    clear();

    // Set background pixmap if available
    if (context.hasNode(node, "BackPath")) {
        QString mode_str = context.selectAttributeString(
                context.selectElement(node, "BackPath"), "scalemode", "TILE");
        setPixmapBackground(context.getPixmapPath(context.selectNode(node, "BackPath")),
                            Paintable::DrawModeFromString(mode_str));
    }

    // Set background pixmap if available
    if (context.hasNode(node, "Knob")) {
        setPixmapKnob(context.getPixmapPath(context.selectNode(node, "Knob")));
    }

    if (context.hasNode(node, "MinAngle")) {
        m_dMinAngle = context.selectDouble(node, "MinAngle");
    }

    if (context.hasNode(node, "MaxAngle")) {
        m_dMaxAngle = context.selectDouble(node, "MaxAngle");
    }
}