1 #ifndef AbstractTableModel_H
2 #define AbstractTableModel_H
14 #include <QExplicitlySharedDataPointer>
16 #include <QtConcurrent>
19 #include "AbstractTreeItem.h"
20 #include "AbstractTreeModel.h"
26 template<
typename T >
class QList;
30 class AbstractTableDelegate;
31 class AbstractTreeModel;
34 class TableColumnList;
57 SortingTableSizeLimitReached
67 virtual int getVisibleRowCount()
const = 0;
69 TableColumn const *, QString valueToSave)
const = 0;
72 virtual bool isSorting()
const;
73 virtual bool isFiltering()
const;
74 virtual bool sortingIsEnabled()
const;
75 virtual void setSortingEnabled(
bool);
76 virtual int sortLimit()
const;
77 virtual void setSortLimit(
int);
78 virtual bool sortingOn()
const;
84 virtual void setGlobalSelection(
bool selected) = 0;
85 virtual void applyFilter();
88 virtual void updateSort();
89 virtual void rebuildSort();
94 void filterProgressChanged(
int);
95 void rebuildProgressChanged(
int);
96 void sortProgressChanged(
int);
97 void filterProgressRangeChanged(
int,
int);
98 void rebuildProgressRangeChanged(
int,
int);
99 void sortProgressRangeChanged(
int,
int);
100 void filterCountsChanged(
int visibleRows,
int totalRows);
104 void userWarning(AbstractTableModel::Warning);
111 AbstractTreeModel::InterestingItems);
114 AbstractTreeModel::InterestingItems);
115 void handleTreeSelectionChanged(
117 AbstractTreeItem::InternalPointerType);
128 void sortStatusUpdated();
135 void setSorting(
bool sorting);
144 QTimer *m_sortStatusPoller;
147 bool m_sortingEnabled;
152 static const int SORT_UPDATE_FREQUENCY = 50;
164 AbstractTreeItem *const &, AbstractTreeItem *const &, bool > {
170 int getCompareCount()
const;
182 QExplicitlySharedDataPointer<LessThanFunctorData> m_sharedData;
200 int getCompareCount()
const;
201 void incrementCompareCount();
203 void setInterrupted(
bool);
208 QAtomicInt m_compareCount;
209 QAtomicInt m_interruptFlag;
226 void raise()
const {
throw *
this; }