|
Isis Developer Reference
|
Go to the documentation of this file. 1 #ifndef AbstractTableModel_H
2 #define AbstractTableModel_H
14 #include <QExplicitlySharedDataPointer>
16 #include <QtConcurrent>
26 template<
typename T >
class QList;
30 class AbstractTableDelegate;
31 class AbstractTreeModel;
34 class TableColumnList;
49 class LessThanFunctor;
69 TableColumn const *, QString valueToSave)
const = 0;
128 void sortStatusUpdated();
135 void setSorting(
bool sorting);
144 QTimer *m_sortStatusPoller;
145 LessThanFunctor *m_lessThanFunctor;
147 bool m_sortingEnabled;
152 static const int SORT_UPDATE_FREQUENCY = 50;
156 class LessThanFunctorData;
163 class LessThanFunctor :
public std::binary_function <
164 AbstractTreeItem *const &, AbstractTreeItem *const &, bool > {
167 LessThanFunctor(LessThanFunctor
const &);
170 int getCompareCount()
const;
177 LessThanFunctor &operator=(LessThanFunctor
const &);
182 QExplicitlySharedDataPointer<LessThanFunctorData> m_sharedData;
196 LessThanFunctorData();
197 LessThanFunctorData(LessThanFunctorData
const &);
198 ~LessThanFunctorData();
200 int getCompareCount()
const;
201 void incrementCompareCount();
203 void setInterrupted(
bool);
208 QAtomicInt m_compareCount;
209 QAtomicInt m_interruptFlag;
224 class SortingCanceledException :
public QException {
226 void raise()
const {
throw *
this; }
228 return new SortingCanceledException(*
this);
virtual const AbstractTableDelegate * getDelegate() const
Definition: AbstractTableModel.cpp:164
AbstractTreeModel * getDataModel()
Definition: AbstractTableModel.cpp:207
virtual int sortLimit() const
Definition: AbstractTableModel.cpp:136
void userWarning(AbstractTableModel::Warning)
virtual QList< AbstractTreeItem * > getItems(AbstractTreeItem *, AbstractTreeItem *)=0
Warning
Definition: AbstractTableModel.h:54
int size() const
Definition: TableColumnList.cpp:166
virtual int indexOfVisibleItem(AbstractTreeItem const *item) const =0
void sortProgressRangeChanged(int, int)
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Base class for tree models.
Definition: AbstractTreeModel.h:47
@ None
Definition: AbstractTableModel.h:55
void rebuildProgressChanged(int)
virtual void setSortingEnabled(bool)
Definition: AbstractTableModel.cpp:128
A leaf item that is not ready for user interaction.
Definition: BusyLeafItem.h:33
void handleTreeSelectionChanged(QList< AbstractTreeItem * > newlySelectedItems, AbstractTreeItem::InternalPointerType)
Definition: AbstractTableModel.cpp:303
@ SortingDisabled
Definition: AbstractTableModel.h:56
virtual bool sortingIsEnabled() const
Definition: AbstractTableModel.cpp:123
virtual void sort()
Definition: AbstractTableModel.cpp:174
virtual QList< AbstractTreeItem * > getSortedItems(int, int, AbstractTreeModel::InterestingItems)
Definition: AbstractTableModel.cpp:219
void sortProgressChanged(int)
void treeSelectionChanged(QList< AbstractTreeItem * >)
Definition: TableColumn.h:26
virtual void reverseOrder(TableColumn *)
Definition: AbstractTableModel.cpp:199
void rebuildProgressRangeChanged(int, int)
Translates the tree model into a table model.
Definition: AbstractTableModel.h:48
virtual bool sortingOn() const
Definition: AbstractTableModel.cpp:149
virtual TableColumnList * createColumns()=0
virtual QList< AbstractTreeItem * > getItems(int, int)=0
void applyFilter()
Definition: AbstractTreeModel.cpp:441
@ Double
Definition: PixelType.h:36
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Definition: TableColumnList.h:30
virtual bool isSorting() const
Definition: AbstractTableModel.cpp:113
virtual void rebuildSort()
Definition: AbstractTableModel.cpp:424
virtual TableColumnList * getColumns()
Definition: AbstractTableModel.cpp:154
bool isRebuilding() const
Definition: AbstractTreeModel.cpp:360
void tableSelectionChanged(QList< AbstractTreeItem * >)
virtual int getVisibleRowCount() const =0
Isis exception class.
Definition: IException.h:91
#define ASSERT(x)
Definition: IsisDebug.h:134
void filterProgressChanged(int)
virtual QString getWarningMessage(AbstractTreeItem const *, TableColumn const *, QString valueToSave) const =0
virtual QList< AbstractTreeItem * > getSelectedItems()=0
bool isFiltering() const
Definition: AbstractTreeModel.cpp:355
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
void filterCountsChanged(int visibleRows, int totalRows)
virtual void applyFilter()
Definition: AbstractTableModel.cpp:169
AbstractTableModel(AbstractTreeModel *, AbstractTableDelegate *)
Definition: AbstractTableModel.cpp:35
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
InterestingItems
Definition: AbstractTreeModel.h:51
Base class for delegates which create, read, and save data in the tables.
Definition: AbstractTableDelegate.h:33
@ SortingTableSizeLimitReached
Definition: AbstractTableModel.h:57
virtual InternalPointerType getPointerType() const =0
virtual void setGlobalSelection(bool selected)=0
Adds specific functionality to C++ strings.
Definition: IString.h:165
QList< TableColumn * > getSortingOrder()
Definition: TableColumnList.cpp:241
virtual void setSortLimit(int)
Definition: AbstractTableModel.cpp:141
virtual void updateSort()
Definition: AbstractTableModel.cpp:203
Base class for an item in the tree.
Definition: AbstractTreeItem.h:39
QList< AbstractTreeItem * > getItems(int, int, InterestingItemsFlag=AllItems, bool=false)
Definition: AbstractTreeModel.cpp:121
InternalPointerType
Definition: AbstractTreeItem.h:44
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
virtual bool isFiltering() const
Definition: AbstractTableModel.cpp:118
void filterProgressRangeChanged(int, int)
virtual ~AbstractTableModel()
Definition: AbstractTableModel.cpp:80