| 563 | } |
| 564 | |
| 565 | QList<QWidget*> CManager::GetSettingsWidgets(QWidget* parent) |
| 566 | { |
| 567 | QList<QWidget*> lstWidget; |
| 568 | |
| 569 | CFrmManagePlugins* pManagePlugins = new CFrmManagePlugins(parent); |
| 570 | if(pManagePlugins) { |
| 571 | int nRet = pManagePlugins->SetParameter(m_pParameterPlugin); |
| 572 | if(!nRet) |
| 573 | lstWidget.push_back(pManagePlugins); |
| 574 | } |
| 575 | |
| 576 | CParameterPluginUI* pClient = new CParameterPluginUI(parent); |
| 577 | if(pClient) { |
| 578 | int nRet = pClient->SetParameter(m_pParameterPlugin); |
| 579 | if(!nRet) |
| 580 | lstWidget.push_back(pClient); |
| 581 | } |
| 582 | |
| 583 | auto pDatabase = new CParameterDatabaseUI(parent); |
| 584 | if(pDatabase) { |
| 585 | if(GetGlobalParameters()) { |
| 586 | int nRet = pDatabase->SetParameter(GetGlobalParameters()); |
| 587 | if(!nRet) |
| 588 | lstWidget.push_back(pDatabase); |
| 589 | } |
| 590 | } |
| 591 | |
| 592 | #if defined(HAVE_QTERMWIDGET) |
| 593 | CParameterTerminalUI* pTermina = new CParameterTerminalUI(parent); |
| 594 | if(pTermina) { |
| 595 | pTermina->SetParameter(&m_pParameterPlugin->m_Terminal); |
| 596 | pTermina->setWindowTitle(tr("Terminal")); |
| 597 | lstWidget.push_back(pTermina); |
| 598 | } |
| 599 | #endif |
| 600 | CParameterRecordUI* pRecord = new CParameterRecordUI(parent); |
| 601 | if(pRecord) { |
| 602 | int nRet = pRecord->SetParameter(&m_pParameterPlugin->m_Record); |
| 603 | if(!nRet) |
| 604 | lstWidget.push_back(pRecord); |
| 605 | } |
| 606 | |
| 607 | CFrmMediaDevices* pMediaDevices = new CFrmMediaDevices(true, parent); |
| 608 | if(pMediaDevices) { |
| 609 | int nRet = pMediaDevices->SetParameter(&m_pParameterPlugin->m_MediaDevices.m_Para); |
| 610 | if(!nRet) |
| 611 | lstWidget.push_back(pMediaDevices); |
| 612 | } |
| 613 | |
| 614 | //! [Get the widget to set global parameters for the plugin] |
| 615 | foreach(auto plugin, m_Plugins) { |
| 616 | if(!plugin) continue; |
| 617 | QWidget* pSettings = nullptr; |
| 618 | bool bRet = QMetaObject::invokeMethod( |
| 619 | plugin, |
| 620 | "GetSettingsWidget", |
| 621 | Qt::DirectConnection, |
| 622 | Q_RETURN_ARG(QWidget*, pSettings), |
no test coverage detected