示例#1
0
NodeCtrl::NodeCtrl(MainCtrl * manager, relarank::NodeHandle node): QObject(manager), m_manager(manager), m_node(node),
    m_plugs(QHash < PlugHandle,
            QList < PlugHandle >> ())
{
    // connect node signals
    connect(&m_node, SIGNAL(removalRequested()), this, SLOT(remove()));
    connect(&m_node,
            SIGNAL(inputConnected
                   (relarank::PlugHandle, relarank::PlugHandle)), this,
            SLOT(inputConnected
                 (relarank::PlugHandle, relarank::PlugHandle)));
    connect(&m_node,
            SIGNAL(outputConnected
                   (relarank::PlugHandle, relarank::PlugHandle)), this,
            SLOT(outputConnected
                 (relarank::PlugHandle, relarank::PlugHandle)));
    connect(&m_node,
            SIGNAL(inputDisconnected
                   (relarank::PlugHandle, relarank::PlugHandle)), this,
            SLOT(inputDisconnected
                 (relarank::PlugHandle, relarank::PlugHandle)));
    connect(&m_node,
            SIGNAL(outputDisconnected
                   (relarank::PlugHandle, relarank::PlugHandle)), this,
            SLOT(outputDisconnected
                 (relarank::PlugHandle, relarank::PlugHandle)));
}
示例#2
0
            m_outputs.append(output);

            if (connected) {
                output->_setRate(m_interface->rate(id));
                int rotation = m_interface->rotation(id);
                output->_setRotation((Rotation) rotation);
                output->_setReflectX(m_interface->reflectX(id));
                output->_setReflectY(m_interface->reflectY(id));

                outputConnectedSlot(id);
            }
        }

        connect(m_interface, SIGNAL(outputConnected(QString)), this, SLOT(outputConnectedSlot(QString)));
        connect(m_interface, SIGNAL(outputDisconnected(QString)), this, SLOT(outputDisconnectedSlot(QString)));
        connect(m_interface, SIGNAL(outputActivated(QString)), this, SLOT(outputActivatedSlot(QString)));
        connect(m_interface, SIGNAL(outputDeactivated(QString)), this, SLOT(outputDeactivatedSlot(QString)));
        connect(m_interface, SIGNAL(outputResized(QString)), this, SLOT(outputResizedSlot(QString)));
        connect(m_interface, SIGNAL(outputMoved(QString)), this, SLOT(outputMovedSlot(QString)));
        connect(m_interface, SIGNAL(outputRotated(QString)), this, SLOT(outputRotatedSlot(QString)));
        connect(m_interface, SIGNAL(outputRateChanged(QString)), this, SLOT(outputRateChangedSlot(QString)));
        connect(m_interface, SIGNAL(outputReflected(QString)), this, SLOT(outputReflectedSlot(QString)));
    }

    QList<Output *> DBusOutputs::outputs()
    {
        QList<Output *> result;
        foreach(SimpleOutput * output, m_outputs) {
            result.append(output);
        }