Skip to content
Snippets Groups Projects
Commit 148be588 authored by stefan's avatar stefan
Browse files

Added Chains to SceneWin

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1800 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 18748f67
No related branches found
No related tags found
No related merge requests found
...@@ -21,9 +21,12 @@ ...@@ -21,9 +21,12 @@
#include <QFont> #include <QFont>
#include <QString> #include <QString>
#include <ost/mol/query.hh>
#include <ost/mol/query_view_wrapper.hh>
#include <ost/mol/view_type_fw.hh>
#include <ost/gui/gosty_app.hh> #include <ost/gui/gosty_app.hh>
#include <ost/gui/scene_win/scene_win.hh> #include <ost/gui/scene_win/scene_win.hh>
#include <ost/mol/query_view_wrapper.hh>
#include "current_selection_node.hh" #include "current_selection_node.hh"
#include "entity_part_node.hh" #include "entity_part_node.hh"
...@@ -43,6 +46,17 @@ EntityNode::EntityNode(gfx::EntityP& entity, SceneNode* parent): ...@@ -43,6 +46,17 @@ EntityNode::EntityNode(gfx::EntityP& entity, SceneNode* parent):
new RenderModesNode(entity, this); new RenderModesNode(entity, this);
SceneNode* chain_node = new LabelNode("Chains",this);
model->AddNode(this, chain_node);
mol::EntityView view = entity->GetView();
mol::ChainViewList chains = view.GetChainList();
for(unsigned int i = 0; i<chains.size();i++){
QString name = chains[i].GetName().c_str();
name = (name.size() == 0 || name == " ")? "No name" : name;
mol::Query query("cname='"+chains[i].GetName()+"'");
model->AddNode(chain_node,new EntityPartNode(name,entity, mol::QueryViewWrapper(query,view),chain_node));
}
SceneNode* quick_selection = new LabelNode("Quick Selection",this); SceneNode* quick_selection = new LabelNode("Quick Selection",this);
model->AddNode(this, quick_selection); model->AddNode(this, quick_selection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment