FxParamEditorPopup::FxParamEditorPopup() : QDialog(TApp::instance()->getMainWindow()) { setWindowTitle(tr("Fx Settings")); setMinimumSize(20, 20); TApp *app = TApp::instance(); TSceneHandle *hScene = app->getCurrentScene(); TPixel32 col1, col2; Preferences::instance()->getChessboardColors(col1, col2); FxSettings *fxSettings = new FxSettings(this, col1, col2); fxSettings->setSceneHandle(hScene); fxSettings->setFxHandle(app->getCurrentFx()); fxSettings->setFrameHandle(app->getCurrentFrame()); fxSettings->setXsheetHandle(app->getCurrentXsheet()); fxSettings->setLevelHandle(app->getCurrentLevel()); fxSettings->setObjectHandle(app->getCurrentObject()); fxSettings->setCurrentFx(); QVBoxLayout *mainLayout = new QVBoxLayout(); mainLayout->setMargin(0); mainLayout->setSpacing(10); { mainLayout->addWidget(fxSettings); } setLayout(mainLayout); move(parentWidget()->geometry().center() - rect().bottomRight() / 2.0); }
void FunctionViewerPanel::attachHandles() { TApp *app = TApp::instance(); m_functionViewer->setXsheetHandle(app->getCurrentXsheet()); m_functionViewer->setFrameHandle(app->getCurrentFrame()); m_functionViewer->setObjectHandle(app->getCurrentObject()); m_functionViewer->setFxHandle(app->getCurrentFx()); m_functionViewer->setColumnHandle(app->getCurrentColumn()); m_functionViewer->setSceneHandle(app->getCurrentScene()); }
void InsertFxPopup::onReplace() { TFx *fx = createFx(); if (fx) { TApp *app = TApp::instance(); TXsheetHandle *xshHandle = app->getCurrentXsheet(); QList<TFxP> fxs; FxSelection *selection = dynamic_cast<FxSelection *>(app->getCurrentSelection()->getSelection()); if (selection) fxs = selection->getFxs(); TFxCommand::replaceFx(fx, fxs, app->getCurrentXsheet(), app->getCurrentFx()); xshHandle->notifyXsheetChanged(); } }