mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
44 lines
1.4 KiB
Python
44 lines
1.4 KiB
Python
"""
|
|
***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************
|
|
"""
|
|
|
|
from qgis.core import (
|
|
QgsStyle,
|
|
QgsProcessingAlgorithm,
|
|
QgsProcessingOutputBoolean,
|
|
)
|
|
|
|
|
|
class CheckStyleInitializationStatus(QgsProcessingAlgorithm):
|
|
IS_INITIALIZED = 'IS_INITIALIZED'
|
|
|
|
def createInstance(self):
|
|
return CheckStyleInitializationStatus()
|
|
|
|
def name(self):
|
|
return 'checkstyleinitstatus'
|
|
|
|
def displayName(self):
|
|
return 'Check style initialization status'
|
|
|
|
def shortDescription(self):
|
|
return 'Checks style initialization status'
|
|
|
|
def initAlgorithm(self, config=None):
|
|
self.addOutput(
|
|
QgsProcessingOutputBoolean(
|
|
self.IS_INITIALIZED,
|
|
'Style is initialized'
|
|
)
|
|
)
|
|
|
|
def processAlgorithm(self, parameters, context, feedback):
|
|
return {self.IS_INITIALIZED: QgsStyle.defaultStyle(False).isInitialized()}
|