Exemplo n.º 1
0
void EFXEditor::slotTabChanged(int tab)
{
    efxUiState()->setCurrentTab(tab);

    //When preview animation is opened restart animation but avoid restart if test is running.
    if(tab == 1 && (m_testButton->isChecked () == false))
        m_previewArea->restart ();
}
Exemplo n.º 2
0
EFXEditor::EFXEditor(QWidget* parent, EFX* efx, Doc* doc)
    : QWidget(parent)
    , m_doc(doc)
    , m_efx(efx)
    , m_previewArea(NULL)
    , m_points(NULL)
    , m_speedDials(NULL)
{
    Q_ASSERT(doc != NULL);
    Q_ASSERT(efx != NULL);

    setupUi(this);

    connect(m_speedDial, SIGNAL(toggled(bool)),
            this, SLOT(slotSpeedDialToggle(bool)));

    initGeneralPage();
    initMovementPage();

    // Start new (==empty) scenes from the first tab and ones with something in them
    // on the first fixture page.
    if (m_tab->count() == 0)
        slotTabChanged(KTabGeneral);
    else
        m_tab->setCurrentIndex(efxUiState()->currentTab());

    /* Tab widget */
    connect(m_tab, SIGNAL(currentChanged(int)),
            this, SLOT(slotTabChanged(int)));

    // Used for UI parameter changes
    m_testTimer.setSingleShot(true);
    m_testTimer.setInterval(500);
    connect(&m_testTimer, SIGNAL(timeout()), this, SLOT(slotRestartTest()));
    connect(m_doc, SIGNAL(modeChanged(Doc::Mode)), this, SLOT(slotModeChanged(Doc::Mode)));

    updateSpeedDials();

    // Set focus to the editor
    m_nameEdit->setFocus();
}
Exemplo n.º 3
0
void EFXEditor::slotTabChanged(int tab)
{
    efxUiState()->setCurrentTab(tab);
}