void MainWindowVST::setFullViewStatus(bool fullViewActivated) { MainWindow::setFullViewStatus(fullViewActivated); MainControllerVST *controller = getMainController(); controller->storeWindowSettings(isMaximized(), fullViewActivated, QPointF()); controller->resizePluginEditor(width(), height()); }
void ModulatorSamplerSound::setPreloadPropertyInternal(Property p, int newValue) { auto firstSampler = ProcessorHelpers::getFirstProcessorWithType<ModulatorSampler>(getMainController()->getMainSynthChain()); auto f = [this, p, newValue](Processor*)->bool { setPropertyInternal(p, newValue); return true; }; firstSampler->killAllVoicesAndCall(f); }
INT32 sdbCatalogueCB::active () { INT32 rc = SDB_OK ; pmdEDUMgr *pEDUMgr = pmdGetKRCB()->getEDUMgr() ; EDUID eduID = PMD_INVALID_EDUID ; _catMainCtrl.getAttachEvent()->reset() ; rc = pEDUMgr->startEDU ( EDU_TYPE_CATMAINCONTROLLER, (_pmdObjBase*)getMainController(), &eduID ) ; PD_RC_CHECK( rc, PDERROR, "Failed to start cat main controller edu, " "rc: %d", rc ) ; pEDUMgr->regSystemEDU( EDU_TYPE_CATMAINCONTROLLER, eduID ) ; rc = _catMainCtrl.getAttachEvent()->wait( CAT_WAIT_EDU_ATTACH_TIMEOUT ) ; PD_RC_CHECK( rc, PDERROR, "Failed to wait cat main contoller edu " "attach, rc: %d", rc ) ; _catMainCtrl.getAttachEvent()->reset() ; rc = pEDUMgr->startEDU ( EDU_TYPE_CATCATALOGUEMANAGER, (_pmdObjBase*)getCatlogueMgr(), &eduID ) ; PD_RC_CHECK( rc, PDERROR, "Failed to start catlogue manager edu, " "rc: %d", rc ) ; pEDUMgr->regSystemEDU( EDU_TYPE_CATCATALOGUEMANAGER, eduID ) ; rc = _catMainCtrl.getAttachEvent()->wait( CAT_WAIT_EDU_ATTACH_TIMEOUT ) ; PD_RC_CHECK( rc, PDERROR, "Failed to wait catlogue manager edu " "attach, rc: %d", rc ) ; _catMainCtrl.getAttachEvent()->reset() ; rc = pEDUMgr->startEDU ( EDU_TYPE_CATNODEMANAGER, (_pmdObjBase*)getCatNodeMgr(), &eduID ) ; PD_RC_CHECK( rc, PDERROR, "Failed to start cat node manager edu, " "rc: %d", rc ) ; pEDUMgr->regSystemEDU( EDU_TYPE_CATNODEMANAGER, eduID ) ; rc = _catMainCtrl.getAttachEvent()->wait( CAT_WAIT_EDU_ATTACH_TIMEOUT ) ; PD_RC_CHECK( rc, PDERROR, "Failed to wait cat node manager edu " "attach, rc: %d", rc ) ; pEDUMgr->startEDU ( EDU_TYPE_CATNETWORK, (netRouteAgent*)netWork(), &eduID ) ; pEDUMgr->regSystemEDU ( EDU_TYPE_CATNETWORK, eduID ) ; rc = pEDUMgr->waitUntil( EDU_TYPE_CATNETWORK, PMD_EDU_RUNNING ) ; PD_RC_CHECK( rc, PDERROR, "Wait CATNET active failed, rc: %d", rc ) ; done: return rc ; error: goto done ; }
void MainWindowPlugin::decreaseWidth() { if (isMaximized() || isFullScreen()) return; if (!canDecreaseWindowWidth()) return; QSize stepSize = getZoomStepSize(); QSize minSize = PLUGIN_WINDOW_MIN_SIZE; const int newWidth = qMax(width() - stepSize.width(), minSize.width()); const int newHeight = height(); // keep same height; resize(newWidth, newHeight); getMainController()->resizePluginEditor(newWidth, newHeight); }
void MainWindowPlugin::increaseWidth() { if (isMaximized() || isFullScreen()) return; if (!canIncreaseWindowWidth()) return; QSize stepSize = getZoomStepSize(); QSize maxSize = getMaxWindowSize(); const int newWidth = qMin(width() + stepSize.width(), maxSize.width()); const int newHeight = height(); // changing just the width resize(newWidth, newHeight); getMainController()->resizePluginEditor(newWidth, newHeight); }