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); initGeneralPage(); initMovementPage(); // Used for intensity 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))); createSpeedDials(); // Set focus to the editor m_nameEdit->setFocus(); }
EFXEditor::EFXEditor(QWidget* parent, EFX* efx) : QDialog(parent) { setupUi(this); Q_ASSERT(efx != NULL); m_original = efx; /* Create a copy of the original scene so that we can freely modify it. Keep also a pointer to the original so that we can move the contents from the copied chaser to the original when OK is clicked */ m_efx = new EFX(_app->doc()); m_efx->copyFrom(efx); Q_ASSERT(m_efx != NULL); initGeneralPage(); initMovementPage(); initInitializationPage(); }
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(); }