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);
}
Exemple #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());
}
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()));
}
Exemple #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());
}
Exemple #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());
}
Exemple #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());
}
Exemple #7
0
void InputMap::slotConfigurationChanged()
{
    QLCInPlugin* plugin = qobject_cast<QLCInPlugin*> (QObject::sender());
    if (plugin != NULL)
        emit pluginConfigurationChanged(plugin->name());
}