-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Python utils method to start a Processing specific plugin
This command adds a plugin to active plugins and calls initProcessing(), initializing only Processing related components of that plugin. The new initProcessing() hook should be implemented by plugins which provide Processing providers or algorithm, and should only implement code which is required to load the provider and algorithms. Strictly no GUI related code should be used here, that MUST be moved out of initializers and deferred to the plugin's initGui implementation.
- Loading branch information
1 parent
92b7356
commit 2f82bab
Showing
7 changed files
with
153 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tests/testdata/test_plugin_path/ProcessingPluginTest/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
*************************************************************************** | ||
__init__.py | ||
--------------------- | ||
Date : July 2013 | ||
Copyright : (C) 2013 by Hugo Mercier | ||
Email : hugo dot mercier at oslandia dot com | ||
*************************************************************************** | ||
* * | ||
* 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. * | ||
* * | ||
*************************************************************************** | ||
""" | ||
|
||
__author__ = 'Hugo Mercier' | ||
__date__ = 'July 2013' | ||
__copyright__ = '(C) 2013, Hugo Mercier' | ||
# This will get replaced with a git SHA1 when you do a git archive | ||
__revision__ = '$Format:%H$' | ||
|
||
import os | ||
|
||
|
||
class Test: | ||
|
||
def __init__(self, iface): | ||
pass | ||
|
||
def initGui(self): | ||
assert False | ||
|
||
def initProcessing(self): | ||
pass | ||
|
||
def unload(self): | ||
pass | ||
|
||
def classFactory(iface): | ||
# load Test class from file Test | ||
return Test(iface) |
7 changes: 7 additions & 0 deletions
7
tests/testdata/test_plugin_path/ProcessingPluginTest/metadata.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[general] | ||
name=plugin path test | ||
qgisMinimumVersion=2.0 | ||
description=desc | ||
version=0.1 | ||
author=HM/Oslandia | ||
email=hugo.mercier@oslandia.com |