Beispiel #1
0
  //Visualizing ProteinHit object
  void MetaDataBrowser::visualize_(ProteinHit & meta, QTreeWidgetItem * parent)
  {
    ProteinHitVisualizer * visualizer = new ProteinHitVisualizer(isEditable(), this);
    visualizer->load(meta);

    String name = String("Prot ") + meta.getAccession() + " (" + meta.getScore() + ')';
    QString qs_name(name.c_str());

    QStringList labels;
    labels << qs_name << QString::number(ws_->addWidget(visualizer)) << QString::number(meta.getScore());

    QTreeWidgetItem * item;
    if (parent == nullptr)
    {
      item = new QTreeWidgetItem(treeview_, labels);
    }
    else
    {
      item = new QTreeWidgetItem(parent, labels);
    }

    visualize_(dynamic_cast<MetaInfoInterface &>(meta), item);

    connectVisualizer_(visualizer);
  }
Beispiel #2
0
 String describeHit_(const ProteinHit& hit)
 {
   return "protein hit with accession '" + hit.getAccession() + "', score " +
     String(hit.getScore());
 }