| 1050 | } |
| 1051 | |
| 1052 | void |
| 1053 | AddKnobDialog::onPageCurrentIndexChanged(int index) |
| 1054 | { |
| 1055 | if (!_imp->parentGroup) { |
| 1056 | return; |
| 1057 | } |
| 1058 | _imp->parentGroup->clear(); |
| 1059 | _imp->parentGroup->addItem( QString::fromUtf8("-") ); |
| 1060 | |
| 1061 | std::string selectedPage = _imp->parentPage->itemText(index).toStdString(); |
| 1062 | KnobPagePtr parentPage; |
| 1063 | |
| 1064 | for (std::list<KnobPagePtr>::iterator it = _imp->userPages.begin(); it != _imp->userPages.end(); ++it) { |
| 1065 | if ( (*it)->getName() == selectedPage ) { |
| 1066 | parentPage = *it; |
| 1067 | break; |
| 1068 | } |
| 1069 | } |
| 1070 | |
| 1071 | |
| 1072 | for (std::list<KnobGroup*>::iterator it = _imp->userGroups.begin(); it != _imp->userGroups.end(); ++it) { |
| 1073 | KnobPagePtr page = (*it)->getTopLevelPage(); |
| 1074 | assert(page); |
| 1075 | |
| 1076 | ///add only grps whose parent page is the selected page |
| 1077 | if (page == parentPage) { |
| 1078 | _imp->parentGroup->addItem( QString::fromUtf8( (*it)->getName().c_str() ) ); |
| 1079 | } |
| 1080 | } |
| 1081 | } |
| 1082 | |
| 1083 | void |
| 1084 | AddKnobDialog::onTypeCurrentIndexChanged(int index) |
nothing calls this directly
no test coverage detected