1#ifndef AbstractTreeModel_H
2#define AbstractTreeModel_H
19template<
typename A,
typename B >
struct QPair;
25 class AbstractTreeItem;
66 InterestingItemsFlag =
AllItems,
bool =
false);
70 InterestingItemsFlag =
AllItems,
bool =
false);
114 int topLevelItemCount);
128 InterestingItemsFlag flags,
bool ignoreExpansion)
const;
130 InterestingItemsFlag flags);
131 static bool itemIsInteresting(
137 void applyFilterDone();
138 void rebuildItemsDone();
169 bool m_filterRunning;
170 bool m_rebuildRunning;
172 bool m_rebuildPending;
182 :
public std::unary_function< AbstractTreeItem *const &, bool > {
185 FilterFunctor(FilterFunctor
const &other);
188 FilterFunctor &operator=(FilterFunctor
const &);
191 static void updateTopLevelLinks(
201 Q_DECLARE_OPERATORS_FOR_FLAGS(AbstractTreeModel::InterestingItemsFlag)
Base class for an item in the tree.
Definition: AbstractTreeItem.h:39
Base class for tree models.
Definition: AbstractTreeModel.h:47
QList< AbstractTreeItem * > getSelectedItems(InterestingItemsFlag=AllItems, bool=false)
Definition: AbstractTreeModel.cpp:228
RootItem * getRootItem() const
Definition: AbstractTreeModel.cpp:388
void filterProgressRangeChanged(int, int)
int getItemCount(InterestingItemsFlag) const
Definition: AbstractTreeModel.cpp:255
void setRebuilding(bool running)
Definition: AbstractTreeModel.h:81
void setFrozen(bool)
Definition: AbstractTreeModel.cpp:325
QList< AbstractTreeItem * > getItems(int, int, InterestingItemsFlag=AllItems, bool=false)
Definition: AbstractTreeModel.cpp:118
void setDrivable(bool drivableStatus)
void filterProgressChanged(int)
int indexOfVisibleItem(AbstractTreeItem const *item, InterestingItemsFlag=AllItems, bool=false) const
Definition: AbstractTreeModel.cpp:302
void filterCountsChanged(int visibleTopLevelItemCount, int topLevelItemCount)
This signal is emitted after filtering to provide the number of visible top-level items remaining aft...
RootItem * rootItem
Definition: AbstractTreeModel.h:153
void clear()
Definition: AbstractTreeModel.cpp:369
void setFilter(FilterWidget *newFilter)
Definition: AbstractTreeModel.cpp:359
TreeView * getView() const
Definition: AbstractTreeModel.cpp:393
FilterWidget * getFilterWidget() const
QMutex * getMutex() const
Definition: AbstractTreeModel.cpp:250
InterestingItems
Definition: AbstractTreeModel.h:51
@ MeasureItems
Definition: AbstractTreeModel.h:53
@ AllItems
Definition: AbstractTreeModel.h:55
@ ImageItems
Definition: AbstractTreeModel.h:54
@ PointItems
Definition: AbstractTreeModel.h:52
int getTopLevelItemCount() const
Definition: AbstractTreeModel.cpp:260
void setGlobalSelection(bool selected, InterestingItemsFlag=AllItems)
Definition: AbstractTreeModel.cpp:476
int getVisibleTopLevelItemCount() const
Definition: AbstractTreeModel.cpp:285
bool isFiltering() const
Definition: AbstractTreeModel.cpp:349
QFutureWatcher< QAtomicPointer< RootItem > > * getRebuildWatcher() const
Definition: AbstractTreeModel.cpp:383
void rebuildProgressChanged(int)
virtual void rebuildItems()=0
bool isRebuilding() const
Definition: AbstractTreeModel.cpp:354
void queueRebuild()
Definition: AbstractTreeModel.cpp:344
int getVisibleItemCount(InterestingItemsFlag, bool) const
Definition: AbstractTreeModel.cpp:264
bool isFrozen() const
Definition: AbstractTreeModel.cpp:339
void rebuildProgressRangeChanged(int, int)
virtual ~AbstractTreeModel()
Definition: AbstractTreeModel.cpp:85
QSize getVisibleSize(int indentation) const
indentation is in pixels
Definition: AbstractTreeModel.cpp:407
void treeSelectionChanged(QList< AbstractTreeItem * >)
void applyFilter()
Definition: AbstractTreeModel.cpp:434
void stopWorking()
Definition: AbstractTreeModel.cpp:398
void tableSelectionChanged(QList< AbstractTreeItem * >)
ControlNet * getControlNetwork() const
Definition: AbstractTreeModel.cpp:377
A leaf item that is not ready for user interaction.
Definition: BusyLeafItem.h:33
a control network
Definition: ControlNet.h:258
The root of a tree.
Definition: RootItem.h:37
Definition: TreeView.h:31
This is free and unencumbered software released into the public domain.
Definition: ConcurrentControlNetReader.h:20
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23