示例#1
0
EdgeGroup::EdgeGroup(Scene * scene,
                     Node * fromNode, Node * toNode,
                     EdgeGroupPair * pair): QObject(nullptr),
    EdgeGroupInterface(), m_scene(scene), m_fromNode(fromNode),
    m_toNode(toNode), m_pair(pair), m_edges(QSet < PlugEdge * >()),
    m_straightEdge(nullptr), m_bentEdgesCount(0)
{
    // create an invisible StraightEdge
    m_straightEdge = new StraightEdge(m_scene, this, fromNode, toNode);
    m_straightEdge->setVisible(false);
    // let the StraightEdge request removal of this group
    connect(m_straightEdge, SIGNAL(removalRequested()), this,
            SLOT(removalRequested()));
}
示例#2
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)));
}