47 class AbstractTreeModel :
public QObject {
51 enum InterestingItems {
55 AllItems = PointItems | MeasureItems | ImageItems
57 Q_DECLARE_FLAGS(InterestingItemsFlag, InterestingItems)
63 virtual ~AbstractTreeModel();
66 InterestingItemsFlag = AllItems,
bool =
false);
70 InterestingItemsFlag = AllItems,
bool =
false);
71 QMutex *getMutex()
const;
72 int getItemCount(InterestingItemsFlag)
const;
73 int getTopLevelItemCount()
const;
74 int getVisibleItemCount(InterestingItemsFlag,
bool)
const;
75 int getVisibleTopLevelItemCount()
const;
77 void setDrivable(
bool drivableStatus);
78 bool isDrivable()
const;
79 bool isFiltering()
const;
80 bool isRebuilding()
const;
81 void setRebuilding(
bool running) { m_rebuildRunning = running; }
83 void setGlobalSelection(
bool selected, InterestingItemsFlag = AllItems);
87 InterestingItemsFlag = AllItems,
90 bool isFrozen()
const;
100 void modelModified();
101 void filterProgressChanged(
int);
102 void filterProgressRangeChanged(
int,
int);
103 void rebuildProgressChanged(
int);
104 void rebuildProgressRangeChanged(
int,
int);
114 int topLevelItemCount);
118 virtual void rebuildItems() = 0;
122 AbstractTreeModel(
const AbstractTreeModel &);
123 AbstractTreeModel &operator=(
const AbstractTreeModel &);
128 InterestingItemsFlag flags,
bool ignoreExpansion)
const;
130 InterestingItemsFlag flags);
131 static bool itemIsInteresting(
137 void applyFilterDone();
138 void rebuildItemsDone();
147 getRebuildWatcher()
const;
169 bool m_filterRunning;
170 bool m_rebuildRunning;
172 bool m_rebuildPending;
182 :
public std::function<bool(AbstractTreeItem *const &)> {
185 FilterFunctor(FilterFunctor
const &other);
188 FilterFunctor &operator=(FilterFunctor
const &);
191 static void updateTopLevelLinks(