• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

SystemSettingsView

MenuProxyModel Class Reference

Provides a filter model for MenuModel. More...

#include <MenuProxyModel.h>

Inheritance diagram for MenuProxyModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 MenuProxyModel (QObject *parent=0)
virtual bool filterAcceptsRow (int source_column, const QModelIndex &source_parent) const
Qt::ItemFlags flags (const QModelIndex &index) const
void setFilterRegExp (const QString &pattern)
void setFilterRegExp (const QRegExp &regExp)
virtual bool subSortLessThan (const QModelIndex &left, const QModelIndex &right) const

Detailed Description

Provides a filter model for MenuModel.

Provides a standardised model to be used with views to filter a MenuModel.
It automatically sorts the items appropriately depending on if it is categorised or not. Call setFilterRegExp(QString) with the desired text to filter to perform searching. Items that do not match the search parameters will be disabled, not hidden.

Author:
Will Stephenson <wstephenson@kde.org>
Ben Cooksley <ben@eclipse.endoftheinternet.org>

Definition at line 39 of file MenuProxyModel.h.


Constructor & Destructor Documentation

MenuProxyModel::MenuProxyModel ( QObject *  parent = 0  ) 

Constructs a MenuProxyModel with the specified parent.

Parameters:
parent The QObject to use as a parent.

Definition at line 26 of file MenuProxyModel.cpp.


Member Function Documentation

bool MenuProxyModel::filterAcceptsRow ( int  source_column,
const QModelIndex &  source_parent 
) const [virtual]

Please see the Qt QSortFilterProxyModel documentation for futher information.


Provides additional filtering of the MenuModel to only show categories which contain modules.

Parameters:
source_column Please see QSortFilterProxyModel documentation.
source_parent Please see QSortFilterProxyModel documentation.
Returns:
true if the row should be displayed, false if it should not.

Definition at line 54 of file MenuProxyModel.cpp.

Qt::ItemFlags MenuProxyModel::flags ( const QModelIndex &  index  )  const

Please see Qt QAbstractItemModel documentation for more details.


Provides the status flags for the QModelIndex specified. The item will be selectable and enabled for its status unless invalid or filtered by search terms.

Returns:
The flags for the QModelIndex provided.

Definition at line 66 of file MenuProxyModel.cpp.

void MenuProxyModel::setFilterRegExp ( const QString &  pattern  ) 

Please see Qt QAbstractItemModel documentation for more details.


Reimplemented for internal reasons.

Definition at line 80 of file MenuProxyModel.cpp.

void MenuProxyModel::setFilterRegExp ( const QRegExp &  regExp  ) 

Please see Qt QAbstractItemModel documentation for more details.


Reimplemented for internal reasons.

Definition at line 87 of file MenuProxyModel.cpp.

bool MenuProxyModel::subSortLessThan ( const QModelIndex &  left,
const QModelIndex &  right 
) const [virtual]

Please see the KDE KCategorizedSortFilterProxyModel documentaion for futher information.


Provides information on whether or not the QModelIndex specified by left is below right.

Parameters:
left the QModelIndex that is being used for comparing.
right the QModelIndex to compare aganist.
Returns:
true if the left is below the right.

Definition at line 34 of file MenuProxyModel.cpp.


The documentation for this class was generated from the following files:
  • MenuProxyModel.h
  • MenuProxyModel.cpp

SystemSettingsView

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •     Animators
  •     Applets
  •     Engines
  • Solid Modules
  • System Settings
  •   SystemSettingsView
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal