Commit Graph

6 Commits

Author SHA1 Message Date
Tobias Doerffel
91cc2d27aa Minor comment and coding style fixes
Minor comment and coding style fixes in ResourceModel and ResourceBrowser.
2009-10-27 00:34:06 +01:00
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
26be3b0e81 ResourceModel: made m_db pointer non-modifieable by subclasses
Subclasses have to call ResourceModel::db() now in order to get the
pointer to the DB, the model is operating on.
2009-08-17 17:14:03 +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