So far all subclasses implemented filtering on their own which doesn't
make much sense. Now one can set filter keywords and a filter type for
all ResourceModels. Subclasses simply have to call
ResourceModel::itemMatchesFilter( ResourceItem ) in order to determine
whether an item should be hidden or not. Additionally they have to
implement the updateFilters() method in order to update their internal
management data each time the filters change.
Making setFilter(QString) a pure virtual public slot forces all derived
models to implement this slot. Furthermore it allows external GUI code
to connect e.g. QLineEdit::textChanged(QString) signal directly to the
setFilter(...) method.
The new generic ItemRelation template class replaces ResourceTreeItem's,
resulting in cleaner and better organized code.
In the future other kind of items can be linked hierarchically using
the ItemRelation template.
All functionality which is not related to a ResourceTreeModel has been
moved into ResourceModel base class, allowing to share them in other
resource model implementations.
Added initial support for dragging ResourceItems. This is achieved by
using drag'n'drop support offered by Qt's model/view technology.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
Naming classes like ResourcesItem or ResourcesDatabase is bad style,
therefore rename all classes and files to be Resource*.
Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>