Isis 3 Programmer Reference
Isis::AbstractTreeModel Class Referenceabstract

Base class for tree models. More...

#include <AbstractTreeModel.h>

Inheritance diagram for Isis::AbstractTreeModel:
Inheritance graph
Collaboration diagram for Isis::AbstractTreeModel:
Collaboration graph

Classes

class  FilterFunctor
 

Public Types

enum  InterestingItems { PointItems = 1, MeasureItems = 2, ImageItems = 4, AllItems = PointItems | MeasureItems | ImageItems }
 

Public Slots

void applyFilter ()
 

Signals

void cancelSort ()
 
void modelModified ()
 
void filterProgressChanged (int)
 
void filterProgressRangeChanged (int, int)
 
void rebuildProgressChanged (int)
 
void rebuildProgressRangeChanged (int, int)
 
void treeSelectionChanged (QList< AbstractTreeItem * >)
 
void tableSelectionChanged (QList< AbstractTreeItem * >)
 
void filterCountsChanged (int visibleTopLevelItemCount, int topLevelItemCount)
 This signal is emitted after filtering to provide the number of visible top-level items remaining after the filter was applied, as well as the total number of items that were possible. More...
 

Public Member Functions

 AbstractTreeModel (ControlNet *controlNet, TreeView *v, QObject *parent=0)
 
QList< AbstractTreeItem * > getItems (int, int, InterestingItemsFlag=AllItems, bool=false)
 
QList< AbstractTreeItem * > getItems (AbstractTreeItem *, AbstractTreeItem *, InterestingItemsFlag=AllItems, bool=false)
 
QList< AbstractTreeItem * > getSelectedItems (InterestingItemsFlag=AllItems, bool=false)
 
QMutex * getMutex () const
 
int getItemCount (InterestingItemsFlag) const
 
int getTopLevelItemCount () const
 
int getVisibleItemCount (InterestingItemsFlag, bool) const
 
int getVisibleTopLevelItemCount () const
 
TreeViewgetView () const
 
void setDrivable (bool drivableStatus)
 
bool isDrivable () const
 
bool isFiltering () const
 
bool isRebuilding () const
 
void setRebuilding (bool running)
 
void setFilter (FilterWidget *newFilter)
 
void setGlobalSelection (bool selected, InterestingItemsFlag=AllItems)
 
void stopWorking ()
 
QSize getVisibleSize (int indentation) const
 indentation is in pixels More...
 
int indexOfVisibleItem (AbstractTreeItem const *item, InterestingItemsFlag=AllItems, bool=false) const
 
void setFrozen (bool)
 
bool isFrozen () const
 
void queueRebuild ()
 
virtual void rebuildItems ()=0
 

Protected Member Functions

void clear ()
 
ControlNetgetControlNetwork () const
 
FilterWidgetgetFilterWidget () const
 
QFutureWatcher< QAtomicPointer< RootItem > > * getRebuildWatcher () const
 
RootItemgetRootItem () const
 

Protected Attributes

RootItemrootItem
 

Private Slots

void applyFilterDone ()
 
void rebuildItemsDone ()
 

Private Member Functions

 AbstractTreeModel (const AbstractTreeModel &)
 
AbstractTreeModeloperator= (const AbstractTreeModel &)
 
AbstractTreeItemnextItem (AbstractTreeItem *current, InterestingItemsFlag flags, bool ignoreExpansion) const
 
void selectItems (AbstractTreeItem *item, bool select, InterestingItemsFlag flags)
 
int getItemCount (AbstractTreeItem *, InterestingItemsFlag) const
 

Static Private Member Functions

static bool itemIsInteresting (AbstractTreeItem *, InterestingItemsFlag)
 

Private Attributes

QFutureWatcher< QAtomicPointer< AbstractTreeItem > > * m_filterWatcher
 
QFutureWatcher< QAtomicPointer< RootItem > > * m_rebuildWatcher
 
QList< QPair< QString, QString > > * m_expandedState
 
QList< QPair< QString, QString > > * m_selectedState
 
QMutex * m_mutex
 
BusyLeafItemm_busyItem
 
TreeViewm_view
 
ControlNetm_cNet
 
FilterWidgetm_guisFilterWidget
 
FilterWidgetm_localFilterWidgetCopy
 
bool m_drivable
 
bool m_filterAgain
 
bool m_filterRunning
 
bool m_rebuildRunning
 
bool m_frozen
 
bool m_rebuildPending
 

Detailed Description

Base class for tree models.

This class is a base class for models that store data in a tree-like structure. There is also a linked-list for iterating over the filtered items in an efficient manner. This handles the filtering of items and provides an interface for rebuilding.

Author
????-??-?? Eric Hyer
History:
2012-09-28 Kimberly Oyama - Changed member variables to be prefixed with "m_".
History:
2016-06-21 Kris Becker - Properly forward declare QPair as struct not class
History:
2017-07-25 Summer Stapleton - Removed the CnetViz namespace. Fixes #5054.

Definition at line 47 of file AbstractTreeModel.h.

Member Function Documentation

◆ filterCountsChanged

void Isis::AbstractTreeModel::filterCountsChanged ( int  visibleTopLevelItemCount,
int  topLevelItemCount 
)
signal

This signal is emitted after filtering to provide the number of visible top-level items remaining after the filter was applied, as well as the total number of items that were possible.

◆ getVisibleSize()

QSize Isis::AbstractTreeModel::getVisibleSize ( int  indentation) const

indentation is in pixels

Definition at line 414 of file AbstractTreeModel.cpp.


The documentation for this class was generated from the following files: