Skip to content

Class QFieldCloudProjectsFilterModel

ClassList > QFieldCloudProjectsFilterModel

Inherits the following classes: QSortFilterProxyModel

Public Types

Type Name
enum ProjectsFilter

Public Properties

Type Name
property ProjectsFilter filter
property QFieldCloudProjectsModel * projectsModel
property bool showFeaturedOnTop
property bool showInValidProjects
property bool showLocalOnly
property QString textFilter

Public Signals

Type Name
signal void filterChanged
signal void projectsModelChanged
signal void showFeaturedOnTopChanged
signal void showInValidProjectsChanged
signal void showLocalOnlyChanged
signal void textFilterChanged

Public Functions

Type Name
QFieldCloudProjectsFilterModel (QObject * parent=nullptr)
ProjectsFilter filter () const
QFieldCloudProjectsModel * projectsModel () const
void setFilter (ProjectsFilter filter)
void setProjectsModel (QFieldCloudProjectsModel * projectsModel)
void setShowFeaturedOnTop (bool showFeaturedOnTop)
void setShowInValidProjects (bool showInValidProjects)
void setShowLocalOnly (bool showLocalOnly)
void setTextFilter (const QString & text)
bool showFeaturedOnTop () const
bool showInValidProjects () const
bool showLocalOnly () const
QString textFilter () const

Protected Functions

Type Name
virtual bool filterAcceptsRow (int source_row, const QModelIndex & source_parent) override const
bool lessThan (const QModelIndex & sourceLeft, const QModelIndex & sourceRight) override const

Public Types Documentation

enum ProjectsFilter

enum QFieldCloudProjectsFilterModel::ProjectsFilter {
    PrivateProjects,
    PublicProjects
};

Public Properties Documentation

property filter [1/2]

ProjectsFilter QFieldCloudProjectsFilterModel::filter;

property projectsModel [1/2]

QFieldCloudProjectsModel * QFieldCloudProjectsFilterModel::projectsModel;

property showFeaturedOnTop [1/2]

bool QFieldCloudProjectsFilterModel::showFeaturedOnTop;

property showInValidProjects [1/2]

bool QFieldCloudProjectsFilterModel::showInValidProjects;

property showLocalOnly [1/2]

bool QFieldCloudProjectsFilterModel::showLocalOnly;

property textFilter [1/2]

QString QFieldCloudProjectsFilterModel::textFilter;

Public Signals Documentation

signal filterChanged

void QFieldCloudProjectsFilterModel::filterChanged;

signal projectsModelChanged

void QFieldCloudProjectsFilterModel::projectsModelChanged;

signal showFeaturedOnTopChanged

void QFieldCloudProjectsFilterModel::showFeaturedOnTopChanged;

signal showInValidProjectsChanged

void QFieldCloudProjectsFilterModel::showInValidProjectsChanged;

signal showLocalOnlyChanged

void QFieldCloudProjectsFilterModel::showLocalOnlyChanged;

signal textFilterChanged

void QFieldCloudProjectsFilterModel::textFilterChanged;

Public Functions Documentation

function QFieldCloudProjectsFilterModel

explicit QFieldCloudProjectsFilterModel::QFieldCloudProjectsFilterModel (
    QObject * parent=nullptr
) 

function filter [2/2]

ProjectsFilter QFieldCloudProjectsFilterModel::filter () const

Returns the current cloud projects filter.


function projectsModel [2/2]

QFieldCloudProjectsModel * QFieldCloudProjectsFilterModel::projectsModel () const

Returns the source cloud projects model from which the filtered list is derived.


function setFilter

void QFieldCloudProjectsFilterModel::setFilter (
    ProjectsFilter filter
) 

Sets the cloud project filter.


function setProjectsModel

void QFieldCloudProjectsFilterModel::setProjectsModel (
    QFieldCloudProjectsModel * projectsModel
) 

Sets the source cloud projects model from which the filtered list is derived.

Parameters:

  • projectsModel the source cloud project model

function setShowFeaturedOnTop

void QFieldCloudProjectsFilterModel::setShowFeaturedOnTop (
    bool showFeaturedOnTop
) 

Sets whether featured projects will be shown on top of the list.


function setShowInValidProjects

void QFieldCloudProjectsFilterModel::setShowInValidProjects (
    bool showInValidProjects
) 

Sets whether to include projects that are considered invalid (i.e., failing status) in the filtered list of cloud projects.

Parameters:

  • showInValidProjects If true, invalid (failing) projects will be shown; otherwise, they will be filtered out.

function setShowLocalOnly

void QFieldCloudProjectsFilterModel::setShowLocalOnly (
    bool showLocalOnly
) 

Sets whether the filtered cloud projects list will only contain those available locally.


function setTextFilter

void QFieldCloudProjectsFilterModel::setTextFilter (
    const QString & text
) 

Sets a text string filter projects by matching it against the project's name or description as well well as owner's name.


function showFeaturedOnTop [2/2]

bool QFieldCloudProjectsFilterModel::showFeaturedOnTop () const

Returns TRUE if featured projects will be shown on top of the list.


function showInValidProjects [2/2]

bool QFieldCloudProjectsFilterModel::showInValidProjects () const

Returns TRUE if invalid (failing) projects are currently included in the filtered list of cloud projects.


function showLocalOnly [2/2]

bool QFieldCloudProjectsFilterModel::showLocalOnly () const

Returns whether the filtered cloud projects list will only contain those available locally.


function textFilter [2/2]

QString QFieldCloudProjectsFilterModel::textFilter () const

Returns the current text string used to filter projects.


Protected Functions Documentation

function filterAcceptsRow

virtual bool QFieldCloudProjectsFilterModel::filterAcceptsRow (
    int source_row,
    const QModelIndex & source_parent
) override const

function lessThan

bool QFieldCloudProjectsFilterModel::lessThan (
    const QModelIndex & sourceLeft,
    const QModelIndex & sourceRight
) override const


The documentation for this class was generated from the following file src/core/qfieldcloud/qfieldcloudprojectsmodel.h