Commit Graph

6 Commits

Author SHA1 Message Date
Tobias Doerffel
d3bb3ff13a ResourceModel: implement filter functionality
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.
2009-08-21 18:10:38 +02:00
Tobias Doerffel
13e9876b38 ResourceModel: made setFilter(...) a pure virtual public slot
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.
2009-08-17 23:06:07 +02:00
Tobias Doerffel
f873ad2693 ItemRelation: new template for making up relations between ResourceItems
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.
2009-08-17 20:44:36 +02:00
Tobias Doerffel
3110e2188d Resource[Tree]Model: moved common functionality into base class
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.
2009-08-17 16:53:14 +02:00
Tobias Doerffel
dc90c899aa ResourcesTreeModel: support for dragging ResourceItems
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>
2009-06-22 23:45:26 +02:00
Tobias Doerffel
ea2b165cbd Renamed Resources* classes to Resource* and renamed files
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>
2009-06-04 22:53:05 +02:00