Skip to content

Commit

Permalink
Fixed missing icon in button
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroalberti committed Aug 7, 2018
1 parent 115bdf2 commit 532a5d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 33 deletions.
6 changes: 4 additions & 2 deletions DirectionalSlope.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ def initGui(self):

# Create action that will start plugin configuration

self.action = QAction(QIcon(":/plugins/DirectionalSlope/icon.png"), \
"DirectionalSlope", self.iface.mainWindow())
self.action = QAction(
QIcon(":/plugins/DirectionalSlope/icons/icon.png"),
"DirectionalSlope",
self.iface.mainWindow())

# connect the action to the run method

Expand Down
4 changes: 2 additions & 2 deletions DirectionalSlope_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ def setupAboutTab(self):
"</style></head><body style=\" font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Directional Slope </span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Vers. 1.3 - July, 20, 2018.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Vers. 1.3.1 - August, 7, 2018.</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> Created by Mauro Alberti - </span><a href=\"mailto:[email protected]\"><span style=\" text-decoration: underline; color:#0000ff;\">[email protected]</span></a></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span> License: GPL vers. 3.</span></p>\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span>See </span><a href=\"http://www.malg.eu/\"><span style=\" text-decoration: underline; color:#0000ff;\">www.malg.eu</span></a><span> for updates.</span></p></body></html>")
"</body></html>")

self.about_textBrwsr.setOpenExternalLinks(True)

Expand Down
9 changes: 5 additions & 4 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=DirectionalSlope
description=Calculates directional slope along given and variable orientations
about=This plugin allows to calculate directional slope along uniform or spatially-variable orientations, from a source DEM
category=Plugins
version=1.3
version=1.3.1
experimental=False
qgisMinimumVersion=3.0
author=Mauro Alberti
Expand All @@ -14,9 +14,10 @@ repository=https://github.com/mauroalberti/directionalslope

; start of optional metadata
changelog=
1.2.0: version compatible with QGis 2.0
1.2.1: corrected erroneous concept in Help; minor code reformatting
1.3 : ported to QGIS3
1.2.0 : version compatible with QGis 2.0
1.2.1 : corrected erroneous concept in Help; minor code reformatting
1.3.0 : ported to QGIS3
1.3.1 : fixed missing icon in menu button

; tags are in comma separated value format, spaces are allowed
tags=directional slope,dem,geomorphology
Expand Down
29 changes: 4 additions & 25 deletions resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.9.3)
# Created by: The Resource Compiler for PyQt5 (Qt v5.5.1)
#
# WARNING! All changes made in this file will be lost!

Expand Down Expand Up @@ -114,39 +114,18 @@
\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
"

qt_resource_struct_v1 = b"\
qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x3a\x00\x02\x00\x00\x00\x01\x00\x00\x00\x04\
\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"

qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x3a\x00\x02\x00\x00\x00\x01\x00\x00\x00\x04\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x64\xa4\x7f\x54\xb7\
"

qt_version = QtCore.qVersion().split('.')
if qt_version < ['5', '8', '0']:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2

def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)

def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)

qInitResources()

0 comments on commit 532a5d9

Please sign in to comment.