KLDAPCore::LdapSortProxyModel Class

The LdapSortProxyModel class. More...

Header: #include <KLDAPCore/LdapSortProxyModel>
CMake: find_package(KPim6LdapCore REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::LdapCore)
Inherits: QSortFilterProxyModel

Public Functions

LdapSortProxyModel(QObject *parent)
virtual ~LdapSortProxyModel() override
bool enablePlasmaActivities() const
KLDAPCore::LdapActivitiesAbstract *ldapActivitiesAbstract() const
void setEnablePlasmaActivities(bool newEnablePlasmaActivities)
void setLdapActivitiesAbstract(KLDAPCore::LdapActivitiesAbstract *newldapActivitiesAbstract)

Reimplemented Protected Functions

virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override

Detailed Description

Member Function Documentation

[explicit] LdapSortProxyModel::LdapSortProxyModel(QObject *parent)

Constructs a LdapSortProxyModel with the given parent object. parent the parent QObject

[override virtual noexcept] LdapSortProxyModel::~LdapSortProxyModel()

Destroys the LdapSortProxyModel.

bool LdapSortProxyModel::enablePlasmaActivities() const

Returns whether Plasma Activities support is enabled. Returns true if Plasma Activities are enabled, false otherwise

See also setEnablePlasmaActivities().

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

Reimplements: QSortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const.

Filters rows based on the current activity settings. source_row the row in the source model source_parent the parent index in the source model Returns true if the row should be accepted by the filter

KLDAPCore::LdapActivitiesAbstract *LdapSortProxyModel::ldapActivitiesAbstract() const

Returns the LDAP Activities Abstract instance used for filtering. Returns the LDAP Activities Abstract instance, or nullptr if not set

See also setLdapActivitiesAbstract().

[override virtual protected] bool LdapSortProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const

Reimplements: QSortFilterProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const.

Compares two items for sorting purposes. source_left the left index to compare source_right the right index to compare Returns true if the left item should be sorted before the right item

void LdapSortProxyModel::setEnablePlasmaActivities(bool newEnablePlasmaActivities)

Sets whether Plasma Activities support is enabled. newEnablePlasmaActivities true to enable Plasma Activities

See also enablePlasmaActivities().

void LdapSortProxyModel::setLdapActivitiesAbstract(KLDAPCore::LdapActivitiesAbstract *newldapActivitiesAbstract)

Sets the LDAP Activities Abstract instance for filtering. newldapActivitiesAbstract the LDAP Activities Abstract instance

See also ldapActivitiesAbstract().