示例#1
0
void IOPluginCache::slotConfigurationChanged()
{
    qDebug() << Q_FUNC_INFO;

    QLCIOPlugin* plugin = static_cast<QLCIOPlugin*> (QObject::sender());
    if (plugin != NULL) // 3rd party plugins might not behave correctly
        emit pluginConfigurationChanged(plugin);
}
示例#2
0
/*****************************************************************************
 * Input data
 *****************************************************************************/
void InputMap::slotPluginConfigurationChanged(QLCIOPlugin* plugin)
{
    for (quint32 i = 0; i < universes(); i++)
    {
        InputPatch* ip = patch(i);
        Q_ASSERT(ip != NULL);
        if (ip->plugin() == plugin)
            ip->reconnect();
    }

    emit pluginConfigurationChanged(plugin->name());
}
示例#3
0
void InputMap_Test::slotConfigurationChanged()
{
    InputMap im(m_doc, 4);

    OutputPluginStub* stub = static_cast<OutputPluginStub*>
                                (m_doc->ioPluginCache()->plugins().at(0));
    QVERIFY(stub != NULL);

    QSignalSpy spy(&im, SIGNAL(pluginConfigurationChanged(QString)));
    stub->configure();
    QCOMPARE(spy.size(), 1);
    QCOMPARE(spy.at(0).size(), 1);
    QCOMPARE(spy.at(0).at(0).toString(), QString(stub->name()));
}
示例#4
0
void OutputMap::slotPluginConfigurationChanged(QLCIOPlugin* plugin)
{
    for (quint32 i = 0; i < universes(); i++)
    {
        OutputPatch* op = patch(i);
        Q_ASSERT(op != NULL);
        if (op->plugin() == plugin)
        {
            m_universeMutex.lock();
            op->reconnect();
            m_universeMutex.unlock();
        }
    }

    emit pluginConfigurationChanged(plugin->name());
}
示例#5
0
void InputMap::slotConfigurationChanged()
{
    QLCInPlugin* plugin = qobject_cast<QLCInPlugin*> (QObject::sender());
    if (plugin == NULL) // The signal comes from a plugin that isn't guaranteed to behave
        return;

    for (quint32 i = 0; i < universes(); i++)
    {
        InputPatch* ip = patch(i);
        Q_ASSERT(ip != NULL);
        if (ip->plugin() == plugin)
            ip->reconnect();
    }

    emit pluginConfigurationChanged(plugin->name());
}
示例#6
0
void OutputMap::slotConfigurationChanged()
{
    QLCOutPlugin* plugin = qobject_cast<QLCOutPlugin*> (QObject::sender());
    if (plugin == NULL) // The signal comes from a plugin that isn't guaranteed to behave
        return;

    for (quint32 i = 0; i < universes(); i++)
    {
        OutputPatch* op = patch(i);
        Q_ASSERT(op != NULL);
        if (op->plugin() == plugin)
        {
            m_universeMutex.lock();
            op->reconnect();
            m_universeMutex.unlock();
        }
    }

    emit pluginConfigurationChanged(plugin->name());
}
示例#7
0
文件: inputmap.cpp 项目: speakman/qlc
void InputMap::slotConfigurationChanged()
{
    QLCInPlugin* plugin = qobject_cast<QLCInPlugin*> (QObject::sender());
    if (plugin != NULL)
        emit pluginConfigurationChanged(plugin->name());
}