Isis Developer Reference
|
Base class for tree models. More...
#include <AbstractTreeModel.h>
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) | |
virtual | ~AbstractTreeModel () |
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 |
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.
Isis::AbstractTreeModel::AbstractTreeModel | ( | ControlNet * | controlNet, |
TreeView * | v, | ||
QObject * | parent = 0 ) |
|
virtual |
References rootItem.
|
slot |
|
signal |
|
protected |
References rootItem.
|
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.
Referenced by applyFilter(), Isis::ImageImageTreeModel::rebuildItems(), Isis::ImagePointTreeModel::rebuildItems(), and Isis::PointMeasureTreeModel::rebuildItems().
|
signal |
Referenced by AbstractTreeModel().
|
signal |
Referenced by AbstractTreeModel().
|
protected |
|
protected |
int Isis::AbstractTreeModel::getItemCount | ( | InterestingItemsFlag | flags | ) | const |
References getItemCount(), and rootItem.
Referenced by getItemCount().
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems | ( | AbstractTreeItem * | item1, |
AbstractTreeItem * | item2, | ||
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) |
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getItems | ( | int | start, |
int | end, | ||
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) |
References Isis::AbstractParentItem::childCount(), Isis::AbstractParentItem::getFirstVisibleChild(), Isis::AbstractTreeItem::getLastVisibleChild(), Isis::RootItem::getLastVisibleFilteredItem(), isFiltering(), Isis::AbstractTreeItem::parent(), and rootItem.
Referenced by Isis::CnetEditorWidget::filteredNetwork(), Isis::AbstractTableModel::getSortedItems(), Isis::AbstractTableModel::getSortedItems(), and Isis::TreeViewContent::mousePressEvent().
QMutex * Isis::AbstractTreeModel::getMutex | ( | ) | const |
|
protected |
QList< AbstractTreeItem * > Isis::AbstractTreeModel::getSelectedItems | ( | InterestingItemsFlag | flags = AllItems, |
bool | ignoreExpansion = false ) |
int Isis::AbstractTreeModel::getTopLevelItemCount | ( | ) | const |
TreeView * Isis::AbstractTreeModel::getView | ( | ) | const |
int Isis::AbstractTreeModel::getVisibleItemCount | ( | InterestingItemsFlag | flags, |
bool | ignoreExpansion ) const |
References Isis::AbstractParentItem::getFirstVisibleChild(), isFiltering(), and rootItem.
Referenced by Isis::MeasureTableModel::getVisibleRowCount(), and Isis::PointTableModel::getVisibleRowCount().
QSize Isis::AbstractTreeModel::getVisibleSize | ( | int | indentation | ) | const |
indentation is in pixels
References AllItems, Isis::AbstractParentItem::getFirstVisibleChild(), isFiltering(), and rootItem.
Referenced by Isis::TreeViewContent::refresh().
int Isis::AbstractTreeModel::getVisibleTopLevelItemCount | ( | ) | const |
int Isis::AbstractTreeModel::indexOfVisibleItem | ( | AbstractTreeItem const * | item, |
InterestingItemsFlag | flags = AllItems, | ||
bool | ignoreExpansion = false ) const |
References Isis::AbstractParentItem::getFirstVisibleChild(), isFiltering(), and rootItem.
Referenced by Isis::MeasureTableModel::indexOfVisibleItem(), and Isis::PointTableModel::indexOfVisibleItem().
bool Isis::AbstractTreeModel::isDrivable | ( | ) | const |
bool Isis::AbstractTreeModel::isFiltering | ( | ) | const |
bool Isis::AbstractTreeModel::isFrozen | ( | ) | const |
bool Isis::AbstractTreeModel::isRebuilding | ( | ) | const |
Referenced by Isis::AbstractTableModel::sort().
|
signal |
void Isis::AbstractTreeModel::queueRebuild | ( | ) |
|
pure virtual |
Implemented in Isis::ImageImageTreeModel, Isis::ImagePointTreeModel, and Isis::PointMeasureTreeModel.
Referenced by setFrozen().
|
signal |
Referenced by AbstractTreeModel().
|
signal |
Referenced by AbstractTreeModel().
void Isis::AbstractTreeModel::setDrivable | ( | bool | drivableStatus | ) |
void Isis::AbstractTreeModel::setFilter | ( | FilterWidget * | newFilter | ) |
References applyFilter().
void Isis::AbstractTreeModel::setFrozen | ( | bool | newFrozenState | ) |
References applyFilter(), and rebuildItems().
Referenced by Isis::CnetEditorWidget::setTablesFrozen().
void Isis::AbstractTreeModel::setGlobalSelection | ( | bool | selected, |
InterestingItemsFlag | flags = AllItems ) |
|
inline |
void Isis::AbstractTreeModel::stopWorking | ( | ) |
|
signal |
|
signal |
|
protected |