Skip to content

Class QfMarkupManager

ClassList > QfMarkupManager

This class to manage markup collections.

  • #include <qfmarkupmanager.h>

Inherits the following classes: QObject

Public Properties

Type Name
property QStringList collectionNames
property QList< QfMarkupCollection * > collections
property bool hasItems
property QStringList hiddenCollectionUuids
property QList< QfMarkupCollection * > visibleCollections

Public Signals

Type Name
signal void collectionItemsChanged (const QString & uuid)
Emitted when a collection's list of items has changed.
signal void collectionsAdded (const QStringList & uuids)
Emitted when collections are about to be removed.
signal void collectionsChanged
Emitted when the list of collections has changed.
signal void collectionsWillBeRemoved (const QStringList & uuids)
Emitted when collections are about to be removed.
signal void hasItemsChanged
Emitted when the item count of a loaded collection has changed.
signal void hiddenCollectionUuidsChanged
Emitted when the list of hidden collection UUIDs has changed.
signal void visibleCollectionsChanged
Emitted when the list of visible collections has changed.

Public Functions

Type Name
QfMarkupManager (QObject * parent=nullptr)
Q_INVOKABLE QfMarkupCollection * collection (const QString & uuid) const
QStringList collectionNames () const
Q_INVOKABLE QString collectionUuid (QfMarkupCollection * collection) const
QStringList collectionUuids () const
QList< QfMarkupCollection * > collections () const
Q_INVOKABLE QString createCollection (const QString & title)
Q_INVOKABLE void exportCollection (QfMarkupCollection * collection)
bool hasItems () const
QStringList hiddenCollectionUuids () const
Q_INVOKABLE void reset (const QString & path, const QString & prefix=QString())
void setHiddenCollectionUuids (const QStringList & hiddenCollectionUuids)
QList< QfMarkupCollection * > visibleCollections () const

Public Properties Documentation

property collectionNames [1/2]

QStringList QfMarkupManager::collectionNames;

property collections [1/2]

QList<QfMarkupCollection *> QfMarkupManager::collections;

property hasItems [1/2]

bool QfMarkupManager::hasItems;

property hiddenCollectionUuids [1/2]

QStringList QfMarkupManager::hiddenCollectionUuids;

property visibleCollections [1/2]

QList<QfMarkupCollection *> QfMarkupManager::visibleCollections;

Public Signals Documentation

signal collectionItemsChanged

Emitted when a collection's list of items has changed.

void QfMarkupManager::collectionItemsChanged;


signal collectionsAdded

Emitted when collections are about to be removed.

void QfMarkupManager::collectionsAdded;


signal collectionsChanged

Emitted when the list of collections has changed.

void QfMarkupManager::collectionsChanged;


signal collectionsWillBeRemoved

Emitted when collections are about to be removed.

void QfMarkupManager::collectionsWillBeRemoved;


signal hasItemsChanged

Emitted when the item count of a loaded collection has changed.

void QfMarkupManager::hasItemsChanged;


signal hiddenCollectionUuidsChanged

Emitted when the list of hidden collection UUIDs has changed.

void QfMarkupManager::hiddenCollectionUuidsChanged;


signal visibleCollectionsChanged

Emitted when the list of visible collections has changed.

void QfMarkupManager::visibleCollectionsChanged;


Public Functions Documentation

function QfMarkupManager

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

function collection

Q_INVOKABLE QfMarkupCollection * QfMarkupManager::collection (
    const QString & uuid
) const

Returns the collection present in the markup manager matching the uuid.


function collectionNames [2/2]

QStringList QfMarkupManager::collectionNames () const

Returns the list of collection names present in the markup manager.


function collectionUuid

Q_INVOKABLE QString QfMarkupManager::collectionUuid (
    QfMarkupCollection * collection
) const

Returns the list UUID matching the collection.


function collectionUuids

inline QStringList QfMarkupManager::collectionUuids () const

Returns the list of collection UUIDs present in the markup manager.


function collections [2/2]

inline QList< QfMarkupCollection * > QfMarkupManager::collections () const

Returns the list of collections present in the markup manager.


function createCollection

Q_INVOKABLE QString QfMarkupManager::createCollection (
    const QString & title
) 

Creates a new markup collection.

Returns:

The newly created markup collection UUID.

Note:

The markup collection will be written into the current path when the first item is added into it.


function exportCollection

Q_INVOKABLE void QfMarkupManager::exportCollection (
    QfMarkupCollection * collection
) 

Exports the markup collection via available platform capabilities.


function hasItems [2/2]

bool QfMarkupManager::hasItems () const

Returns TRUE if any of the collections present in the markup manager contains one or more items.


function hiddenCollectionUuids [2/2]

inline QStringList QfMarkupManager::hiddenCollectionUuids () const

Returns the list of collection UUIDs that are hidden. Matching collection will not be part of the list of collections returned by the markup manager visibleCollections() function.


function reset

Q_INVOKABLE void QfMarkupManager::reset (
    const QString & path,
    const QString & prefix=QString()
) 

Resets the markup manager's list of collections by loading compatible GeoJSON files present in the provided path. If a prefix is provided, the markup manager will only load GeoJSON files beginning by the prefix.


function setHiddenCollectionUuids

void QfMarkupManager::setHiddenCollectionUuids (
    const QStringList & hiddenCollectionUuids
) 

Sets the list of collection UUIDs that are hidden. Matching collection will not be part of the list of collections returned by the markup manager visibleCollections() function.


function visibleCollections [2/2]

QList< QfMarkupCollection * > QfMarkupManager::visibleCollections () const

Returns the list of visible collections present in the markup manager.



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