Example #1
0
/*!
    Constructs an event provider for the 3D mice attached to this
    machine and associates it with \a parent.
*/
QMouse3DEventProvider::QMouse3DEventProvider(QObject *parent)
    : QObject(parent)
    , d_ptr(new QMouse3DEventProviderPrivate)
{
    Q_D(QMouse3DEventProvider);
    connect(d->devices, SIGNAL(availableChanged()),
            this, SIGNAL(availableChanged()));
}
Example #2
0
void IdleDetector::setAvailable( bool available )
{
    if ( m_available == available )
        return;
    m_available = available;
    emit availableChanged( m_available );
}
AudioPlaybackBlock::AudioPlaybackBlock(MainController* controller, QString uid)
    : BlockBase(controller, uid)
    , m_playNode(nullptr)
    , m_pauseNode(nullptr)
    , m_toggleNode(nullptr)
    , m_activeNode(nullptr)
    , m_endNode(nullptr)
    , m_positionNode(nullptr)
    , m_filePath("")
    , m_lastPlayNodeValue(0.0)
    , m_lastPauseNodeValue(0.0)
    , m_lastToggleNodeValue(0.0)
    , m_alwaysStartAtBegin(false)
    , m_loop(false)
    , m_toggleMode(true)
    , m_player(this)
{
    m_widthIsResizable = true;

    m_playNode = createInputNode("playNode");
    m_pauseNode = createInputNode("pauseNode");
    m_toggleNode = createInputNode("toggleNode");
    connect(m_playNode, SIGNAL(dataChanged()), this, SLOT(onPlayNodeValueChanged()));
    connect(m_pauseNode, SIGNAL(dataChanged()), this, SLOT(onPauseNodeValueChanged()));
    connect(m_toggleNode, SIGNAL(dataChanged()), this, SLOT(onToggleNodeValueChanged()));

    m_activeNode = createOutputNode("activeNode");
    m_endNode = createOutputNode("endNode");
    m_positionNode = createOutputNode("positionNode");

    // setup Timer to be able to send a short pulse when end of file is reached:
    m_endPulseTimer.setSingleShot(true);
    m_endPulseTimer.setInterval(100);
    connect(&m_endPulseTimer, SIGNAL(timeout()), this, SLOT(onEndPulseTimeout()));

    connect(&m_player, SIGNAL(endOfFile()), this, SLOT(onEndOfFile()));
    connect(&m_player, SIGNAL(isPlayingChanged()), this, SIGNAL(isPlayingChanged()));
    connect(&m_player, SIGNAL(isPlayingChanged()), this, SLOT(onIsPlayingChanged()));
    connect(&m_player, SIGNAL(positionChanged()), this, SIGNAL(playbackPositionChanged()));
    connect(&m_player, SIGNAL(positionChanged()), this, SLOT(onPlaybackPositionChanged()));
    connect(&m_player, SIGNAL(lengthChanged()), this, SIGNAL(lengthChanged()));

    connect(&m_waveform, SIGNAL(pointsChanged()), this, SIGNAL(waveformChanged()));
    connect(&m_waveform, SIGNAL(availableChanged()), this, SIGNAL(waveformChanged()));
}
Example #4
0
void QDeclarativeGalleryItem::_q_itemChanged()
{
    if (m_request.isValid()) {
        for (QHash<int, QString>::const_iterator it = m_propertyKeys.constBegin();
                it != m_propertyKeys.constEnd();
                ++it) {
            if (m_request.propertyKey(it.value()) < 0)
                m_metaData->clear(it.value());
        }

        m_propertyKeys.clear();

        const QStringList propertyNames = m_request.propertyNames();

        for (QStringList::const_iterator it = propertyNames.begin(); it != propertyNames.end(); ++it) {
            const int key = m_request.propertyKey(*it);

            if (key >= 0) {
                m_propertyKeys.insert(key, *it);

                QVariant value = m_request.metaData(key);
                m_metaData->insert(*it, value.isNull()
                                   ? QVariant(m_request.propertyType(key))
                                   : value);
            }
        }
    } else {
        typedef QHash<int, QString>::const_iterator iterator;
        for (iterator it = m_propertyKeys.constBegin(); it != m_propertyKeys.constEnd(); ++it)
            m_metaData->clear(it.value());

        m_propertyKeys.clear();
    }

    emit availableChanged();
}
Example #5
0
QDeclarativeDocumentGalleryItem::QDeclarativeDocumentGalleryItem(QObject *parent)
    : QDeclarativeGalleryItem(parent)
{
    connect(this, SIGNAL(availableChanged()), this, SIGNAL(itemTypeChanged()));
}
Example #6
0
void MockQOfono::setAvailable(bool available)
{
    m_available = available;
    Q_EMIT availableChanged();
}