Skip to content

Class QfCloudProjectsFilterModel

ClassList > QfCloudProjectsFilterModel

Inherits the following classes: QSortFilterProxyModel

Public Properties

Type Name
property bool isSearching
property QfCloudProjectsModel * projectsModel
property bool showFeaturedOnTop
property bool showInValidProjects
property bool showLocalOnly
property bool showTemplates
property QString textFilter

Public Signals

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

Public Functions

Type Name
QfCloudProjectsFilterModel (QObject * parent=nullptr)
bool isSearching () const
QfCloudProjectsModel * projectsModel () const
void setProjectsModel (QfCloudProjectsModel * projectsModel)
void setShowFeaturedOnTop (bool showFeaturedOnTop)
void setShowInValidProjects (bool showInValidProjects)
void setShowLocalOnly (bool showLocalOnly)
void setShowTemplates (bool showTemplates)
void setTextFilter (const QString & text)
bool showFeaturedOnTop () const
bool showInValidProjects () const
bool showLocalOnly () const
bool showTemplates () 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 Properties Documentation

property isSearching [1/2]

bool QfCloudProjectsFilterModel::isSearching;

property projectsModel [1/2]

QfCloudProjectsModel * QfCloudProjectsFilterModel::projectsModel;

property showFeaturedOnTop [1/2]

bool QfCloudProjectsFilterModel::showFeaturedOnTop;

property showInValidProjects [1/2]

bool QfCloudProjectsFilterModel::showInValidProjects;

property showLocalOnly [1/2]

bool QfCloudProjectsFilterModel::showLocalOnly;

property showTemplates [1/2]

bool QfCloudProjectsFilterModel::showTemplates;

property textFilter [1/2]

QString QfCloudProjectsFilterModel::textFilter;

Public Signals Documentation

signal filterChanged

void QfCloudProjectsFilterModel::filterChanged;

signal isSearchingChanged

void QfCloudProjectsFilterModel::isSearchingChanged;

signal projectsModelChanged

void QfCloudProjectsFilterModel::projectsModelChanged;

signal showFeaturedOnTopChanged

void QfCloudProjectsFilterModel::showFeaturedOnTopChanged;

signal showInValidProjectsChanged

void QfCloudProjectsFilterModel::showInValidProjectsChanged;

signal showLocalOnlyChanged

void QfCloudProjectsFilterModel::showLocalOnlyChanged;

signal showTemplatesChanged

void QfCloudProjectsFilterModel::showTemplatesChanged;

signal textFilterChanged

void QfCloudProjectsFilterModel::textFilterChanged;

Public Functions Documentation

function QfCloudProjectsFilterModel

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

function isSearching [2/2]

bool QfCloudProjectsFilterModel::isSearching () const

Returns TRUE while an asynchronous projects appending was triggered by a text filter.


function projectsModel [2/2]

QfCloudProjectsModel * QfCloudProjectsFilterModel::projectsModel () const

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


function setProjectsModel

void QfCloudProjectsFilterModel::setProjectsModel (
    QfCloudProjectsModel * projectsModel
) 

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

Parameters:

  • projectsModel the source cloud project model

function setShowFeaturedOnTop

void QfCloudProjectsFilterModel::setShowFeaturedOnTop (
    bool showFeaturedOnTop
) 

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


function setShowInValidProjects

void QfCloudProjectsFilterModel::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 QfCloudProjectsFilterModel::setShowLocalOnly (
    bool showLocalOnly
) 

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


function setShowTemplates

void QfCloudProjectsFilterModel::setShowTemplates (
    bool showTemplates
) 

Sets whether the filtered list shows template projects only.

Parameters:

  • showTemplates when TRUE, only template projects are shown; when FALSE, they are hidden

function setTextFilter

void QfCloudProjectsFilterModel::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 QfCloudProjectsFilterModel::showFeaturedOnTop () const

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


function showInValidProjects [2/2]

bool QfCloudProjectsFilterModel::showInValidProjects () const

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


function showLocalOnly [2/2]

bool QfCloudProjectsFilterModel::showLocalOnly () const

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


function showTemplates [2/2]

bool QfCloudProjectsFilterModel::showTemplates () const

Returns TRUE when the filtered list shows template projects only, hiding all non-template projects. When FALSE, template projects are excluded from the list.


function textFilter [2/2]

QString QfCloudProjectsFilterModel::textFilter () const

Returns the current text string used to filter projects.


Protected Functions Documentation

function filterAcceptsRow

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

function lessThan

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


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