Skip to content

Class QgisMobileapp

ClassList > QgisMobileapp

Inherits the following classes: QQmlApplicationEngine, QfAppController, ApplicationWindow

Public Properties

Type Name
property QfRubberband currentRubberband
property QgsGpkgFlusher gpkgFlusherAlias
property QfLayerObserver layerObserverAlias
property bool sceneBorderless
property double sceneBottomMargin
property double sceneLeftMargin
property bool sceneLoaded
property double sceneRightMargin
property double sceneTopMargin

Public Signals

Type Name
signal void changeMode (string mode)
signal void close3DView
signal void closeMeasureTool
signal void loadProjectEnded (const QString & filename, const QString & name)
signal void loadProjectTriggered (const QString & filename, const QString & name)
signal void setMapExtent (const QgsRectangle & extent)
signal void toggleDigitizeMode

Public Functions

Type Name
QgisMobileapp (QgsApplication * app, QObject * parent=nullptr)
virtual void clearProject () override
bool event (QEvent * event) override
virtual bool loadProjectFile (const QString & path, const QString & name=QString()) override
virtual bool print (const QString & layoutName) override
virtual bool printAtlasFeatures (const QString & layoutName, const QList< long long > & featureIds) override
virtual bool readProjectBoolEntry (const QString & scope, const QString & key, bool def=false) override const
virtual double readProjectDoubleEntry (const QString & scope, const QString & key, double def=0.0) override const
virtual QString readProjectEntry (const QString & scope, const QString & key, const QString & def=QString()) override const
virtual void readProjectFile () override
virtual int readProjectNumEntry (const QString & scope, const QString & key, int def=0) override const
virtual void reloadProjectFile () override
virtual void setScreenDimmerTimeout (int timeoutSeconds) override
~QgisMobileapp () override

Public Functions inherited from QfAppController

See QfAppController

Type Name
virtual void clearProject () = 0
Clears the currently opened project.
virtual bool loadProjectFile (const QString & path, const QString & name=QString()) = 0
Loads a project file (.qgs/.qgz) or standalone dataset from path , labelled__name .
virtual bool print (const QString & layoutName) = 0
Prints the project layout matching layoutName to PDF.
virtual bool printAtlasFeatures (const QString & layoutName, const QList< long long > & featureIds) = 0
Prints the atlas-driven layout layoutName for__featureIds to PDF.
virtual bool readProjectBoolEntry (const QString & scope, const QString & key, bool def=false) const = 0
Reads a bool project entry at scope /__key (__def if absent).
virtual double readProjectDoubleEntry (const QString & scope, const QString & key, double def=0.0) const = 0
Reads a double project entry at scope /__key (__def if absent).
virtual QString readProjectEntry (const QString & scope, const QString & key, const QString & def=QString()) const = 0
Reads a string project entry at scope /__key (__def if absent).
virtual void readProjectFile () = 0
Reads the content of the loaded project.
virtual int readProjectNumEntry (const QString & scope, const QString & key, int def=0) const = 0
Reads an int project entry at scope /__key (__def if absent).
virtual void reloadProjectFile () = 0
Reloads the currently opened project.
virtual void setScreenDimmerTimeout (int timeoutSeconds) = 0
Sets the screen dimmer timeout in seconds (0 disables dimming).
virtual ~QfAppController () = default

Public Static Functions

Type Name
void initDeclarative (QQmlEngine * engine)

Public Properties Documentation

property currentRubberband

QfRubberband QgisMobileapp::currentRubberband;

property gpkgFlusherAlias

QgsGpkgFlusher QgisMobileapp::gpkgFlusherAlias;

property layerObserverAlias

QfLayerObserver QgisMobileapp::layerObserverAlias;

property sceneBorderless

bool QgisMobileapp::sceneBorderless;

property sceneBottomMargin

double QgisMobileapp::sceneBottomMargin;

property sceneLeftMargin

double QgisMobileapp::sceneLeftMargin;

property sceneLoaded

bool QgisMobileapp::sceneLoaded;

property sceneRightMargin

double QgisMobileapp::sceneRightMargin;

property sceneTopMargin

double QgisMobileapp::sceneTopMargin;

Public Signals Documentation

signal changeMode

void QgisMobileapp::changeMode;

signal close3DView [2/2]

void QgisMobileapp::close3DView;

signal closeMeasureTool [2/2]

void QgisMobileapp::closeMeasureTool;

signal loadProjectEnded

void QgisMobileapp::loadProjectEnded;

Emitted when the project is fully loaded


signal loadProjectTriggered

void QgisMobileapp::loadProjectTriggered;

Emitted when a project file is being loaded

Parameters:

  • filename The filename of the project that is being loaded
  • name The project name that is being loaded

signal setMapExtent

void QgisMobileapp::setMapExtent;

Emitted when a map canvas extent change is needed


signal toggleDigitizeMode

void QgisMobileapp::toggleDigitizeMode;

Public Functions Documentation

function QgisMobileapp

explicit QgisMobileapp::QgisMobileapp (
    QgsApplication * app,
    QObject * parent=nullptr
) 

function clearProject

virtual void QgisMobileapp::clearProject () override

Clear the currently opened project back to a blank project

Implements QfAppController::clearProject


function event

bool QgisMobileapp::event (
    QEvent * event
) override

function loadProjectFile

virtual bool QgisMobileapp::loadProjectFile (
    const QString & path,
    const QString & name=QString()
) override

Set the project or dataset file path to be loaded.

Parameters:

  • path The project or dataset file to load
  • name The project name

Note:

The actual loading is done in readProjectFile

Implements QfAppController::loadProjectFile


function print

virtual bool QgisMobileapp::print (
    const QString & layoutName
) override

Prints a given layout from the currently opened project to a PDF file

Parameters:

  • layoutName the layout name that will be printed

Returns:

TRUE if the layout was successfully printed

Implements QfAppController::print


function printAtlasFeatures

virtual bool QgisMobileapp::printAtlasFeatures (
    const QString & layoutName,
    const QList< long long > & featureIds
) override

Prints a given atlas-driven layout from the currently opened project to one or more PDF files

Parameters:

  • layoutName the layout name that will be printed
  • featureIds the features from the atlas coverage vector layer that will be used to print the layout

Returns:

TRUE if the layout was successfully printed

Implements QfAppController::printAtlasFeatures


function readProjectBoolEntry

virtual bool QgisMobileapp::readProjectBoolEntry (
    const QString & scope,
    const QString & key,
    bool def=false
) override const

Reads a boolean from the specified scope and key from the currently opened project

Parameters:

  • scope entry scope (group) name
  • key entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values
  • def default value to return if the specified key does not exist within the scope

Returns:

entry value as boolean from scope given its key

Implements QfAppController::readProjectBoolEntry


function readProjectDoubleEntry

virtual double QgisMobileapp::readProjectDoubleEntry (
    const QString & scope,
    const QString & key,
    double def=0.0
) override const

Reads a double from the specified scope and key from the currently opened project

Parameters:

  • scope entry scope (group) name
  • key entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values
  • def default value to return if the specified key does not exist within the scope

Returns:

entry value as double from scope given its key

Implements QfAppController::readProjectDoubleEntry


function readProjectEntry

virtual QString QgisMobileapp::readProjectEntry (
    const QString & scope,
    const QString & key,
    const QString & def=QString()
) override const

Reads a string from the specified scope and key from the currently opened project

Parameters:

  • scope entry scope (group) name
  • key entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values
  • def default value to return if the specified key does not exist within the scope

Returns:

entry value as string from scope given its key

Implements QfAppController::readProjectEntry


function readProjectFile

virtual void QgisMobileapp::readProjectFile () override

Reads and opens the project file set in the loadProjectFile function

Implements QfAppController::readProjectFile


function readProjectNumEntry

virtual int QgisMobileapp::readProjectNumEntry (
    const QString & scope,
    const QString & key,
    int def=0
) override const

Reads an integer from the specified scope and key from the currently opened project

Parameters:

  • scope entry scope (group) name
  • key entry key name. Keys are '/'-delimited entries, implying a hierarchy of keys and corresponding values
  • def default value to return if the specified key does not exist within the scope

Returns:

entry value as integer from scope given its key

Implements QfAppController::readProjectNumEntry


function reloadProjectFile

virtual void QgisMobileapp::reloadProjectFile () override

Reloads the current project

Note:

It does not reset the Auth Request Handler.

Note:

The actual loading is done in readProjectFile

Implements QfAppController::reloadProjectFile


function setScreenDimmerTimeout

virtual void QgisMobileapp::setScreenDimmerTimeout (
    int timeoutSeconds
) override

Sets the screen dimmer timeout in seconds

Note:

setting the timeout value to 0 will disable the screen dimmer

Implements QfAppController::setScreenDimmerTimeout


function ~QgisMobileapp

QgisMobileapp::~QgisMobileapp () override

Public Static Functions Documentation

function initDeclarative

static void QgisMobileapp::initDeclarative (
    QQmlEngine * engine
) 


The documentation for this class was generated from the following file src/app/qgismobileapp.h