void CoordinatedGraphicsScene::setActive(bool active)
{
    if (!m_client)
        return;

    if (m_isActive == active)
        return;

    m_isActive = active;
    if (m_isActive)
        renderNextFrame();
}
Ejemplo n.º 2
0
BeatEffectAnimator::BeatEffectAnimator(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::BeatEffectAnimator)
{
    ui->setupUi(this);
    m_Controller = new libbeat::BeatController(0,4096,44100,192);
    m_timer = new QTimer(this);
    connect(m_timer, SIGNAL(timeout()), this, SLOT(renderNextFrame()));
    m_Color = QColor(255,0,0);
    connect(m_Controller,SIGNAL(beatDrum()),this,SLOT(beatDetected()));
    nextFrameWhite = false;
    m_currentColor = 0;
    m_Colors.append(Qt::red);
    m_Colors.append(Qt::blue);
    m_Colors.append(Qt::green);
}