• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

PlasmaCore

  • Plasma
  • SortFilterModel
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | List of all members
Plasma::SortFilterModel Class Reference

#include <datamodel.h>

Inheritance diagram for Plasma::SortFilterModel:
Inheritance graph
[legend]

Signals

void countChanged ()
 
void filterRegExpChanged (const QString &)
 
void sortOrderChanged (const Qt::SortOrder)
 
void sourceModelChanged (QObject *)
 

Public Member Functions

 SortFilterModel (QObject *parent=0)
 
 ~SortFilterModel ()
 
int count () const
 
QString filterRegExp () const
 
QString filterRole () const
 
Q_INVOKABLE QVariantHash get (int i) const
 
Q_INVOKABLE int mapRowFromSource (int i) const
 
Q_INVOKABLE int mapRowToSource (int i) const
 
void setFilterRegExp (const QString &exp)
 
void setFilterRole (const QString &role)
 
void setModel (QAbstractItemModel *source)
 
void setSortOrder (const Qt::SortOrder order)
 
void setSortRole (const QString &role)
 
QString sortRole () const
 

Protected Slots

void syncRoleNames ()
 

Protected Member Functions

int roleNameToId (const QString &name)
 

Properties

int count
 
QString filterRegExp
 
QString filterRole
 
Qt::CaseSensitivity sortCaseSensitivity
 
Qt::SortOrder sortOrder
 
QString sortRole
 
QAbstractItemModel sourceModel
 

Detailed Description

Definition at line 38 of file datamodel.h.

Constructor & Destructor Documentation

Plasma::SortFilterModel::SortFilterModel ( QObject *  parent = 0)

Definition at line 30 of file datamodel.cpp.

Plasma::SortFilterModel::~SortFilterModel ( )

Definition at line 44 of file datamodel.cpp.

Member Function Documentation

int Plasma::SortFilterModel::count ( ) const
inline

Definition at line 95 of file datamodel.h.

void Plasma::SortFilterModel::countChanged ( )
signal
QString Plasma::SortFilterModel::filterRegExp ( ) const
void Plasma::SortFilterModel::filterRegExpChanged ( const QString &  )
signal
QString Plasma::SortFilterModel::filterRole ( ) const
QVariantHash Plasma::SortFilterModel::get ( int  i) const

Returns the item at index in the list model.

This allows the item data to be accessed (but not modified) from JavaScript. It returns an Object with a property for each role.

  • int i the row we want

Definition at line 143 of file datamodel.cpp.

int Plasma::SortFilterModel::mapRowFromSource ( int  i) const

Definition at line 162 of file datamodel.cpp.

int Plasma::SortFilterModel::mapRowToSource ( int  i) const

Definition at line 156 of file datamodel.cpp.

int Plasma::SortFilterModel::roleNameToId ( const QString &  name)
protected

Definition at line 65 of file datamodel.cpp.

void Plasma::SortFilterModel::setFilterRegExp ( const QString &  exp)

Definition at line 93 of file datamodel.cpp.

void Plasma::SortFilterModel::setFilterRole ( const QString &  role)

Definition at line 107 of file datamodel.cpp.

void Plasma::SortFilterModel::setModel ( QAbstractItemModel *  source)

Definition at line 73 of file datamodel.cpp.

void Plasma::SortFilterModel::setSortOrder ( const Qt::SortOrder  order)

Definition at line 134 of file datamodel.cpp.

void Plasma::SortFilterModel::setSortRole ( const QString &  role)

Definition at line 118 of file datamodel.cpp.

void Plasma::SortFilterModel::sortOrderChanged ( const Qt::SortOrder  )
signal
QString Plasma::SortFilterModel::sortRole ( ) const
void Plasma::SortFilterModel::sourceModelChanged ( QObject *  )
signal
void Plasma::SortFilterModel::syncRoleNames ( )
protectedslot

Definition at line 48 of file datamodel.cpp.

Property Documentation

int Plasma::SortFilterModel::count
read

How many items are in this model.

Definition at line 74 of file datamodel.h.

QString Plasma::SortFilterModel::filterRegExp
readwrite

The regular expression for the filter, only items with their filterRole matching filterRegExp will be displayed.

Definition at line 49 of file datamodel.h.

QString Plasma::SortFilterModel::filterRole
readwrite

The role of the sourceModel on which filterRegExp must be applied.

Definition at line 54 of file datamodel.h.

Qt::CaseSensitivity Plasma::SortFilterModel::sortCaseSensitivity
readwrite

One of Qt.CaseInsensitive or Qt.CaseSensitive.

Definition at line 69 of file datamodel.h.

Qt::SortOrder Plasma::SortFilterModel::sortOrder
readwrite

One of Qt.Ascending or Qt.Descending.

Definition at line 64 of file datamodel.h.

QString Plasma::SortFilterModel::sortRole
readwrite

The role of the sourceModel that will be used for sorting.

if empty the order will be left unaltered

Definition at line 59 of file datamodel.h.

QAbstractItemModel Plasma::SortFilterModel::sourceModel
readwrite

The source model of this sorting proxy model.

It has to inherit QAbstractItemModel (ListModel is not supported)

Definition at line 44 of file datamodel.h.


The documentation for this class was generated from the following files:
  • datamodel.h
  • datamodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:02:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

PlasmaCore

Skip menu "PlasmaCore"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal