1 #ifndef AbstractTableModel_H 2 #define AbstractTableModel_H 6 #include <QExplicitlySharedDataPointer> 8 #include <QtConcurrent> 11 #include "AbstractTreeItem.h" 12 #include "AbstractTreeModel.h" 18 template<
typename T >
class QList;
22 class AbstractTableDelegate;
23 class AbstractTreeModel;
26 class TableColumnList;
49 SortingTableSizeLimitReached
59 virtual int getVisibleRowCount()
const = 0;
61 TableColumn const *, QString valueToSave)
const = 0;
64 virtual bool isSorting()
const;
65 virtual bool isFiltering()
const;
66 virtual bool sortingIsEnabled()
const;
67 virtual void setSortingEnabled(
bool);
68 virtual int sortLimit()
const;
69 virtual void setSortLimit(
int);
70 virtual bool sortingOn()
const;
76 virtual void setGlobalSelection(
bool selected) = 0;
77 virtual void applyFilter();
80 virtual void updateSort();
81 virtual void rebuildSort();
86 void filterProgressChanged(
int);
87 void rebuildProgressChanged(
int);
88 void sortProgressChanged(
int);
89 void filterProgressRangeChanged(
int,
int);
90 void rebuildProgressRangeChanged(
int,
int);
91 void sortProgressRangeChanged(
int,
int);
92 void filterCountsChanged(
int visibleRows,
int totalRows);
96 void userWarning(AbstractTableModel::Warning);
103 AbstractTreeModel::InterestingItems);
106 AbstractTreeModel::InterestingItems);
107 void handleTreeSelectionChanged(
109 AbstractTreeItem::InternalPointerType);
120 void sortStatusUpdated();
127 void setSorting(
bool sorting);
136 QTimer *m_sortStatusPoller;
139 bool m_sortingEnabled;
144 static const int SORT_UPDATE_FREQUENCY = 50;
156 AbstractTreeItem *const &, AbstractTreeItem *const &, bool > {
162 int getCompareCount()
const;
174 QExplicitlySharedDataPointer<LessThanFunctorData> m_sharedData;
192 int getCompareCount()
const;
193 void incrementCompareCount();
195 void setInterrupted(
bool);
200 QAtomicInt m_compareCount;
201 QAtomicInt m_interruptFlag;
218 void raise()
const {
throw *
this; }
Base class for tree models.
Thread-safe exception for cancelling sorting.
For explicit sharing of the comparison counter between multiple copies of a LessThanFunctor object...
Translates the tree model into a table model.
A leaf item that is not ready for user interaction.
Base class for delegates which create, read, and save data in the tables.
Namespace for ISIS/Bullet specific routines.
Base class for an item in the tree.