Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
192 additions
and
23 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
qgis-app/plugins/tests/HelloWorld/1.6-full-md-no-init-unicode-error/HelloWorld/HelloWorld.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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
# Import the PyQt and QGIS libraries | ||
from PyQt4.QtCore import * | ||
from PyQt4.QtGui import * | ||
from qgis.core import * | ||
|
||
|
||
class HelloWorld: | ||
|
||
def __init__(self, iface): | ||
# Save reference to the QGIS interface | ||
self.iface = iface | ||
self.canvas = iface.mapCanvas() | ||
|
||
def initGui(self): | ||
# Create action that will start plugin | ||
self.action = QAction(QIcon(":/plugins/"), "&HelloWorld", self.iface.mainWindow()) | ||
# connect the action to the run method | ||
QObject.connect(self.action, SIGNAL("activated()"), self.hello_world) | ||
|
||
# Add toolbar button and menu item | ||
self.iface.addPluginToMenu("HelloWorld", self.action) | ||
|
||
|
||
def unload(self): | ||
# Remove the plugin menu item and icon | ||
self.iface.removePluginMenu("HelloWorld",self.action) | ||
|
||
|
||
|
||
# run | ||
def hello_world(self): | ||
QMessageBox.information(self.iface.mainWindow(), QCoreApplication.translate('HelloWorld', "HelloWorld"), QCoreApplication.translate('HelloWorld', "HelloWorld")) | ||
return | ||
|
||
|
||
|
||
|
||
if __name__ == "__main__": | ||
pass |
4 changes: 4 additions & 0 deletions
4
qgis-app/plugins/tests/HelloWorld/1.6-full-md-no-init-unicode-error/HelloWorld/__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,4 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
This script initializes the plugin, making it known to QGIS. | ||
""" |
Binary file added
BIN
+325 Bytes
.../plugins/tests/HelloWorld/1.6-full-md-no-init-unicode-error/HelloWorld/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
qgis-app/plugins/tests/HelloWorld/1.6-full-md-no-init-unicode-error/HelloWorld/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,31 @@ | ||
[general] | ||
name=HelloWorld | ||
qgisMinimumVersion=1.8 | ||
description=This is a test plugin for greeting the | ||
(going multiline) world, version is 1.6 | ||
version=version 1.6 | ||
author=Alessandr� Pasott� | ||
email=apasotti@gmail.com | ||
|
||
|
||
changelog=this is a very | ||
very<br/> | ||
very | ||
very | ||
very | ||
very long multiline changelog | ||
|
||
|
||
tags= wkt, raster,hello world, spaced tag , tag | ||
|
||
tracker=http://bugs.itopen.it | ||
homepage=http://www.itopen.it | ||
repository=http://www.itopen.it/repo | ||
|
||
|
||
|
||
experimental=True | ||
|
||
|
||
; change icon... | ||
icon=icon.png |
40 changes: 40 additions & 0 deletions
40
...-app/plugins/tests/HelloWorld/1.7-full-md-no-init-subfolder-icon/HelloWorld/HelloWorld.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,40 @@ | ||
# -*- coding: utf-8 -*- | ||
# Import the PyQt and QGIS libraries | ||
from PyQt4.QtCore import * | ||
from PyQt4.QtGui import * | ||
from qgis.core import * | ||
|
||
|
||
class HelloWorld: | ||
|
||
def __init__(self, iface): | ||
# Save reference to the QGIS interface | ||
self.iface = iface | ||
self.canvas = iface.mapCanvas() | ||
|
||
def initGui(self): | ||
# Create action that will start plugin | ||
self.action = QAction(QIcon(":/plugins/"), "&HelloWorld", self.iface.mainWindow()) | ||
# connect the action to the run method | ||
QObject.connect(self.action, SIGNAL("activated()"), self.hello_world) | ||
|
||
# Add toolbar button and menu item | ||
self.iface.addPluginToMenu("HelloWorld", self.action) | ||
|
||
|
||
def unload(self): | ||
# Remove the plugin menu item and icon | ||
self.iface.removePluginMenu("HelloWorld",self.action) | ||
|
||
|
||
|
||
# run | ||
def hello_world(self): | ||
QMessageBox.information(self.iface.mainWindow(), QCoreApplication.translate('HelloWorld', "HelloWorld"), QCoreApplication.translate('HelloWorld', "HelloWorld")) | ||
return | ||
|
||
|
||
|
||
|
||
if __name__ == "__main__": | ||
pass |
4 changes: 4 additions & 0 deletions
4
qgis-app/plugins/tests/HelloWorld/1.7-full-md-no-init-subfolder-icon/HelloWorld/__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,4 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
This script initializes the plugin, making it known to QGIS. | ||
""" |
Binary file added
BIN
+1.29 KB
...s/tests/HelloWorld/1.7-full-md-no-init-subfolder-icon/HelloWorld/icons/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
qgis-app/plugins/tests/HelloWorld/1.7-full-md-no-init-subfolder-icon/HelloWorld/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,31 @@ | ||
[general] | ||
name=HelloWorld | ||
qgisMinimumVersion=1.8 | ||
description=This is a test plugin for greeting the | ||
(going multiline) world, version is 1.7 | ||
version=version 1.7 | ||
author=Alessandro Pasotti | ||
email=apasotti@gmail.com | ||
|
||
|
||
changelog=this is a very | ||
very<br/> | ||
very | ||
very | ||
very | ||
very long multiline changelog | ||
|
||
|
||
tags= wkt, raster,hello world, spaced tag , tag | ||
|
||
tracker=http://bugs.itopen.it | ||
homepage=http://www.itopen.it | ||
repository=http://www.itopen.it/repo | ||
|
||
|
||
|
||
experimental=True | ||
|
||
|
||
; change icon... | ||
icon=icons/icon.png |
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