48 class AbstractTreeModel :
public QObject {
52 enum InterestingItems {
56 AllItems = PointItems | MeasureItems | ImageItems
58 Q_DECLARE_FLAGS(InterestingItemsFlag, InterestingItems)
64 virtual ~AbstractTreeModel();
67 InterestingItemsFlag = AllItems,
bool =
false);
71 InterestingItemsFlag = AllItems,
bool =
false);
72 QMutex *getMutex()
const;
73 int getItemCount(InterestingItemsFlag)
const;
74 int getTopLevelItemCount()
const;
75 int getVisibleItemCount(InterestingItemsFlag,
bool)
const;
76 int getVisibleTopLevelItemCount()
const;
78 void setDrivable(
bool drivableStatus);
79 bool isDrivable()
const;
80 bool isFiltering()
const;
81 bool isRebuilding()
const;
82 void setRebuilding(
bool running) { m_rebuildRunning = running; }
84 void setGlobalSelection(
bool selected, InterestingItemsFlag = AllItems);
88 InterestingItemsFlag = AllItems,
91 bool isFrozen()
const;
101 void modelModified();
102 void filterProgressChanged(
int);
103 void filterProgressRangeChanged(
int,
int);
104 void rebuildProgressChanged(
int);
105 void rebuildProgressRangeChanged(
int,
int);
115 int topLevelItemCount);
119 virtual void rebuildItems() = 0;
123 AbstractTreeModel(
const AbstractTreeModel &);
124 AbstractTreeModel &operator=(
const AbstractTreeModel &);
129 InterestingItemsFlag flags,
bool ignoreExpansion)
const;
131 InterestingItemsFlag flags);
132 static bool itemIsInteresting(
138 void applyFilterDone();
139 void rebuildItemsDone();
148 getRebuildWatcher()
const;
170 bool m_filterRunning;
171 bool m_rebuildRunning;
173 bool m_rebuildPending;
183 :
public std::function<bool(AbstractTreeItem *const &)> {
186 FilterFunctor(FilterFunctor
const &other);
189 FilterFunctor &operator=(FilterFunctor
const &);
192 static void updateTopLevelLinks(
182 class FilterFunctor {
…};