FilterModel Class Reference

A model to filter the nodes. More...

#include <filtermodel.h>

List of all members.

Public Slots

void setFilterFixedString (const QString &pattern)
void setFilterCreatedDateEnabled (bool enabled)
void setFilterCreatedFromDate (const QDate &date)
void setFilterCreatedToDate (const QDate &date)
void setFilterModifiedDateEnabled (bool enabled)
void setFilterModifiedFromDate (const QDate &date)
void setFilterModifiedToDate (const QDate &date)
void setFilterMimetypeEnabled (bool enabled)
void setFilterMimetypeString (const QString &type)
void setFilterFulltextEnabled (bool enabled)
void addLabel (QString label)
void removeLabel (QString label)
void addBannedLabel (QString label)
void clearLabels ()
void removeBannedLabel (QString label)
void clearBannedLabels ()

Public Member Functions

 FilterModel (QObject *parent=0)
 ~FilterModel ()

Protected Member Functions

virtual bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const

Detailed Description

A model to filter the nodes.

This model is used to filter the nodes. It is a implementation of the QSortFilterProxyModel. For more information take a look at the QT documentation.

Authors:
Yves Adler, Manuel Unglaub

Constructor & Destructor Documentation

FilterModel::FilterModel ( QObject *  parent = 0  ) 

The constructor.

Constructs the FilterModel which is a child of parent.

Parameters:
parent The parent of this FilterModel.
FilterModel::~FilterModel (  ) 

The destructor.

Destroys the object.


Member Function Documentation

void FilterModel::addBannedLabel ( QString  label  )  [slot]

Add a label to the filter. The node must not contain this label to pass the filter.

Parameters:
label This label will be added to the filter.
void FilterModel::addLabel ( QString  label  )  [slot]

Add a label to the filter. The node must contain all added labels to pass the filter.

Parameters:
label This label will be added to this filter.
void FilterModel::clearBannedLabels (  )  [slot]

Remove all banned labels from this filter.

void FilterModel::clearLabels (  )  [slot]

Remove all labels from this filter.

bool FilterModel::filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const [protected, virtual]

Returns true if the item in the row indicated by the given source_row and source_parent should be included in the model; otherwise returns false.

Parameters:
source_row The source row.
source_parent The source parent index.
Returns:
true if the item in the row indicated by the given source_row and source_parent should be indclude in the model.
void FilterModel::removeBannedLabel ( QString  label  )  [slot]

Remove a label form the filter. This label will no longer be relevant for the filter.

Parameters:
label This label will be removed from this filter.
void FilterModel::removeLabel ( QString  label  )  [slot]

Remove a label from the filter. This label will no longer be relevant for the filter.

Parameters:
label This label will be removed from this filter.
void FilterModel::setFilterCreatedDateEnabled ( bool  enabled  )  [slot]

Enable or disable filtering by creation date.

Parameters:
enabled If true filter by creation date. Deactivate if false.
void FilterModel::setFilterCreatedFromDate ( const QDate &  date  )  [slot]

Set the from boundary of the creation date filter.

Parameters:
date The from boundary of the creation date filter.
void FilterModel::setFilterCreatedToDate ( const QDate &  date  )  [slot]

Set the to boundary of the creation date filter.

Parameters:
date The to boundary of the creation date filter.
void FilterModel::setFilterFixedString ( const QString &  pattern  )  [slot]

Sets the fixed string used to filter the contents of the source model to the given pattern.

Parameters:
pattern Tha pattern to filter the contents of the source model.
void FilterModel::setFilterFulltextEnabled ( bool  enabled  )  [slot]

Enable or disable the fulltext filtering.

Parameters:
enabled If true use the whole content for the filtering. Deactivate if false.
void FilterModel::setFilterMimetypeEnabled ( bool  enabled  )  [slot]

Enable or disable filtering by MIME type.

Parameters:
enabled If true filter by MIME type. Deactivate if false.
void FilterModel::setFilterMimetypeString ( const QString &  type  )  [slot]

Set the MIME type used to filter the contents of the source model.

Parameters:
type The MIME type for the filtering.
void FilterModel::setFilterModifiedDateEnabled ( bool  enabled  )  [slot]

Enable or disable filtering by modification date.

Parameters:
enabled If true filter by modification date. Deactivate if false.
void FilterModel::setFilterModifiedFromDate ( const QDate &  date  )  [slot]

Set the from boundary of the modification date filter.

Parameters:
date The from boundary of the modification date filter.
void FilterModel::setFilterModifiedToDate ( const QDate &  date  )  [slot]

Set the to boundary of the modification date filter.

Parameters:
date The to boundary of the modification date filter.

The documentation for this class was generated from the following files:
Generated on Fri May 14 19:12:51 2010 for Silence by  doxygen 1.6.3