Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions

MSortFilterProxyModel Class Reference

MSortFilterProxyModel reimplementation of a custom sort/filter proxy data model. In case of filtering does not filter out the group headers (oposite to default QSortFilterProxyModel behavior). More...

Inherits QSortFilterProxyModel.

List of all members.

Signals

void rowsInserted (const QModelIndex &parent, int first, int last, bool animated)
void rowsRemoved (const QModelIndex &parent, int first, int last, bool animated)
void layoutAboutToBeAnimated ()

Public Member Functions

 MSortFilterProxyModel (QObject *parent=NULL)
virtual ~MSortFilterProxyModel ()
void enableLocaleAwareSorting (bool enable=true)
bool isLocaleAwareSortingEnabled () const

Detailed Description

MSortFilterProxyModel reimplementation of a custom sort/filter proxy data model. In case of filtering does not filter out the group headers (oposite to default QSortFilterProxyModel behavior).


Constructor & Destructor Documentation

MSortFilterProxyModel::MSortFilterProxyModel ( QObject parent = NULL  ) 

Constructor.

Parameters:
parent Model owner.
MSortFilterProxyModel::~MSortFilterProxyModel (  )  [virtual]

Destructor.


Member Function Documentation

void MSortFilterProxyModel::enableLocaleAwareSorting ( bool  enable = true  ) 

Enable or disable locale-aware sorting.

Sorting string data that are visible to the user should be done locale-aware since there are different sorting rules in different languages. For example, in Czech, words starting with "ch" are sorted after words starting with "h". By default, MSortFilterProxyModel does this. This function can turn this off (or on again).

Disabling locale-aware sorting could be useful if there are only non-string data to be sorted, for example numbers, dates or times. This can improve performance slightly.

bool MSortFilterProxyModel::isLocaleAwareSortingEnabled (  )  const

Check if locale-aware sorting is enabled.

void MSortFilterProxyModel::layoutAboutToBeAnimated (  )  [signal]
Parameters:
The signal is emitted if the layout change shall be animated.
void MSortFilterProxyModel::rowsInserted ( const QModelIndex parent,
int  first,
int  last,
bool  animated 
) [signal]
Parameters:
parent Parent index in which the rows were inserted.
first First inserted row index.
last Last inserted row index.
animated Flag that shows if the insert operation was with animations or not.
void MSortFilterProxyModel::rowsRemoved ( const QModelIndex parent,
int  first,
int  last,
bool  animated 
) [signal]
Parameters:
parent Parent index in which the rows were removed.
first First removed row index.
last Last removed row index.
animated Flag that shows if the remove operation was with animations or not.

Copyright © 2010 Nokia Corporation
MeeGo Touch