Isis 3 Programmer Reference
Isis::AbstractTableModel Class Referenceabstract

Translates the tree model into a table model. More...

#include <AbstractTableModel.h>

Inheritance diagram for Isis::AbstractTableModel:
Inheritance graph
Collaboration diagram for Isis::AbstractTableModel:
Collaboration graph

Classes

class  LessThanFunctor
 
class  LessThanFunctorData
 For explicit sharing of the comparison counter between multiple copies of a LessThanFunctor object. More...
 
class  SortingCanceledException
 Thread-safe exception for cancelling sorting. More...
 

Public Types

enum  Warning { None = 0 , SortingDisabled , SortingTableSizeLimitReached }
 

Public Slots

virtual void setGlobalSelection (bool selected)=0
 
virtual void applyFilter ()
 
virtual void sort ()
 
virtual void reverseOrder (TableColumn *)
 
virtual void updateSort ()
 
virtual void rebuildSort ()
 

Signals

void modelModified ()
 
void filterProgressChanged (int)
 
void rebuildProgressChanged (int)
 
void sortProgressChanged (int)
 
void filterProgressRangeChanged (int, int)
 
void rebuildProgressRangeChanged (int, int)
 
void sortProgressRangeChanged (int, int)
 
void filterCountsChanged (int visibleRows, int totalRows)
 
void treeSelectionChanged (QList< AbstractTreeItem * >)
 
void tableSelectionChanged (QList< AbstractTreeItem * >)
 
void userWarning (AbstractTableModel::Warning)
 

Public Member Functions

 AbstractTableModel (AbstractTreeModel *, AbstractTableDelegate *)
 
virtual QList< AbstractTreeItem * > getItems (int, int)=0
 
virtual QList< AbstractTreeItem * > getItems (AbstractTreeItem *, AbstractTreeItem *)=0
 
virtual QList< AbstractTreeItem * > getSelectedItems ()=0
 
virtual int getVisibleRowCount () const =0
 
virtual QString getWarningMessage (AbstractTreeItem const *, TableColumn const *, QString valueToSave) const =0
 
virtual int indexOfVisibleItem (AbstractTreeItem const *item) const =0
 
virtual bool isSorting () const
 
virtual bool isFiltering () const
 
virtual bool sortingIsEnabled () const
 
virtual void setSortingEnabled (bool)
 
virtual int sortLimit () const
 
virtual void setSortLimit (int)
 
virtual bool sortingOn () const
 
virtual TableColumnListgetColumns ()
 
virtual const AbstractTableDelegategetDelegate () const
 

Protected Member Functions

virtual TableColumnListcreateColumns ()=0
 
AbstractTreeModelgetDataModel ()
 
const AbstractTreeModelgetDataModel () const
 
virtual QList< AbstractTreeItem * > getSortedItems (int, int, AbstractTreeModel::InterestingItems)
 
virtual QList< AbstractTreeItem * > getSortedItems (AbstractTreeItem *, AbstractTreeItem *, AbstractTreeModel::InterestingItems)
 
void handleTreeSelectionChanged (QList< AbstractTreeItem * > newlySelectedItems, AbstractTreeItem::InternalPointerType)
 

Private Slots

void cancelSort ()
 
void itemsLost ()
 
void sortStatusUpdated ()
 
void sortFinished ()
 

Private Member Functions

 AbstractTableModel (AbstractTableModel const &)
 
AbstractTableModeloperator= (AbstractTableModel const &)
 
QList< AbstractTreeItem * > doSort (QList< AbstractTreeItem * >)
 
void nullify ()
 
void setSorting (bool sorting)
 

Private Attributes

AbstractTreeModelm_dataModel
 
AbstractTableDelegatem_delegate
 
QList< AbstractTreeItem * > * m_sortedItems
 
BusyLeafItemm_busyItem
 
TableColumnListm_columns
 
QTimer * m_sortStatusPoller
 
LessThanFunctorm_lessThanFunctor
 
bool m_sortingEnabled
 
int m_sortLimit
 
bool m_sorting
 
QFutureWatcher< QList< AbstractTreeItem * > > * m_sortingWatcher
 

Static Private Attributes

static const int SORT_UPDATE_FREQUENCY = 50
 

Detailed Description

Translates the tree model into a table model.

This class acts as a proxy model for the abstract tree model by allowing the user to access data in a table-like fashion (by sorted row).

Author
????-??-?? Eric Hyer
History

2012-09-28 Kimberly Oyama - Changed member variables to be prefixed with "m_".

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

Definition at line 48 of file AbstractTableModel.h.

Member Enumeration Documentation

◆ Warning

enum Isis::AbstractTableModel::Warning

Definition at line 54 of file AbstractTableModel.h.

Constructor & Destructor Documentation

◆ AbstractTableModel()

Isis::AbstractTableModel::AbstractTableModel ( AbstractTreeModel * model,
AbstractTableDelegate * someDelegate )

Definition at line 33 of file AbstractTableModel.cpp.

◆ ~AbstractTableModel()

Isis::AbstractTableModel::~AbstractTableModel ( )
virtual

Definition at line 78 of file AbstractTableModel.cpp.

Member Function Documentation

◆ applyFilter

void Isis::AbstractTableModel::applyFilter ( )
virtualslot

Definition at line 167 of file AbstractTableModel.cpp.

◆ cancelSort

void Isis::AbstractTableModel::cancelSort ( )
privateslot

Definition at line 339 of file AbstractTableModel.cpp.

◆ doSort()

QList< AbstractTreeItem * > Isis::AbstractTableModel::doSort ( QList< AbstractTreeItem * > itemsToSort)
private

Definition at line 353 of file AbstractTableModel.cpp.

◆ getColumns()

TableColumnList * Isis::AbstractTableModel::getColumns ( )
virtual

Definition at line 152 of file AbstractTableModel.cpp.

◆ getDataModel() [1/2]

AbstractTreeModel * Isis::AbstractTableModel::getDataModel ( )
protected

Definition at line 205 of file AbstractTableModel.cpp.

◆ getDataModel() [2/2]

const AbstractTreeModel * Isis::AbstractTableModel::getDataModel ( ) const
protected

Definition at line 210 of file AbstractTableModel.cpp.

◆ getDelegate()

const AbstractTableDelegate * Isis::AbstractTableModel::getDelegate ( ) const
virtual

Definition at line 162 of file AbstractTableModel.cpp.

◆ getSortedItems() [1/2]

QList< AbstractTreeItem * > Isis::AbstractTableModel::getSortedItems ( AbstractTreeItem * item1,
AbstractTreeItem * item2,
AbstractTreeModel::InterestingItems flags )
protectedvirtual

Definition at line 237 of file AbstractTableModel.cpp.

◆ getSortedItems() [2/2]

QList< AbstractTreeItem * > Isis::AbstractTableModel::getSortedItems ( int start,
int end,
AbstractTreeModel::InterestingItems flags )
protectedvirtual

Definition at line 215 of file AbstractTableModel.cpp.

◆ handleTreeSelectionChanged()

void Isis::AbstractTableModel::handleTreeSelectionChanged ( QList< AbstractTreeItem * > newlySelectedItems,
AbstractTreeItem::InternalPointerType pointerType )
protected

Definition at line 299 of file AbstractTableModel.cpp.

◆ isFiltering()

bool Isis::AbstractTableModel::isFiltering ( ) const
virtual

Definition at line 116 of file AbstractTableModel.cpp.

◆ isSorting()

bool Isis::AbstractTableModel::isSorting ( ) const
virtual

Definition at line 111 of file AbstractTableModel.cpp.

◆ itemsLost

void Isis::AbstractTableModel::itemsLost ( )
privateslot

Definition at line 347 of file AbstractTableModel.cpp.

◆ nullify()

void Isis::AbstractTableModel::nullify ( )
private

Definition at line 402 of file AbstractTableModel.cpp.

◆ rebuildSort

void Isis::AbstractTableModel::rebuildSort ( )
virtualslot

Definition at line 419 of file AbstractTableModel.cpp.

◆ reverseOrder

void Isis::AbstractTableModel::reverseOrder ( TableColumn * column)
virtualslot

Definition at line 197 of file AbstractTableModel.cpp.

◆ setSorting()

void Isis::AbstractTableModel::setSorting ( bool sorting)
private

Definition at line 414 of file AbstractTableModel.cpp.

◆ setSortingEnabled()

void Isis::AbstractTableModel::setSortingEnabled ( bool enabled)
virtual

Definition at line 126 of file AbstractTableModel.cpp.

◆ setSortLimit()

void Isis::AbstractTableModel::setSortLimit ( int limit)
virtual

Definition at line 139 of file AbstractTableModel.cpp.

◆ sort

void Isis::AbstractTableModel::sort ( )
virtualslot

Definition at line 172 of file AbstractTableModel.cpp.

◆ sortFinished

void Isis::AbstractTableModel::sortFinished ( )
privateslot

Definition at line 320 of file AbstractTableModel.cpp.

◆ sortingIsEnabled()

bool Isis::AbstractTableModel::sortingIsEnabled ( ) const
virtual

Definition at line 121 of file AbstractTableModel.cpp.

◆ sortingOn()

bool Isis::AbstractTableModel::sortingOn ( ) const
virtual

Definition at line 147 of file AbstractTableModel.cpp.

◆ sortLimit()

int Isis::AbstractTableModel::sortLimit ( ) const
virtual

Definition at line 134 of file AbstractTableModel.cpp.

◆ sortStatusUpdated

void Isis::AbstractTableModel::sortStatusUpdated ( )
privateslot

Definition at line 314 of file AbstractTableModel.cpp.

◆ updateSort

void Isis::AbstractTableModel::updateSort ( )
virtualslot

Definition at line 201 of file AbstractTableModel.cpp.

Member Data Documentation

◆ m_busyItem

BusyLeafItem* Isis::AbstractTableModel::m_busyItem
private

Definition at line 142 of file AbstractTableModel.h.

◆ m_columns

TableColumnList* Isis::AbstractTableModel::m_columns
private

Definition at line 143 of file AbstractTableModel.h.

◆ m_dataModel

AbstractTreeModel* Isis::AbstractTableModel::m_dataModel
private

Definition at line 139 of file AbstractTableModel.h.

◆ m_delegate

AbstractTableDelegate* Isis::AbstractTableModel::m_delegate
private

Definition at line 140 of file AbstractTableModel.h.

◆ m_lessThanFunctor

LessThanFunctor* Isis::AbstractTableModel::m_lessThanFunctor
private

Definition at line 145 of file AbstractTableModel.h.

◆ m_sortedItems

QList< AbstractTreeItem * >* Isis::AbstractTableModel::m_sortedItems
private

Definition at line 141 of file AbstractTableModel.h.

◆ m_sorting

bool Isis::AbstractTableModel::m_sorting
private

Definition at line 149 of file AbstractTableModel.h.

◆ m_sortingEnabled

bool Isis::AbstractTableModel::m_sortingEnabled
private

Definition at line 147 of file AbstractTableModel.h.

◆ m_sortingWatcher

QFutureWatcher< QList< AbstractTreeItem * > >* Isis::AbstractTableModel::m_sortingWatcher
private

Definition at line 150 of file AbstractTableModel.h.

◆ m_sortLimit

int Isis::AbstractTableModel::m_sortLimit
private

Definition at line 148 of file AbstractTableModel.h.

◆ m_sortStatusPoller

QTimer* Isis::AbstractTableModel::m_sortStatusPoller
private

Definition at line 144 of file AbstractTableModel.h.

◆ SORT_UPDATE_FREQUENCY

const int Isis::AbstractTableModel::SORT_UPDATE_FREQUENCY = 50
staticprivate

Definition at line 152 of file AbstractTableModel.h.


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