Isis 3 Programmer Reference
|
Base class for tree models. More...
#include <AbstractTreeModel.h>
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 |
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.
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 48 of file AbstractTreeModel.h.
enum Isis::AbstractTreeModel::InterestingItems |
Definition at line 52 of file AbstractTreeModel.h.
Isis::AbstractTreeModel::AbstractTreeModel | ( | ControlNet * | controlNet, |
TreeView * | v, | ||
QObject * | parent = 0 ) |
Definition at line 42 of file AbstractTreeModel.cpp.
|
virtual |
Definition at line 85 of file AbstractTreeModel.cpp.
|
slot |
Definition at line 434 of file AbstractTreeModel.cpp.
|
privateslot |
Definition at line 551 of file AbstractTreeModel.cpp.
|
protected |
Definition at line 369 of file AbstractTreeModel.cpp.
|
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.
|
protected |
Definition at line 377 of file AbstractTreeModel.cpp.
|
private |
Definition at line 512 of file AbstractTreeModel.cpp.
int Isis::AbstractTreeModel::getItemCount | ( | InterestingItemsFlag | flags | ) | const |
Definition at line 255 of file AbstractTreeModel.cpp.
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems | ( | AbstractTreeItem * | item1, |
AbstractTreeItem * | item2, | ||
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) |
Definition at line 169 of file AbstractTreeModel.cpp.
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems | ( | int | start, |
int | end, | ||
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) |
Definition at line 118 of file AbstractTreeModel.cpp.
QMutex * Isis::AbstractTreeModel::getMutex | ( | ) | const |
Definition at line 250 of file AbstractTreeModel.cpp.
|
protected |
Definition at line 383 of file AbstractTreeModel.cpp.
|
protected |
Definition at line 388 of file AbstractTreeModel.cpp.
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getSelectedItems | ( | InterestingItemsFlag | flags = AllItems, |
bool | ignoreExpansion = false ) |
Definition at line 228 of file AbstractTreeModel.cpp.
int Isis::AbstractTreeModel::getTopLevelItemCount | ( | ) | const |
Definition at line 260 of file AbstractTreeModel.cpp.
TreeView * Isis::AbstractTreeModel::getView | ( | ) | const |
Definition at line 393 of file AbstractTreeModel.cpp.
int Isis::AbstractTreeModel::getVisibleItemCount | ( | InterestingItemsFlag | flags, |
bool | ignoreExpansion ) const |
Definition at line 264 of file AbstractTreeModel.cpp.
QSize Isis::AbstractTreeModel::getVisibleSize | ( | int | indentation | ) | const |
indentation is in pixels
Definition at line 407 of file AbstractTreeModel.cpp.
int Isis::AbstractTreeModel::getVisibleTopLevelItemCount | ( | ) | const |
Definition at line 285 of file AbstractTreeModel.cpp.
int Isis::AbstractTreeModel::indexOfVisibleItem | ( | AbstractTreeItem const * | item, |
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) const |
Definition at line 302 of file AbstractTreeModel.cpp.
bool Isis::AbstractTreeModel::isFiltering | ( | ) | const |
Definition at line 349 of file AbstractTreeModel.cpp.
bool Isis::AbstractTreeModel::isFrozen | ( | ) | const |
Definition at line 339 of file AbstractTreeModel.cpp.
bool Isis::AbstractTreeModel::isRebuilding | ( | ) | const |
Definition at line 354 of file AbstractTreeModel.cpp.
|
staticprivate |
Definition at line 496 of file AbstractTreeModel.cpp.
|
private |
Definition at line 530 of file AbstractTreeModel.cpp.
void Isis::AbstractTreeModel::queueRebuild | ( | ) |
Definition at line 344 of file AbstractTreeModel.cpp.
|
privateslot |
Definition at line 566 of file AbstractTreeModel.cpp.
|
private |
Definition at line 482 of file AbstractTreeModel.cpp.
void Isis::AbstractTreeModel::setFilter | ( | FilterWidget * | newFilter | ) |
Definition at line 359 of file AbstractTreeModel.cpp.
void Isis::AbstractTreeModel::setFrozen | ( | bool | newFrozenState | ) |
Definition at line 325 of file AbstractTreeModel.cpp.
void Isis::AbstractTreeModel::setGlobalSelection | ( | bool | selected, |
InterestingItemsFlag | flags = AllItems ) |
Definition at line 476 of file AbstractTreeModel.cpp.
|
inline |
Definition at line 82 of file AbstractTreeModel.h.
void Isis::AbstractTreeModel::stopWorking | ( | ) |
Definition at line 398 of file AbstractTreeModel.cpp.
|
private |
Definition at line 163 of file AbstractTreeModel.h.
|
private |
Definition at line 165 of file AbstractTreeModel.h.
|
private |
Definition at line 168 of file AbstractTreeModel.h.
Definition at line 160 of file AbstractTreeModel.h.
|
private |
Definition at line 169 of file AbstractTreeModel.h.
|
private |
Definition at line 170 of file AbstractTreeModel.h.
|
private |
Definition at line 158 of file AbstractTreeModel.h.
|
private |
Definition at line 172 of file AbstractTreeModel.h.
|
private |
Definition at line 166 of file AbstractTreeModel.h.
|
private |
Definition at line 167 of file AbstractTreeModel.h.
|
private |
Definition at line 162 of file AbstractTreeModel.h.
|
private |
Definition at line 173 of file AbstractTreeModel.h.
|
private |
Definition at line 171 of file AbstractTreeModel.h.
|
private |
Definition at line 159 of file AbstractTreeModel.h.
Definition at line 161 of file AbstractTreeModel.h.
|
private |
Definition at line 164 of file AbstractTreeModel.h.
|
protected |
Definition at line 154 of file AbstractTreeModel.h.