NCBI C++ ToolKit
|
Search Toolkit Book for CPhyloTreeDataSource
#include <gui/widgets/phylo_tree/phylo_tree_ds.hpp>
Classes | |
class | visitor_read_properties |
Public Types | |
typedef CAppJobDispatcher::TJobID | TJobID |
typedef CPhyloTree | TTreeType |
typedef CPhyloTree::TTreeIdx | TTreeIdx |
typedef CPhyloTree::TNodeType | TNodeType |
typedef CPhyloTree::TClusterID | TClusterID |
typedef std::map< int, size_t > | TClusterToColorMap |
Public Types inherited from CObject | |
enum | EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern } |
Control filling of newly allocated memory. More... | |
typedef CObjectCounterLocker | TLockerType |
Default locker type for CRef. More... | |
typedef atomic< Uint8 > | TCounter |
Counter type is CAtomiCounter. More... | |
typedef Uint8 | TCount |
Alias for value type of counter. More... | |
Public Types inherited from IQueryDataSource | |
typedef vector< pair< string, string > > | TNamedQueries |
Public Member Functions | |
CPhyloTreeDataSource (const objects::CBioTreeContainer &tree, objects::CScope &scope, bool expand_all=false) | |
Throws exception if tree is empty - at least 1 node is required. More... | |
~CPhyloTreeDataSource () | |
void | Init (const objects::CBioTreeContainer &tree, objects::CScope &scope, bool expand_all=false) |
Throws exception if tree is empty - at least 1 node is required. More... | |
void | Clear () |
void | SetColorIndices (CPhyloTreeScheme *scheme) |
string | GenerateTooltipFormat () |
void | ComputeLengthsFromRoot () |
Create sorted array of distances of nodes from the parent (the m_LenDistribution array) More... | |
float | GetClosestLen (float pct) const |
Look in vector of sorted distances of nodes from the root and given a pct (0..1), return the distance closest to that value. More... | |
bool | HasLenDistribution () const |
Return true if data is available (for trees without distances, may not be) More... | |
void | MeasureTree (TTreeIdx node) |
void | MeasureTree () |
void | ApplyAttributes (CBioTreeAttrReader::TAttrTable &attrs, CPhyloTreeScheme *scheme, const string &labelfmt="") |
bool | HasClusters () |
void | Clusterize (CPhyloTreeScheme *scheme) |
void | ReRoot (TTreeIdx root_idx) |
Set the root node of the tree to the node at root_idx. More... | |
void | ReRootEdge (TTreeIdx edge_child_node) |
Re-root on the edge between the selected node and its parent. More... | |
void | ReRootMidpoint () |
Re-root tree using midpoint-method. More... | |
set< CPhyloNodeData::TID > | CollapseByDistance (int leaf_count_target, SCollapsable *collapse_func) |
Collapse, based on distance, enough nodes in the tree to get the total number of leaves down to the requested number. More... | |
void | Relabel (CPhyloTreeScheme *scheme, string labelFmt) |
void | Sort (bool ascending) |
void | SortDist (bool ascending) |
void | SortLabel (bool ascending) |
void | SortLabelRange (bool ascending) |
TModelRect | GetBoundRect () |
void | Clean () |
void | Filter () |
void | FilterDistances (double x_dist) |
CPhyloTree * | GetTree () |
const CPhyloTree * | GetTree () const |
void | SetTreeLabel (const CTreeLabel &l) |
Label for tree (optional element of biotreecontainer) More... | |
CTreeLabel | GetTreeLabel () const |
CTreeGraphicsModel & | GetModel () |
Get model for rendering. More... | |
const CBioTreeFeatureDictionary & | GetDictionary () const |
unsigned int | GetNumNodes (void) |
unsigned int | GetVisibleNodes (void) |
unsigned int | GetNumEdges (void) |
int | GetWidth (void) |
int | GetSize (void) |
int | GetMaxLabelLen (void) |
double | GetNormDistance (void) |
double | GetMinDistance (void) |
TClusterID | GetMaxClusterID () |
vector< TTreeIdx > | FindNodes (const string &query, size_t &num_queried, CStringMatching::EStringMatching string_matching, NStr::ECase use_case) const |
search for nodes via the specified text matching algorithm More... | |
const vector< CPhyloTree::TID > & | GetStringQueryIDs () const |
Get IDs selected by most recent call to FindNodes. More... | |
TTreeIdx | IterateOverSelNodes (int direction, bool highlight) |
TTreeIdx | GetCurrentSearchNode () const |
void | SetCurrentSearchNode (TTreeIdx node_idx) |
CPhyloSelectionSetMgr & | GetSelectionSets () |
void | UpdateSelectionSets (CPhyloTreeScheme *scheme) |
const TClusterToColorMap & | GetClusterToColorMap () const |
Get map that translates cluster-ids to color indices. More... | |
void | Cut () |
void | Paste () |
TTreeIdx | NewNode (bool after=true) |
void | Remove (bool subtree=true) |
void | RemoveSelected () |
void | MoveNode (bool up) |
bool | ClipboardEmpty () const |
void | SetCollapsedLabel (CPhyloTree::TTreeIdx idx) |
Collapse single node, do any relabeling if needed. More... | |
void | SetCollapsedLabels (const vector< CPhyloNodeData::TID > &node_ids) |
Collapse all nodes in node_ids, doing relabeling if needed. More... | |
void | CollapseSelected () |
IQueryDataSource interface implementation | |
virtual string | GetColumnLabel (size_t col) const |
get number and names of columns in data source More... | |
virtual size_t | GetColsCount () const |
virtual CMacroQueryExec * | GetQueryExec (bool casesensitive, CStringMatching::EStringMatching matching) |
Create an appropriate instance of a subclass of CQueryExec for that will be used to execute a query on the data source. More... | |
virtual void | SetQueryResults (CMacroQueryExec *q) |
Set selection results to be whatever elements are selected in 'q'. More... | |
virtual void | ClearQueryResults () |
Clear any current results from previous queries. More... | |
virtual CRef< objects::CScope > | GetScope () |
Return a scope for the data source, if available. More... | |
virtual void | ExecuteStringQuery (const string &query, size_t &num_selected, size_t &num_queried, CStringMatching::EStringMatching string_matching=CStringMatching::ePlainSearch, NStr::ECase use_case=NStr::eCase) |
Execute a string-matching query on the underlying data. More... | |
Public Member Functions inherited from CObject | |
CObject (void) | |
Constructor. More... | |
CObject (const CObject &src) | |
Copy constructor. More... | |
virtual | ~CObject (void) |
Destructor. More... | |
CObject & | operator= (const CObject &src) THROWS_NONE |
Assignment operator. More... | |
bool | CanBeDeleted (void) const THROWS_NONE |
Check if object can be deleted. More... | |
bool | IsAllocatedInPool (void) const THROWS_NONE |
Check if object is allocated in memory pool (not system heap) More... | |
bool | Referenced (void) const THROWS_NONE |
Check if object is referenced. More... | |
bool | ReferencedOnlyOnce (void) const THROWS_NONE |
Check if object is referenced only once. More... | |
void | AddReference (void) const |
Add reference to object. More... | |
void | RemoveReference (void) const |
Remove reference to object. More... | |
void | ReleaseReference (void) const |
Remove reference without deleting object. More... | |
virtual void | DoNotDeleteThisObject (void) |
Mark this object as not allocated in heap – do not delete this object. More... | |
virtual void | DoDeleteThisObject (void) |
Mark this object as allocated in heap – object can be deleted. More... | |
void * | operator new (size_t size) |
Define new operator for memory allocation. More... | |
void * | operator new[] (size_t size) |
Define new[] operator for 'array' memory allocation. More... | |
void | operator delete (void *ptr) |
Define delete operator for memory deallocation. More... | |
void | operator delete[] (void *ptr) |
Define delete[] operator for memory deallocation. More... | |
void * | operator new (size_t size, void *place) |
Define new operator. More... | |
void | operator delete (void *ptr, void *place) |
Define delete operator. More... | |
void * | operator new (size_t size, CObjectMemoryPool *place) |
Define new operator using memory pool. More... | |
void | operator delete (void *ptr, CObjectMemoryPool *place) |
Define delete operator. More... | |
virtual void | DebugDump (CDebugDumpContext ddc, unsigned int depth) const |
Define method for dumping debug information. More... | |
Public Member Functions inherited from CDebugDumpable | |
CDebugDumpable (void) | |
virtual | ~CDebugDumpable (void) |
void | DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const |
void | DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const |
void | DumpToConsole (void) const |
Public Member Functions inherited from IQueryDataSource | |
virtual | ~IQueryDataSource () |
dtor More... | |
Protected Attributes | |
CRef< CPhyloTree > | m_TreeModel |
CTreeLabel | m_TreeLabel |
CPhyloTreeCalculator * | m_Calc |
CRef< objects::CScope > | m_Scope |
TTreeIdx | m_SearchCurrentNode |
TClusterToColorMap | m_ClusterToColorMap |
std::vector< float > | m_LenDistribution |
vector< CPhyloTree::TID > | m_StringQueryIDs |
Temporary storage for string query results to get ID's back to caller. More... | |
Static Protected Attributes | |
static CPhyloTree | m_sTreeClipboard |
static (to allow copying between trees) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from CObject | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (void) |
Define method to throw null pointer exception. More... | |
static NCBI_XNCBI_EXPORT void | ThrowNullPointerException (const type_info &type) |
static EAllocFillMode | GetAllocFillMode (void) |
static void | SetAllocFillMode (EAllocFillMode mode) |
static void | SetAllocFillMode (const string &value) |
Set mode from configuration parameter value. More... | |
Static Public Member Functions inherited from CDebugDumpable | |
static void | EnableDebugDump (bool on) |
Static Public Attributes inherited from CObject | |
static const TCount | eCounterBitsCanBeDeleted = 1 << 0 |
Define possible object states. More... | |
static const TCount | eCounterBitsInPlainHeap = 1 << 1 |
Heap signature was found. More... | |
static const TCount | eCounterBitsPlaceMask |
Mask for 'in heap' state flags. More... | |
static const int | eCounterStep = 1 << 2 |
Skip over the "in heap" bits. More... | |
static const TCount | eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2) |
Minimal value for valid objects (reference counter is zero) Must be a single bit value. More... | |
static const TCount | eCounterStateMask |
Valid object, and object in heap. More... | |
Protected Member Functions inherited from CObject | |
virtual void | DeleteThis (void) |
Virtual method "deleting" this object. More... | |
Definition at line 231 of file phylo_tree_ds.hpp.
Definition at line 240 of file phylo_tree_ds.hpp.
typedef std::map<int, size_t> CPhyloTreeDataSource::TClusterToColorMap |
Definition at line 241 of file phylo_tree_ds.hpp.
Definition at line 236 of file phylo_tree_ds.hpp.
Definition at line 239 of file phylo_tree_ds.hpp.
Definition at line 238 of file phylo_tree_ds.hpp.
Definition at line 237 of file phylo_tree_ds.hpp.
CPhyloTreeDataSource::CPhyloTreeDataSource | ( | const objects::CBioTreeContainer & | tree, |
objects::CScope & | scope, | ||
bool | expand_all = false |
||
) |
Throws exception if tree is empty - at least 1 node is required.
Definition at line 165 of file phylo_tree_ds.cpp.
References Init().
CPhyloTreeDataSource::~CPhyloTreeDataSource | ( | ) |
Definition at line 173 of file phylo_tree_ds.cpp.
void CPhyloTreeDataSource::ApplyAttributes | ( | CBioTreeAttrReader::TAttrTable & | attrs, |
CPhyloTreeScheme * | scheme, | ||
const string & | labelfmt = "" |
||
) |
Definition at line 302 of file phylo_tree_ds.cpp.
References CPhyloTreeCalculator::ClearAttrTable(), CRgbaGradColorTable::ClearColors(), Clusterize(), CPhyloTree::GetColorTable(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetRootIdx(), CPhyloTreeCalculator::Init(), m_Calc, m_TreeModel, CPhyloTreeCalculator::SetAttrTable(), CPhyloTreeCalculator::SetLabelFormat(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnLoadAttributes().
void CPhyloTreeDataSource::Clean | ( | ) |
Definition at line 811 of file phylo_tree_ds.cpp.
References CSpatialHash2D< T >::Clear(), CTreeGraphicsModel::GetCollisionData(), GetModel(), GetTree(), Init(), m_Scope, TreeConvert2Container(), and TreeConvertNonSingleChild2Container().
Referenced by CPhyloTreeWidget::OnClean().
void CPhyloTreeDataSource::Clear | ( | void | ) |
Definition at line 214 of file phylo_tree_ds.cpp.
References CPhyloTree::Clear(), m_SearchCurrentNode, m_TreeModel, and CTreeModel< CPhyloTreeNode >::Null().
Referenced by CPhyTreeView::OnBioTreeChanged(), and CPhyloTreeWidget::RemoveCurrentDataSource().
|
virtual |
Clear any current results from previous queries.
Implements IQueryDataSource.
Definition at line 946 of file phylo_tree_ds.cpp.
References m_SearchCurrentNode, and CTreeModel< CPhyloTreeNode >::Null().
Referenced by CPhyloTreeWidget::OnUpdateSelChanged(), and SetQueryResults().
|
inline |
Definition at line 377 of file phylo_tree_ds.hpp.
References CTreeModel< TNode >::GetRootIdx(), m_sTreeClipboard, and CTreeModelNode< CPhyloNodeData >::Null().
Referenced by CPhyloTreeWidget::OnUpdateEdit().
void CPhyloTreeDataSource::Clusterize | ( | CPhyloTreeScheme * | scheme | ) |
Definition at line 332 of file phylo_tree_ds.cpp.
References CRgbaGradColorTable::AddColor(), color, CRgbaColor::ColorDistance(), CRgbaColor::Darken(), CPhyloTreeScheme::eClusters, map_checker< Container >::end(), map_checker< Container >::find(), CRgbaGradColorTable::FindClosestColor(), CRgbaGradColorTable::FindColor(), CPhyloTreeCalculator::GetClusters(), CPhyloSelectionSetMgr::GetClusterToSelectionMap(), CRgbaGradColorTable::GetColor(), CPhyloTreeScheme::GetColoration(), CPhyloTree::GetColorTable(), CTreeModel< TNode >::GetParent(), CPhyloTree::GetSelectionSets(), CPhyloSelectionSetMgr::GetSets(), CPhyloTreeCalculator::GetWidth(), CTreeModelNode< TData >::IsLeaf(), ITERATE, m_Calc, m_ClusterToColorMap, m_TreeModel, CRgbaColor::RotateColor(), SetColorIndices(), and map_checker< Container >::size().
Referenced by ApplyAttributes(), CPhyloTreeWidget::RedrawDataSource(), Relabel(), and UpdateSelectionSets().
set< CPhyloNodeData::TID > CPhyloTreeDataSource::CollapseByDistance | ( | int | leaf_count_target, |
SCollapsable * | collapse_func | ||
) |
Collapse, based on distance, enough nodes in the tree to get the total number of leaves down to the requested number.
(or just over if exact match is not possible)
(or just over if exact match is not possible). We do not expand nodes that may already be collapsed.
Definition at line 656 of file phylo_tree_ds.cpp.
References CPhyloNodeData::eHideChildren, set< Key, Compare >::end(), set< Key, Compare >::erase(), set< Key, Compare >::find(), CPhyloTreeMaxDirectChildDist::GetDistances(), CPhyloTree::GetFeatureDict(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetNode(), CTreeModel< TNode >::GetRoot(), CTreeModel< TNode >::GetRootIdx(), CBioTreeFeatureDictionary::HasFeature(), i, set< Key, Compare >::insert(), CPhyloTreeNode::IsLeafEx(), m_TreeModel, n, ncbi::grid::netcache::search::fields::size, ct::sort(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnCollapseToViewport().
void CPhyloTreeDataSource::CollapseSelected | ( | ) |
Definition at line 1549 of file phylo_tree_ds.cpp.
References _TRACE, CPhyloTreeNode::CanExpandCollapse(), CPhyloNodeData::eHideChildren, CPhyloTreeNode::ExpandCollapse(), CPhyloTree::GetExplicitlySelected(), CPhyloTree::GetFeatureDict(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), CTreeModel< TNode >::GetRootIdx(), i, m_TreeModel, MeasureTree(), and SetCollapsedLabel().
Referenced by CPhyloTreeWidget::OnCollapseSelected().
void CPhyloTreeDataSource::ComputeLengthsFromRoot | ( | ) |
Create sorted array of distances of nodes from the parent (the m_LenDistribution array)
Definition at line 247 of file phylo_tree_ds.cpp.
References CPhyloTreeMaxChildDist::GetDistances(), CPhyloTree::GetFeatureDict(), CPhyloTreeMaxChildDist::GetMaxDist(), CPhyloTreeMaxChildDist::GetMinDist(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetNode(), CTreeModel< TNode >::GetRootIdx(), CBioTreeFeatureDictionary::HasFeature(), i, m_LenDistribution, m_TreeModel, ct::sort(), and TreeDepthFirst().
Referenced by IPhyloTreeRender::x_ComputeEdgeHighlight().
void CPhyloTreeDataSource::Cut | ( | ) |
Definition at line 1310 of file phylo_tree_ds.cpp.
References _TRACE, CPhyloTree::Clear(), CPhyloTree::ClearSelection(), CPhyloTree::GetCurrentNode(), CPhyloTree::GetCurrentNodeIdx(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetRootIdx(), m_sTreeClipboard, m_TreeModel, MeasureTree(), n, CTreeModel< CPhyloTreeNode >::Null(), CTreeModel< TNode >::RemoveChild(), CPhyloTree::SetSelection(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by CPhyloTreeWidget::OnEdit().
|
virtual |
Execute a string-matching query on the underlying data.
[in] | query | Reference to a pattern to search for. |
[out] | num_selected | Number of matching rows. |
[out] | num_queried | Total rows queried. |
[in] | string_matching | String matching algorithm to use. |
[in] | use_case | Whether to do a case sensitive compare (default), or not. |
Implements IQueryDataSource.
Definition at line 951 of file phylo_tree_ds.cpp.
References CPhyloTree::ClearSelection(), FindNodes(), CPhyloNodeData::GetId(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetValue(), Info(), LOG_POST, m_SearchCurrentNode, m_StringQueryIDs, m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), query, and CPhyloTree::SetSelection().
void CPhyloTreeDataSource::Filter | ( | ) |
Definition at line 832 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetRootIdx(), m_TreeModel, MeasureTree(), and TreeDepthFirstInvarient().
Referenced by CPhyloTreeWidget::OnFilter().
void CPhyloTreeDataSource::FilterDistances | ( | double | x_dist | ) |
Definition at line 842 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetRootIdx(), m_TreeModel, MeasureTree(), and TreeDepthFirstInvarient().
vector< CPhyloTree::TTreeIdx > CPhyloTreeDataSource::FindNodes | ( | const string & | query, |
size_t & | num_queried, | ||
CStringMatching::EStringMatching | string_matching, | ||
NStr::ECase | use_case | ||
) | const |
search for nodes via the specified text matching algorithm
Definition at line 1022 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), m_TreeModel, query, and TreeDepthFirst().
Referenced by ExecuteStringQuery().
string CPhyloTreeDataSource::GenerateTooltipFormat | ( | ) |
Definition at line 282 of file phylo_tree_ds.cpp.
References CPhyloTree::GetFeatureDict(), CBioTreeFeatureDictionary::GetFeatureDict(), CRef< C, Locker >::IsNull(), ITERATE, and m_TreeModel.
Referenced by CPhyTreeView::OnBioTreeChanged(), CPhyloTreeWidget::OnEditNode(), CPhyloTreeWidget::OnInfoTip(), CPhyloTreeWidget::OnOpenPropertiesDlg(), and CPhyTreeView::OnProjectChanged().
TModelRect CPhyloTreeDataSource::GetBoundRect | ( | void | ) |
Definition at line 802 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), CPhyloTreeRectCalculator::GetRect(), CTreeModel< TNode >::GetRootIdx(), CPhyloTreeRectCalculator::Init(), m_TreeModel, and TreeDepthFirst().
Referenced by CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), and CPhyloSlantedCladogram::x_Layout().
float CPhyloTreeDataSource::GetClosestLen | ( | float | pct | ) | const |
Look in vector of sorted distances of nodes from the root and given a pct (0..1), return the distance closest to that value.
Definition at line 229 of file phylo_tree_ds.cpp.
References m_LenDistribution, and min().
Referenced by IPhyloTreeRender::GetEdgeColor().
|
inline |
Get map that translates cluster-ids to color indices.
Definition at line 368 of file phylo_tree_ds.hpp.
References m_ClusterToColorMap.
Referenced by CPhyloSaveSelectiondlg::SetSelections().
|
virtual |
Implements IQueryDataSource.
Definition at line 869 of file phylo_tree_ds.cpp.
References CPhyloTree::GetFeatureDict(), CBioTreeFeatureDictionary::GetFeatureDict(), m_TreeModel, and map_checker< Container >::size().
|
virtual |
get number and names of columns in data source
Implements IQueryDataSource.
Definition at line 853 of file phylo_tree_ds.cpp.
References map_checker< Container >::begin(), count, map_checker< Container >::end(), CPhyloTree::GetFeatureDict(), CBioTreeFeatureDictionary::GetFeatureDict(), and m_TreeModel.
|
inline |
Definition at line 360 of file phylo_tree_ds.hpp.
References m_SearchCurrentNode.
Referenced by CPhyloTreeWidget::OnUpdateSelChanged().
|
inline |
Definition at line 321 of file phylo_tree_ds.hpp.
References CPhyloTree::GetFeatureDict(), and m_TreeModel.
Referenced by CPhyloTreeWidget::EditLabel(), GetQueryExec(), CPhyTreeView::GetSelection(), CPhyloTreeWidget::OnEditNode(), CPhyloTreeWidget::OnExportSelection(), CPhyloTreeWidget::OnInfoTip(), CPhyloTreeWidget::QueryEnd(), CPhyloTreeWidget::SendEditEvent(), CwxPhyloSettingsDlg::SetParams(), and CPhyTreeView::x_OnSetSelection().
|
inline |
Definition at line 332 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetMaxClusterID(), and m_Calc.
Referenced by CChangePhyloSelectionSetCmd::PerformEdit(), and UpdateSelectionSets().
|
inline |
Definition at line 329 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetMaxLabelLen(), and m_Calc.
|
inline |
Definition at line 331 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetMinDistance(), and m_Calc.
|
inline |
Get model for rendering.
Definition at line 318 of file phylo_tree_ds.hpp.
References CPhyloTree::GetGraphicsModel(), and m_TreeModel.
Referenced by IPhyloTreeRender::BufferedRender(), Clean(), IPhyloTreeRender::GetEdgeColor(), IPhyloTreeRender::InitCollisionInfo(), CPhyloTreeWidget::IterateSelection(), CChangePhyloPropertyCmd::PerformEdit(), IPhyloTreeRender::Render(), IPhyloTreeRender::RenderPdf(), CPhyloTreeWidget::SetScheme(), CPhyloSaveSelectiondlg::SetSelections(), IPhyloTreeRender::x_AddCollapsedGeomNode(), IPhyloTreeRender::x_AddCollapsedTextureNode(), IPhyloTreeRender::x_ComputeEdgeHighlight(), CPhyloCircularCladogram::x_DrawTree(), CPhyloForce::x_Layout(), CPhyloTreePane::x_Render(), IPhyloTreeRender::x_RenderNodeVbo(), CPhyloCircularCladogram::x_RenderVbo(), CPhyloRadial::x_RenderVbo(), CPhyloRectCladogram::x_RenderVbo(), CPhyloSlantedCladogram::x_RenderVbo(), CPhyloRectCladogram::x_RenderVboPseudoSplines(), CPhyloRectCladogram::x_RenderVboSplines(), CPhyloRectCladogram::x_SetElementVisibility(), IPhyloTreeRender::x_SetElementVisibility(), CPhyloCircularCladogram::x_SetGlRenderOptions(), CPhyloRadial::x_SetGlRenderOptions(), CPhyloRectCladogram::x_SetGlRenderOptions(), and CPhyloSlantedCladogram::x_SetGlRenderOptions().
|
inline |
Definition at line 330 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetMaxDistance(), and m_Calc.
Referenced by CCalcCircularTree::CCalcCircularTree(), CCalcRadialTree::CCalcRadialTree(), CCalcRectangularTree::CCalcRectangularTree(), CDrawCircularTreeVbo::CDrawCircularTreeVbo(), CPhyloCircularCladogram::ComputeDistFromPixels(), IPhyloTreeRender::ComputeDistFromPixels(), CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), and CPhyloSlantedCladogram::x_Layout().
|
inline |
Definition at line 325 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetNumEdges(), and m_Calc.
Referenced by CPhyloCircularCladogram::x_RenderVbo(), CPhyloRadial::x_RenderVbo(), CPhyloSlantedCladogram::x_RenderVbo(), CPhyloRectCladogram::x_RenderVboPseudoSplines(), and CPhyloRectCladogram::x_RenderVboSplines().
|
inline |
Definition at line 323 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetNumNodes(), and m_Calc.
Referenced by CPhyloTreeWidget::SetDataSource(), CPhyloTreeWidget::SetDataSourceNoUpdate(), CPhyloTreeWidget::SetPortLimits(), CPhyloCircularCladogram::x_RenderVbo(), CPhyloRadial::x_RenderVbo(), CPhyloRectCladogram::x_RenderVbo(), CPhyloSlantedCladogram::x_RenderVbo(), CPhyloRectCladogram::x_RenderVboPseudoSplines(), and CPhyloRectCladogram::x_RenderVboSplines().
|
virtual |
Create an appropriate instance of a subclass of CQueryExec for that will be used to execute a query on the data source.
Implements IQueryDataSource.
Definition at line 874 of file phylo_tree_ds.cpp.
References CQueryExec::AddFunc(), CQueryParseNode::eAnd, CQueryParseNode::eBetween, CQueryParseNode::eBoolConst, NStr::eCase, CQueryParseNode::eEQ, CQueryParseNode::eFloatConst, CQueryParseNode::eFrom, CQueryParseNode::eFunction, CQueryParseNode::eGE, CQueryParseNode::eGT, CQueryParseNode::eIdentifier, CQueryParseNode::eIn, CQueryParseNode::eIntConst, CQueryParseNode::eLE, CQueryParseNode::eLike, CQueryParseNode::eLT, NStr::eNocase, CQueryParseNode::eNot, CQueryParseNode::eOr, CQueryParseNode::eSelect, CQueryParseNode::eString, CQueryParseNode::eSub, CQueryParseNode::eXor, GetDictionary(), GetTree(), and CTreeQueryExec::SetTree().
|
inlinevirtual |
Return a scope for the data source, if available.
Reimplemented from IQueryDataSource.
Definition at line 344 of file phylo_tree_ds.hpp.
References m_Scope.
|
inline |
Definition at line 363 of file phylo_tree_ds.hpp.
References CPhyloTree::GetSelectionSets(), and m_TreeModel.
Referenced by CPhyloSaveSelectiondlg::OnAddCurrentSelBtnClick(), CPhyloTreeWidget::OnAddSelectionSet(), CPhyloSaveSelectiondlg::OnBitmapbuttonDownClick(), CPhyloSaveSelectiondlg::OnBitmapbuttonUpClick(), CPhyloSaveSelectiondlg::OnDeleteSelBtnClick(), CPhyloSaveSelectiondlg::OnLeftDown(), CPhyloSaveSelectiondlg::OnSelColorPickerColourPickerChanged(), CPhyloSaveSelectiondlg::OnSelectionTextUpdated(), CPhyloSaveSelectiondlg::OnSelListctrlSelected(), CChangePhyloSelectionSetCmd::PerformEdit(), CPhyloSaveSelectiondlg::SetSelections(), CPhyloSaveSelectiondlg::UpdateSelections(), and UpdateSelectionSets().
|
inline |
Definition at line 328 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetHeight(), and m_Calc.
Referenced by CCalcRadialTree::CCalcRadialTree(), CCalcRectangularTree::CCalcRectangularTree(), CDrawCircularTreeVbo::CDrawCircularTreeVbo(), IPhyloTreeRender::InitCollisionInfo(), CPhyloTreeWidget::OnZoomTip(), IPhyloTreeRender::x_ComputeEdgeHighlight(), IPhyloTreeRender::x_FindBestSize(), CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), and CPhyloSlantedCladogram::x_Layout().
|
inline |
Get IDs selected by most recent call to FindNodes.
Definition at line 356 of file phylo_tree_ds.hpp.
References m_StringQueryIDs.
|
inline |
Definition at line 310 of file phylo_tree_ds.hpp.
References CRef< C, Locker >::GetPointerOrNull(), and m_TreeModel.
Referenced by IPhyloTreeRender::BufferedRender(), CCalcCircularTree::CCalcCircularTree(), CCalcRadialTree::CCalcRadialTree(), CCalcSlantedTree::CCalcSlantedTree(), CChangePhyloPropertyCmd::CChangePhyloPropertyCmd(), CDrawCircularTreeVbo::CDrawCircularTreeVbo(), Clean(), CPhyloTreeWidget::EditLabel(), CChangePhyloSelectionSetCmd::Execute(), CChangePhyloPropertyCmd::Execute(), IPhyloTreeRender::GetHoverNode(), IPhyloTreeRender::GetHoverNodeIdx(), GetQueryExec(), CwxPhyloSettingsDlg::GetRandomNode(), CPhyTreeView::GetSelection(), CPhyloTreePS::Init(), CPhyloTreeWidget::IterateSelection(), CPhyloSaveSelectiondlg::OnAddCurrentSelBtnClick(), CPhyloTreeWidget::OnAddSelectionSet(), CPhyTreeView::OnBioTreeChanged(), CPhyloTreeWidget::OnClearSelection(), CPhyloTreeWidget::OnCollapseChildren(), CPhyloTreeWidget::OnCollapseToViewport(), CPhyTreeView::OnCreateSelectedSubtree(), CPhyloTreeWidget::OnEditNode(), CPhyloTreeWidget::OnExpandChildren(), CPhyloTreeWidget::OnExportSelection(), CPhyTreeView::OnExportTree(), CPhyloTreeWidget::OnInfoTip(), IPhyloTreeRender::OnLeftDblClick(), IPhyloTreeRender::OnLeftDown(), CPhyloTreeWidget::OnRerootTree(), CPhyloTreeWidget::OnRerootTreeAtEdge(), IPhyloTreeRender::OnRightDown(), CPhyloTreeWidget::OnSearchTip(), CPhyloTreeWidget::OnSelectAll(), CPhyloTreeWidget::OnSetMidpointRoot(), CPhyloTreeWidget::OnShowAll(), CPhyTreeView::OnSomethingEdited(), IPhyloTreeRender::OnTimerLeftUp(), CPhyloTreeWidget::OnUpdateCollapseChildren(), CPhyloTreeWidget::OnUpdateCollapseSelected(), CPhyloTreeWidget::OnUpdateEdit(), CPhyloTreeWidget::OnUpdateEditLabel(), CPhyloTreeWidget::OnUpdateEditNode(), CPhyloTreeWidget::OnUpdateExpandChildren(), CPhyloTreeWidget::OnUpdateRerootTree(), CPhyloTreeWidget::OnUpdateRerootTreeAtEdge(), CPhyloTreeWidget::OnUpdateSelChanged(), CPhyloTreeWidget::OnUpdateSetMidpointRoot(), CPhyloTreeWidget::OnUpdateSubtreeFromSelection(), CPhyloTreeWidget::OnUpdateZoomSel(), CPhyloTreeWidget::OnUpdateZoomToSubtree(), CPhyloTreeWidget::OnZoomTip(), CPhyloTreeWidget::OnZoomToSelection(), CPhyloTreeWidget::OnZoomToSubtree(), CChangePhyloSelectionSetCmd::PerformEdit(), CChangePhyloPropertyCmd::PerformEdit(), CChangePhyloExpandCollapseCmd::PerformEdit(), IPhyloTreeRender::PointToNode(), CPhyloTreeWidget::QueryEnd(), CPhyTreeView::RebuildObjectIndex(), CPhyloTreeWidget::RedrawDataSource(), CPhyloTreePane::RenderPdf(), CPhyloTreeWidget::SendEditEvent(), IPhyloTreeRender::SetActiveTooltipNode(), IPhyloTreeRender::SetScheme(), CPhyloSaveSelectiondlg::SetSelections(), IPhyloTreeRender::TTHH_GetTooltip(), CChangePhyloSelectionSetCmd::Unexecute(), CChangePhyloPropertyCmd::Unexecute(), CPhyloTreePane::Update(), CwxPhyloSettingsDlg::UpdateSample(), CPhyloForce::x_CalculateBoundary(), CPhyloRectCladogram::x_DrawPseudoSplineTree(), CPhyloRectCladogram::x_DrawSplineTree(), CPhyloCircularCladogram::x_DrawTree(), CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), CPhyloSlantedCladogram::x_Layout(), CPhyTreeView::x_OnSetSelection(), CPhyloTreePane::x_Render(), IPhyloTreeRender::x_RenderCircularVbo(), IPhyloTreeRender::x_RenderLineVbo(), IPhyloTreeRender::x_RenderNodeHighlight(), IPhyloTreeRender::x_RenderPseudoSplineVbo(), IPhyloTreeRender::x_RenderSelection(), IPhyloTreeRender::x_RenderSplineVbo(), IPhyloTreeRender::x_RenderTooltipHints(), CPhyloCircularCladogram::x_RenderVbo(), CPhyloRadial::x_RenderVbo(), CPhyloSlantedCladogram::x_RenderVbo(), CPhyloRectCladogram::x_RenderVboPseudoSplines(), CPhyloRectCladogram::x_RenderVboSplines(), IPhyloTreeRender::x_SelectByRect(), and CPhyloSaveSelectiondlg::x_SetClusterIds().
|
inline |
Definition at line 311 of file phylo_tree_ds.hpp.
References CRef< C, Locker >::GetPointerOrNull(), and m_TreeModel.
|
inline |
Definition at line 315 of file phylo_tree_ds.hpp.
References m_TreeLabel.
Referenced by CPhyTreeView::OnSomethingEdited(), CwxTreeLabelEdit::SetParams(), and IPhyloTreeRender::x_RenderTreeLabel().
|
inline |
Definition at line 324 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetVisibleNodes(), and m_Calc.
Referenced by IPhyloTreeRender::ComputeViewingLimits().
|
inline |
Definition at line 327 of file phylo_tree_ds.hpp.
References CPhyloTreeCalculator::GetWidth(), and m_Calc.
Referenced by CCalcRadialTree::CCalcRadialTree(), CCalcRectangularTree::CCalcRectangularTree(), IPhyloTreeRender::GetMinDimensions(), CCalcCircularTree::operator()(), CPhyloCircularCladogram::x_Layout(), CPhyloForce::x_Layout(), CPhyloRadial::x_Layout(), CPhyloRectCladogram::x_Layout(), and CPhyloSlantedCladogram::x_Layout().
bool CPhyloTreeDataSource::HasClusters | ( | ) |
Definition at line 325 of file phylo_tree_ds.cpp.
References map_checker< Container >::empty(), CPhyloTreeCalculator::GetClusters(), m_Calc, and NULL.
|
inline |
Return true if data is available (for trees without distances, may not be)
Definition at line 268 of file phylo_tree_ds.hpp.
References m_LenDistribution.
Referenced by IPhyloTreeRender::GetEdgeColor().
void CPhyloTreeDataSource::Init | ( | const objects::CBioTreeContainer & | tree, |
objects::CScope & | scope, | ||
bool | expand_all = false |
||
) |
Throws exception if tree is empty - at least 1 node is required.
Definition at line 179 of file phylo_tree_ds.cpp.
References BioTreeConvertContainer2Tree(), CPhyloSelectionSetMgr::Clear(), CPhyloTree::Clear(), CPhyloTreeCalculator::DumpStats(), eUnknown, CPhyloTree::GetColorTable(), CPhyloTree::GetFeatureDict(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetPointer(), CPhyloTree::GetSelectionSets(), CPhyloSelectionSetMgr::InitFromUserObject(), CTreeLabel::InitializeFromUserObject(), CRef< C, Locker >::IsNull(), m_Calc, m_Scope, m_TreeLabel, m_TreeModel, MeasureTree(), NCBI_THROW, CRef< C, Locker >::Reset(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by Clean(), CPhyloTreeDataSource(), and CPhyTreeView::OnBioTreeChanged().
CPhyloTree::TTreeIdx CPhyloTreeDataSource::IterateOverSelNodes | ( | int | direction, |
bool | highlight | ||
) |
Definition at line 1055 of file phylo_tree_ds.cpp.
References CPhyloTree::GetExplicitlySelectedAndNotCollapsed(), CRef< C, Locker >::GetObject(), CTreeModel< TNode >::GetRootIdx(), m_SearchCurrentNode, m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), CPhyloTree::SetCurrentNode(), and ct::sort().
Referenced by CPhyloTreeWidget::IterateSelection(), CPhyloTreeWidget::QueryEnd(), and CPhyloTreeWidget::SetSelectAll().
void CPhyloTreeDataSource::MeasureTree | ( | ) |
Definition at line 277 of file phylo_tree_ds.cpp.
References CTreeModel< TNode >::GetRootIdx(), and m_TreeModel.
Referenced by CollapseSelected(), Cut(), Filter(), FilterDistances(), Init(), NewNode(), Paste(), Remove(), RemoveSelected(), Sort(), SortDist(), SortLabel(), SortLabelRange(), and UpdateSelectionSets().
void CPhyloTreeDataSource::MeasureTree | ( | TTreeIdx | node | ) |
Definition at line 235 of file phylo_tree_ds.cpp.
References CPhyloTree::GetColorTable(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetPointer(), CPhyloTreeCalculator::Init(), m_Calc, m_LenDistribution, m_TreeModel, and TreeDepthFirst().
Referenced by CPhyloTreeWidget::RedrawDataSource().
void CPhyloTreeDataSource::MoveNode | ( | bool | up | ) |
Definition at line 1598 of file phylo_tree_ds.cpp.
References _TRACE, CPhyloTree::GetCurrentNodeIdx(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), last(), m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), CTreeModelNode< TData >::SubNodeBegin(), CTreeModelNode< TData >::SubNodeEnd(), and swap().
Referenced by CPhyloTreeWidget::OnEdit().
Definition at line 1361 of file phylo_tree_ds.cpp.
References _TRACE, CTreeModel< TNode >::AddChild(), CTreeModel< TNode >::AddNode(), CTreeModelNode< TData >::GetChildren(), CPhyloTree::GetColorTable(), CPhyloTree::GetCurrentNode(), CPhyloTree::GetCurrentNodeIdx(), CPhyloTree::GetFeatureDict(), CBioTreeFeatureDictionary::GetFeatureDict(), CPhyloTreeMaxIdCalculator::GetMaxId(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), CTreeModelNode< TData >::GetValue(), ITERATE, m_TreeModel, MeasureTree(), CTreeModel< CPhyloTreeNode >::Null(), CTreeModel< TNode >::RemoveChild(), CPhyloNodeData::SetFeature(), CTreeModelNode< TData >::SetParent(), CTreeModelNode< TData >::SubNodeBegin(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by CPhyloTreeWidget::OnEdit(), ReRootEdge(), and ReRootMidpoint().
void CPhyloTreeDataSource::Paste | ( | void | ) |
Definition at line 1340 of file phylo_tree_ds.cpp.
References _TRACE, CPhyloTree::GetCurrentNodeIdx(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetRootIdx(), m_sTreeClipboard, m_TreeModel, MeasureTree(), CTreeModelNode< CPhyloNodeData >::Null(), CTreeModel< CPhyloTreeNode >::Null(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by CPhyloTreeWidget::OnEdit().
void CPhyloTreeDataSource::Relabel | ( | CPhyloTreeScheme * | scheme, |
string | labelFmt | ||
) |
Definition at line 738 of file phylo_tree_ds.cpp.
References Clusterize(), CPhyloTree::GetColorTable(), CPhyloTreeCalculator::GetHeight(), CPhyloTreeCalculator::GetMaxDistance(), CRef< C, Locker >::GetNCObject(), CPhyloTreeCalculator::GetNumNodes(), CTreeModel< TNode >::GetRootIdx(), CPhyloTreeCalculator::Init(), m_Calc, m_TreeModel, max(), CPhyloTreeCalculator::SetLabelFormat(), CPhyloTreeScheme::SetMaxBranchDist(), CPhyloTreeScheme::SetMaxNumChildren(), CTreeModel< TNode >::SetNumNodes(), and TreeDepthFirst().
Referenced by CPhyTreeView::OnBioTreeChanged(), CPhyloTreeWidget::OnClean(), CPhyloTreeWidget::OnOpenPropertiesDlg(), CPhyloTreeWidget::OnRerootTree(), CPhyloTreeWidget::OnRerootTreeAtEdge(), CPhyloTreeWidget::OnSetMidpointRoot(), CPhyloTreeWidget::QueryEnd(), and IPhyloTreeRender::RenderPdf().
Definition at line 1413 of file phylo_tree_ds.cpp.
References _TRACE, CTreeModel< TNode >::AddChild(), CTreeModelNode< TData >::ClearConnections(), CPhyloTree::ClearSelection(), CPhyloTree::GetCurrentNodeIdx(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), CTreeModelNode< TData >::GetValue(), m_TreeModel, MeasureTree(), CTreeModel< CPhyloTreeNode >::Null(), CTreeModel< TNode >::RemoveChild(), CPhyloNodeData::SetId(), CTreeModelNode< TData >::SubNodeBegin(), CTreeModelNode< TData >::SubNodeEnd(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by CPhyloTreeWidget::OnEdit().
void CPhyloTreeDataSource::RemoveSelected | ( | ) |
Definition at line 1452 of file phylo_tree_ds.cpp.
References _TRACE, CPhyloTree::ClearSelection(), CPhyloTree::FindNodeById(), CPhyloTree::GetExplicitlySelectedIDs(), CRef< C, Locker >::GetNCObject(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), i, m_TreeModel, MeasureTree(), CTreeModel< CPhyloTreeNode >::Null(), CTreeModel< TNode >::RemoveChild(), TreeDepthFirst(), and CPhyloTree::UpdateNodesMapping().
Referenced by CPhyloTreeWidget::OnEdit().
void CPhyloTreeDataSource::ReRoot | ( | TTreeIdx | root_idx | ) |
Set the root node of the tree to the node at root_idx.
Definition at line 477 of file phylo_tree_ds.cpp.
References CPhyloTree::GetFeatureDict(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetValue(), m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), CTreeModel< TNode >::ReRoot(), CPhyloNodeData::SetDistance(), CTreeModelNode< TData >::SetParent(), and CPhyloNodeData::Sync().
Referenced by CPhyloTreeWidget::OnRerootTree(), CPhyloTreeWidget::OnZoomToSubtree(), ReRootEdge(), and ReRootMidpoint().
void CPhyloTreeDataSource::ReRootEdge | ( | TTreeIdx | edge_child_node | ) |
Re-root on the edge between the selected node and its parent.
Definition at line 488 of file phylo_tree_ds.cpp.
References CPhyloNodeData::GetDistance(), CPhyloTree::GetFeatureDict(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetValue(), CBioTreeFeatureDictionary::HasFeature(), m_TreeModel, NewNode(), CTreeModel< CPhyloTreeNode >::Null(), ReRoot(), CPhyloTree::SetCurrentNode(), CPhyloNodeData::SetDistance(), and CPhyloNodeData::Sync().
Referenced by CPhyloTreeWidget::OnRerootTreeAtEdge().
void CPhyloTreeDataSource::ReRootMidpoint | ( | ) |
Re-root tree using midpoint-method.
Definition at line 513 of file phylo_tree_ds.cpp.
References _ASSERT, close(), NStr::DoubleToString(), CPhyloNodeData::GetDistance(), CPhyloTreeDistFromRoot::GetDistances(), CPhyloTree::GetFeatureDict(), CPhyloTreeMidpointDist::GetLongest(), CPhyloTreeDistFromRoot::GetMaxDistNode(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetNode(), CTreeModelNode< TData >::GetParent(), CTreeModel< TNode >::GetRootIdx(), CTreeModelNode< TData >::GetValue(), CBioTreeFeatureDictionary::HasFeature(), CTreeModelNode< TData >::HasParent(), i, Info(), LOG_POST, m_TreeModel, NewNode(), CTreeModel< CPhyloTreeNode >::Null(), ReRoot(), CPhyloTree::SetCurrentNode(), CPhyloNodeData::SetDistance(), CPhyloNodeData::SetFeature(), CPhyloNodeData::Sync(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnSetMidpointRoot().
void CPhyloTreeDataSource::SetCollapsedLabel | ( | CPhyloTree::TTreeIdx | idx | ) |
Collapse single node, do any relabeling if needed.
Definition at line 1493 of file phylo_tree_ds.cpp.
References CPhyloTreeNode::CanExpandCollapse(), CPhyloNodeData::eHideChildren, CPhyloTree::GetFeatureDict(), CBioTreeFeatureList::GetFeatureValue(), CBioTreeFeatureDictionary::GetId(), CPhyloTreePriorityNode::GetMaxPriorityNode(), CTreeModel< TNode >::GetNode(), CBioTreeFeatureDictionary::HasFeature(), m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), CBioTreeFeatureList::SetFeature(), CPhyloTreeNode::SetLabel(), and TreeDepthFirst().
Referenced by CollapseSelected(), CPhyloTreeWidget::OnCollapseChildren(), IPhyloTreeRender::OnLeftDblClick(), and SetCollapsedLabels().
void CPhyloTreeDataSource::SetCollapsedLabels | ( | const vector< CPhyloNodeData::TID > & | node_ids | ) |
Collapse all nodes in node_ids, doing relabeling if needed.
Definition at line 1534 of file phylo_tree_ds.cpp.
References CPhyloTreeNode::CanExpandCollapse(), CPhyloNodeData::eHideChildren, CPhyloTree::FindNodeById(), CTreeModel< TNode >::GetNode(), i, m_TreeModel, CTreeModel< CPhyloTreeNode >::Null(), and SetCollapsedLabel().
Referenced by CPhyloTreeWidget::OnCollapseToViewport().
void CPhyloTreeDataSource::SetColorIndices | ( | CPhyloTreeScheme * | scheme | ) |
Definition at line 221 of file phylo_tree_ds.cpp.
References CPhyloTree::GetColorTable(), CRgbaGradColorTable::LoadTexture(), m_TreeModel, NULL, and CPhyloTreeScheme::UpdateColorTable().
Referenced by Clusterize().
|
inline |
Definition at line 361 of file phylo_tree_ds.hpp.
References m_SearchCurrentNode.
|
virtual |
Set selection results to be whatever elements are selected in 'q'.
Implements IQueryDataSource.
Definition at line 937 of file phylo_tree_ds.cpp.
References ClearQueryResults(), CPhyloTree::ClearSelection(), CTreeQueryExec::GetTreeSelected(), m_TreeModel, and CPhyloTree::SetSelection().
|
inline |
Label for tree (optional element of biotreecontainer)
Definition at line 314 of file phylo_tree_ds.hpp.
References l(), and m_TreeLabel.
Referenced by CwxTreeLabelEdit::OnOkClick().
void CPhyloTreeDataSource::Sort | ( | bool | ascending | ) |
Definition at line 753 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetPointer(), CTreeModel< TNode >::GetRootIdx(), m_TreeModel, MeasureTree(), and TreeDepthFirst().
Referenced by CPhyTreeView::OnBioTreeChanged(), and CPhyloTreeWidget::OnSort().
void CPhyloTreeDataSource::SortDist | ( | bool | ascending | ) |
Definition at line 762 of file phylo_tree_ds.cpp.
References CPhyloTreeMaxChildDist::GetDistances(), CPhyloTree::GetFeatureDict(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetRootIdx(), CBioTreeFeatureDictionary::HasFeature(), m_TreeModel, MeasureTree(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnSort().
void CPhyloTreeDataSource::SortLabel | ( | bool | ascending | ) |
Definition at line 779 of file phylo_tree_ds.cpp.
References CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetRootIdx(), m_TreeModel, MeasureTree(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnSort().
void CPhyloTreeDataSource::SortLabelRange | ( | bool | ascending | ) |
Definition at line 788 of file phylo_tree_ds.cpp.
References CPhyloTreeLabelRange::GetLabelRanges(), CRef< C, Locker >::GetNCObject(), CRef< C, Locker >::GetNCPointer(), CTreeModel< TNode >::GetRootIdx(), m_TreeModel, MeasureTree(), and TreeDepthFirst().
Referenced by CPhyloTreeWidget::OnSort().
void CPhyloTreeDataSource::UpdateSelectionSets | ( | CPhyloTreeScheme * | scheme | ) |
Definition at line 1131 of file phylo_tree_ds.cpp.
References Clusterize(), GetMaxClusterID(), CRef< C, Locker >::GetPointer(), CPhyloTree::GetSelectionSets(), GetSelectionSets(), CPhyloSelectionSetMgr::GetSets(), m_TreeModel, MeasureTree(), CPhyloSelectionSetMgr::RenumberClusterIDs(), and CPhyloSelectionSetMgr::SetSelectionSetProperty().
Referenced by CPhyloTreeWidget::OnAddSelectionSet().
|
protected |
Definition at line 395 of file phylo_tree_ds.hpp.
Referenced by ApplyAttributes(), Clusterize(), GetMaxClusterID(), GetMaxLabelLen(), GetMinDistance(), GetNormDistance(), GetNumEdges(), GetNumNodes(), GetSize(), GetVisibleNodes(), GetWidth(), HasClusters(), Init(), MeasureTree(), Relabel(), and ~CPhyloTreeDataSource().
|
protected |
Definition at line 401 of file phylo_tree_ds.hpp.
Referenced by Clusterize(), and GetClusterToColorMap().
|
protected |
Definition at line 406 of file phylo_tree_ds.hpp.
Referenced by ComputeLengthsFromRoot(), GetClosestLen(), HasLenDistribution(), and MeasureTree().
|
protected |
Definition at line 397 of file phylo_tree_ds.hpp.
Referenced by Clean(), GetScope(), and Init().
|
protected |
Definition at line 399 of file phylo_tree_ds.hpp.
Referenced by Clear(), ClearQueryResults(), ExecuteStringQuery(), GetCurrentSearchNode(), IterateOverSelNodes(), and SetCurrentSearchNode().
|
staticprotected |
static (to allow copying between trees)
Definition at line 413 of file phylo_tree_ds.hpp.
Referenced by ClipboardEmpty(), Cut(), and Paste().
|
protected |
Temporary storage for string query results to get ID's back to caller.
Definition at line 409 of file phylo_tree_ds.hpp.
Referenced by ExecuteStringQuery(), and GetStringQueryIDs().
|
protected |
Definition at line 392 of file phylo_tree_ds.hpp.
Referenced by GetTreeLabel(), Init(), and SetTreeLabel().
|
protected |
Definition at line 389 of file phylo_tree_ds.hpp.
Referenced by ApplyAttributes(), Clear(), Clusterize(), CollapseByDistance(), CollapseSelected(), ComputeLengthsFromRoot(), Cut(), ExecuteStringQuery(), Filter(), FilterDistances(), FindNodes(), GenerateTooltipFormat(), GetBoundRect(), GetColsCount(), GetColumnLabel(), GetDictionary(), GetModel(), GetSelectionSets(), GetTree(), Init(), IterateOverSelNodes(), MeasureTree(), MoveNode(), NewNode(), Paste(), Relabel(), Remove(), RemoveSelected(), ReRoot(), ReRootEdge(), ReRootMidpoint(), SetCollapsedLabel(), SetCollapsedLabels(), SetColorIndices(), SetQueryResults(), Sort(), SortDist(), SortLabel(), SortLabelRange(), and UpdateSelectionSets().