locationpickerservice/inc/locationpickerproxymodel.h
changeset 20 cd10d5b85554
parent 17 0f22fb80ebba
child 31 8db05346071b
equal deleted inserted replaced
17:0f22fb80ebba 20:cd10d5b85554
    29 {
    29 {
    30     Q_OBJECT
    30     Q_OBJECT
    31 
    31 
    32 public:
    32 public:
    33     // constructor
    33     // constructor
    34     LocationPickerProxyModel(Qt::Orientations aOrientation , QObject *parent = 0);
    34     LocationPickerProxyModel( Qt::Orientations aOrientation , QObject *parent = 0 );
    35 
    35 
    36     // used to
    36     // used to
    37     void filterParameterChanged(QString aSearchText);
    37     void filterParameterChanged( QString aSearchText );
    38 
    38 
    39 protected:
    39 protected:
    40     // override QSortFilterProxyModel function  to define logic for filter
    40     // override QSortFilterProxyModel function  to define logic for filter
    41     bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
    41     bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
    42     // override QSortFilterProxyModel function  to define logic for sort
    42     // override QSortFilterProxyModel function  to define logic for sort
    43     bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
    43     bool lessThan( const QModelIndex &left, const QModelIndex &right ) const;
    44 
    44 
    45 private:
    45 private:
    46     // search string
    46     // search string
    47     QString mSearchText;
    47     QString mSearchText;
    48     Qt::Orientations mOrientation;
    48     Qt::Orientations mOrientation;