Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

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.
 

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
 
TreeView * getView () 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
 
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 ()
 
ControlNet * getControlNetwork () const
 
FilterWidget * getFilterWidget () const
 
QFutureWatcher< QAtomicPointer< RootItem > > * getRebuildWatcher () const
 
RootItem * getRootItem () const
 

Protected Attributes

RootItem * rootItem
 

Private Slots

void applyFilterDone ()
 
void rebuildItemsDone ()
 

Private Member Functions

 AbstractTreeModel (const AbstractTreeModel &)
 
AbstractTreeModel & operator= (const AbstractTreeModel &)
 
AbstractTreeItem * nextItem (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
 
BusyLeafItem * m_busyItem
 
TreeView * m_view
 
ControlNet * m_cNet
 
FilterWidget * m_guisFilterWidget
 
FilterWidget * m_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_".

2016-06-21 Kris Becker - Properly forward declare QPair as struct not class

2017-07-25 Summer Stapleton - Removed the CnetViz namespace. Fixes #5054.

Definition at line 47 of file AbstractTreeModel.h.

Member Enumeration Documentation

◆ InterestingItems

enum Isis::AbstractTreeModel::InterestingItems

Definition at line 51 of file AbstractTreeModel.h.

Constructor & Destructor Documentation

◆ AbstractTreeModel()

Isis::AbstractTreeModel::AbstractTreeModel ( ControlNet * controlNet,
TreeView * v,
QObject * parent = 0 )

Definition at line 42 of file AbstractTreeModel.cpp.

◆ ~AbstractTreeModel()

Isis::AbstractTreeModel::~AbstractTreeModel ( )
virtual

Definition at line 85 of file AbstractTreeModel.cpp.

Member Function Documentation

◆ applyFilter

void Isis::AbstractTreeModel::applyFilter ( )
slot

Definition at line 434 of file AbstractTreeModel.cpp.

◆ applyFilterDone

void Isis::AbstractTreeModel::applyFilterDone ( )
privateslot

Definition at line 551 of file AbstractTreeModel.cpp.

◆ clear()

void Isis::AbstractTreeModel::clear ( )
protected

Definition at line 369 of file AbstractTreeModel.cpp.

◆ 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.

◆ getControlNetwork()

ControlNet * Isis::AbstractTreeModel::getControlNetwork ( ) const
protected

Definition at line 377 of file AbstractTreeModel.cpp.

◆ getItemCount() [1/2]

int Isis::AbstractTreeModel::getItemCount ( AbstractTreeItem * item,
InterestingItemsFlag flags ) const
private

Definition at line 512 of file AbstractTreeModel.cpp.

◆ getItemCount() [2/2]

int Isis::AbstractTreeModel::getItemCount ( InterestingItemsFlag flags) const

Definition at line 255 of file AbstractTreeModel.cpp.

◆ getItems() [1/2]

QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems ( AbstractTreeItem * item1,
AbstractTreeItem * item2,
InterestingItemsFlag flags = AllItems,
bool ignoreExpansion = false )

Definition at line 169 of file AbstractTreeModel.cpp.

◆ getItems() [2/2]

QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems ( int start,
int end,
InterestingItemsFlag flags = AllItems,
bool ignoreExpansion = false )

Definition at line 118 of file AbstractTreeModel.cpp.

◆ getMutex()

QMutex * Isis::AbstractTreeModel::getMutex ( ) const

Definition at line 250 of file AbstractTreeModel.cpp.

◆ getRebuildWatcher()

QFutureWatcher< QAtomicPointer< RootItem > > * Isis::AbstractTreeModel::getRebuildWatcher ( ) const
protected

Definition at line 383 of file AbstractTreeModel.cpp.

◆ getRootItem()

RootItem * Isis::AbstractTreeModel::getRootItem ( ) const
protected

Definition at line 388 of file AbstractTreeModel.cpp.

◆ getSelectedItems()

QList< AbstractTreeItem * > Isis::AbstractTreeModel::getSelectedItems ( InterestingItemsFlag flags = AllItems,
bool ignoreExpansion = false )

Definition at line 228 of file AbstractTreeModel.cpp.

◆ getTopLevelItemCount()

int Isis::AbstractTreeModel::getTopLevelItemCount ( ) const

Definition at line 260 of file AbstractTreeModel.cpp.

◆ getView()

TreeView * Isis::AbstractTreeModel::getView ( ) const

Definition at line 393 of file AbstractTreeModel.cpp.

◆ getVisibleItemCount()

int Isis::AbstractTreeModel::getVisibleItemCount ( InterestingItemsFlag flags,
bool ignoreExpansion ) const

Definition at line 264 of file AbstractTreeModel.cpp.

◆ getVisibleSize()

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

indentation is in pixels

Definition at line 407 of file AbstractTreeModel.cpp.

References getVisibleSize().

Referenced by getVisibleSize().

◆ getVisibleTopLevelItemCount()

int Isis::AbstractTreeModel::getVisibleTopLevelItemCount ( ) const

Definition at line 285 of file AbstractTreeModel.cpp.

◆ indexOfVisibleItem()

int Isis::AbstractTreeModel::indexOfVisibleItem ( AbstractTreeItem const * item,
InterestingItemsFlag flags = AllItems,
bool ignoreExpansion = false ) const

Definition at line 302 of file AbstractTreeModel.cpp.

◆ isFiltering()

bool Isis::AbstractTreeModel::isFiltering ( ) const

Definition at line 349 of file AbstractTreeModel.cpp.

◆ isFrozen()

bool Isis::AbstractTreeModel::isFrozen ( ) const

Definition at line 339 of file AbstractTreeModel.cpp.

◆ isRebuilding()

bool Isis::AbstractTreeModel::isRebuilding ( ) const

Definition at line 354 of file AbstractTreeModel.cpp.

◆ itemIsInteresting()

bool Isis::AbstractTreeModel::itemIsInteresting ( AbstractTreeItem * item,
InterestingItemsFlag flags )
staticprivate

Definition at line 496 of file AbstractTreeModel.cpp.

◆ nextItem()

AbstractTreeItem * Isis::AbstractTreeModel::nextItem ( AbstractTreeItem * current,
InterestingItemsFlag flags,
bool ignoreExpansion ) const
private

Definition at line 530 of file AbstractTreeModel.cpp.

◆ queueRebuild()

void Isis::AbstractTreeModel::queueRebuild ( )

Definition at line 344 of file AbstractTreeModel.cpp.

◆ rebuildItemsDone

void Isis::AbstractTreeModel::rebuildItemsDone ( )
privateslot

Definition at line 566 of file AbstractTreeModel.cpp.

◆ selectItems()

void Isis::AbstractTreeModel::selectItems ( AbstractTreeItem * item,
bool select,
InterestingItemsFlag flags )
private

Definition at line 482 of file AbstractTreeModel.cpp.

◆ setFilter()

void Isis::AbstractTreeModel::setFilter ( FilterWidget * newFilter)

Definition at line 359 of file AbstractTreeModel.cpp.

◆ setFrozen()

void Isis::AbstractTreeModel::setFrozen ( bool newFrozenState)

Definition at line 325 of file AbstractTreeModel.cpp.

◆ setGlobalSelection()

void Isis::AbstractTreeModel::setGlobalSelection ( bool selected,
InterestingItemsFlag flags = AllItems )

Definition at line 476 of file AbstractTreeModel.cpp.

◆ setRebuilding()

void Isis::AbstractTreeModel::setRebuilding ( bool running)
inline

Definition at line 81 of file AbstractTreeModel.h.

◆ stopWorking()

void Isis::AbstractTreeModel::stopWorking ( )

Definition at line 398 of file AbstractTreeModel.cpp.

Member Data Documentation

◆ m_busyItem

BusyLeafItem* Isis::AbstractTreeModel::m_busyItem
private

Definition at line 162 of file AbstractTreeModel.h.

◆ m_cNet

ControlNet* Isis::AbstractTreeModel::m_cNet
private

Definition at line 164 of file AbstractTreeModel.h.

◆ m_drivable

bool Isis::AbstractTreeModel::m_drivable
private

Definition at line 167 of file AbstractTreeModel.h.

◆ m_expandedState

QList< QPair< QString, QString > >* Isis::AbstractTreeModel::m_expandedState
private

Definition at line 159 of file AbstractTreeModel.h.

◆ m_filterAgain

bool Isis::AbstractTreeModel::m_filterAgain
private

Definition at line 168 of file AbstractTreeModel.h.

◆ m_filterRunning

bool Isis::AbstractTreeModel::m_filterRunning
private

Definition at line 169 of file AbstractTreeModel.h.

◆ m_filterWatcher

QFutureWatcher< QAtomicPointer< AbstractTreeItem > >* Isis::AbstractTreeModel::m_filterWatcher
private

Definition at line 157 of file AbstractTreeModel.h.

◆ m_frozen

bool Isis::AbstractTreeModel::m_frozen
private

Definition at line 171 of file AbstractTreeModel.h.

◆ m_guisFilterWidget

FilterWidget* Isis::AbstractTreeModel::m_guisFilterWidget
private

Definition at line 165 of file AbstractTreeModel.h.

◆ m_localFilterWidgetCopy

FilterWidget* Isis::AbstractTreeModel::m_localFilterWidgetCopy
private

Definition at line 166 of file AbstractTreeModel.h.

◆ m_mutex

QMutex* Isis::AbstractTreeModel::m_mutex
private

Definition at line 161 of file AbstractTreeModel.h.

◆ m_rebuildPending

bool Isis::AbstractTreeModel::m_rebuildPending
private

Definition at line 172 of file AbstractTreeModel.h.

◆ m_rebuildRunning

bool Isis::AbstractTreeModel::m_rebuildRunning
private

Definition at line 170 of file AbstractTreeModel.h.

◆ m_rebuildWatcher

QFutureWatcher< QAtomicPointer< RootItem > >* Isis::AbstractTreeModel::m_rebuildWatcher
private

Definition at line 158 of file AbstractTreeModel.h.

◆ m_selectedState

QList< QPair< QString, QString > >* Isis::AbstractTreeModel::m_selectedState
private

Definition at line 160 of file AbstractTreeModel.h.

◆ m_view

TreeView* Isis::AbstractTreeModel::m_view
private

Definition at line 163 of file AbstractTreeModel.h.

◆ rootItem

RootItem* Isis::AbstractTreeModel::rootItem
protected

Definition at line 153 of file AbstractTreeModel.h.


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