Logo Search packages:      
Sourcecode: packagesearch version File versions

void PackageSearchImpl::updateInformationPluginGui (  )  [protected]

Updates information interface.

Shows the information widget for all available information plugins in the correct order, removing outdated widgets.

Definition at line 357 of file packagesearchimpl.cpp.

References _DETAILS_INFORMATION_PRIORITY, _informationPlugins, and addInformationPluginToGui().

Referenced by addPlugin(), and removePlugin().

{
      QString tmpCurrentPackage = _currentPackage;
      _currentPackage =  "";
      // clear the information plugin GUI except the first page
      while ( _pInformationContainer->count() > 0)
      {
            _pInformationContainer->removePage(_pInformationContainer->page(0) );
      }
      // add a dummy tab, so that the widgets are not allways repainted
      bool detailPageAdded = false;
      for (InformationPluginContainer::iterator it = _informationPlugins.begin();
            it != _informationPlugins.end(); ++it)
      {
            if ( !detailPageAdded && 
                  ((*it)->informationPriority() >= _DETAILS_INFORMATION_PRIORITY) )
            {
                  _pInformationContainer->insertTab(_pDetailsView, tr("Details"));
                  detailPageAdded = true;
            }
            addInformationPluginToGui(*it);
      }
      if (!detailPageAdded)
            _pInformationContainer->insertTab(_pDetailsView, tr("Details"));
      _pInformationContainer->showPage(_pInformationContainer->page(0));
      setSelectedPackage(tmpCurrentPackage);
/*    {
            QWidget* pParent = dynamic_cast<QWidget*>(_pInformationContainer->parent());
            delete _pInformationContainer;
            _pInformationContainer = new QTabWidget(pParent, "InformationContainer");
            _pDetailsView = new QTextBrowser( _pInformationContainer, "_pDetailsView" );
            bool detailPageAdded = false;
            for (InformationPluginContainer::iterator it = _informationPlugins.begin();
                  it != _informationPlugins.end(); ++it)
            {
                  if ( !detailPageAdded && 
                        ((*it)->informationPriority() >= _DETAILS_INFORMATION_PRIORITY) )
                  {
                        _pInformationContainer->insertTab(_pDetailsView, tr("Details"));
                        detailPageAdded = true;
                  }
                  addInformationPluginToGui(*it);
            }
            _pInformationLayout->add(_pInformationContainer);
      }*/
}


Generated by  Doxygen 1.6.0   Back to index