-
Notifications
You must be signed in to change notification settings - Fork 0
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
12 changed files
with
73 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,5 @@ distances-aligned.csv | |
i18n/*.qm | ||
DistanceMatrixToCoords.zip | ||
i18n/latest_run | ||
|
||
.coverage |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# import qgis libs so that ve set the correct sip api version | ||
import qgis # pylint: disable=W0611 # NOQA | ||
import qgis # pylint: disable=W0611 # NOQA |
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 |
---|---|---|
|
@@ -13,6 +13,10 @@ | |
Copyright (c) 2014 Tim Sutton, [email protected] | ||
""" | ||
import logging | ||
from PyQt4.QtCore import QObject, pyqtSlot, pyqtSignal | ||
from qgis.core import QgsMapLayerRegistry | ||
from qgis.gui import QgsMapCanvasLayer | ||
|
||
__author__ = '[email protected]' | ||
__revision__ = '$Format:%H$' | ||
|
@@ -23,14 +27,10 @@ | |
'Copyright (c) 2014 Tim Sutton, [email protected]' | ||
) | ||
|
||
import logging | ||
from PyQt4.QtCore import QObject, pyqtSlot, pyqtSignal | ||
from qgis.core import QgsMapLayerRegistry | ||
from qgis.gui import QgsMapCanvasLayer | ||
LOGGER = logging.getLogger('QGIS') | ||
|
||
|
||
#noinspection PyMethodMayBeStatic,PyPep8Naming | ||
# noinspection PyMethodMayBeStatic,PyPep8Naming | ||
class QgisInterface(QObject): | ||
"""Class to expose QGIS objects and functions to plugins. | ||
|
@@ -67,9 +67,9 @@ def addLayers(self, layers): | |
.. note:: The QgsInterface api does not include this method, | ||
it is added here as a helper to facilitate testing. | ||
""" | ||
#LOGGER.debug('addLayers called on qgis_interface') | ||
#LOGGER.debug('Number of layers being added: %s' % len(layers)) | ||
#LOGGER.debug('Layer Count Before: %s' % len(self.canvas.layers())) | ||
# LOGGER.debug('addLayers called on qgis_interface') | ||
# LOGGER.debug('Number of layers being added: %s' % len(layers)) | ||
# LOGGER.debug('Layer Count Before: %s' % len(self.canvas.layers())) | ||
current_layers = self.canvas.layers() | ||
final_layers = [] | ||
for layer in current_layers: | ||
|
@@ -78,7 +78,7 @@ def addLayers(self, layers): | |
final_layers.append(QgsMapCanvasLayer(layer)) | ||
|
||
self.canvas.setLayerSet(final_layers) | ||
#LOGGER.debug('Layer Count After: %s' % len(self.canvas.layers())) | ||
# LOGGER.debug('Layer Count After: %s' % len(self.canvas.layers())) | ||
|
||
@pyqtSlot('QgsMapLayer') | ||
def addLayer(self, layer): | ||
|
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 |
---|---|---|
|
@@ -8,17 +8,15 @@ | |
""" | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '2017-01-04' | ||
__copyright__ = 'Copyright 2017, Mario Frasca' | ||
|
||
import unittest | ||
|
||
from PyQt4.QtGui import QDialogButtonBox, QDialog | ||
|
||
from ghini_tree_position_dialog import DistanceMatrixToCoordsDialog | ||
|
||
from utilities import get_qgis_app | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '2017-01-04' | ||
__copyright__ = 'Copyright 2017, Mario Frasca' | ||
|
||
QGIS_APP = get_qgis_app() | ||
|
||
|
||
|
@@ -52,4 +50,3 @@ def test_dialog_cancel(self): | |
suite = unittest.makeSuite(DistanceMatrixToCoordsDialogTest) | ||
runner = unittest.TextTestRunner(verbosity=2) | ||
runner.run(suite) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# coding=utf-8 | ||
"""Tests QGIS plugin init.""" | ||
|
||
import os | ||
import unittest | ||
import logging | ||
import ConfigParser | ||
|
||
__author__ = 'Tim Sutton <[email protected]>' | ||
__revision__ = '$Format:%H$' | ||
__date__ = '17/10/2010' | ||
__license__ = "GPL" | ||
__copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' | ||
__copyright__ += 'Disaster Reduction' | ||
|
||
import os | ||
import unittest | ||
import logging | ||
import ConfigParser | ||
|
||
LOGGER = logging.getLogger('QGIS') | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -8,11 +8,6 @@ | |
(at your option) any later version. | ||
""" | ||
__author__ = '[email protected]' | ||
__date__ = '20/01/2011' | ||
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' | ||
'Disaster Reduction') | ||
|
||
import os | ||
import unittest | ||
from qgis.core import ( | ||
|
@@ -21,6 +16,12 @@ | |
QgsRasterLayer) | ||
|
||
from utilities import get_qgis_app | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '20/01/2011' | ||
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' | ||
'Disaster Reduction') | ||
|
||
QGIS_APP = get_qgis_app() | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -8,14 +8,13 @@ | |
""" | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '2017-01-04' | ||
__copyright__ = 'Copyright 2017, Mario Frasca' | ||
|
||
import unittest | ||
|
||
from PyQt4.QtGui import QIcon | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '2017-01-04' | ||
__copyright__ = 'Copyright 2017, Mario Frasca' | ||
|
||
|
||
class DistanceMatrixToCoordsDialogTest(unittest.TestCase): | ||
|
@@ -39,6 +38,3 @@ def test_icon_png(self): | |
suite = unittest.makeSuite(DistanceMatrixToCoordsResourcesTest) | ||
runner = unittest.TextTestRunner(verbosity=2) | ||
runner.run(suite) | ||
|
||
|
||
|
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 |
---|---|---|
|
@@ -8,15 +8,14 @@ | |
""" | ||
from utilities import get_qgis_app | ||
import unittest | ||
import os | ||
from PyQt4.QtCore import QCoreApplication, QTranslator | ||
|
||
__author__ = '[email protected]' | ||
__date__ = '12/10/2011' | ||
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' | ||
'Disaster Reduction') | ||
import unittest | ||
import os | ||
|
||
from PyQt4.QtCore import QCoreApplication, QTranslator | ||
|
||
QGIS_APP = get_qgis_app() | ||
|
||
|
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