Logo Search packages:      
Sourcecode: packagesearch version File versions

void PackageSearchImpl::addSearchPluginToGui ( NPlugin::SearchPlugin *  pPlugin  )  [protected]

Adds the widgets of the search plugin to the GUI.

Precondition:
pPlugin != 0

Definition at line 334 of file packagesearchimpl.cpp.

Referenced by updateSearchPluginGui().

{
      assert(pPlugin);
      // add the input widget
      if (pPlugin->inputWidget() != 0)
      {
            _pInputWidgetsContainer->addTab(pPlugin->inputWidget(), pPlugin->inputWidgetTitle());
      }
      // add the short input widget
      if (pPlugin->shortInputAndFeedbackWidget()!=0)
      {
            QWidget* pWidget = pPlugin->shortInputAndFeedbackWidget();
            // store if the widget was shown to as reparenting destroys this state
            bool shown = pWidget->isShown();
            // reparenting was the only way which seemed to work to get the widgets where I wanted them :-(
            pWidget->reparent(
                  _pShortSearchFrame, 0, QPoint()
            );
            _pShortSearchFrame->layout()->add(pWidget);
            pWidget->setShown(shown);
      }
}


Generated by  Doxygen 1.6.0   Back to index