Skip to content

Commit

Permalink
Merge pull request #70 from tudelft3d/gio-dev
Browse files Browse the repository at this point in the history
Changes towards v. 0.8.9
  • Loading branch information
gioagu authored Jul 23, 2024
2 parents cbb31b2 + aea0a38 commit 8653e6c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 46 deletions.
16 changes: 4 additions & 12 deletions cdb_tools_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ def initGui(self) -> None:
callback = self.run_admin,
parent = self.iface.mainWindow(),
add_to_menu = True,
# add_to_toolbar = False)
add_to_toolbar = True)

# Add separator
Expand All @@ -360,7 +359,7 @@ def initGui(self) -> None:
callback = self.run_usr_guide,
parent = self.iface.mainWindow(),
add_to_menu = True,
add_to_toolbar = False) # Default: False
add_to_toolbar = False)

# About Dialog - Leave this at the end, so it will be the last icon.
self.add_action(
Expand All @@ -369,7 +368,7 @@ def initGui(self) -> None:
callback = self.run_about,
parent = self.iface.mainWindow(),
add_to_menu = True,
add_to_toolbar = False) # Default: False
add_to_toolbar = True)

#####################################################################
#
Expand Down Expand Up @@ -662,15 +661,8 @@ def run_usr_guide(self) -> None:
Otherwise: Opens the url to the PDF in GitHub.
"""
file_name: str = "3DCityDB-Tools_UserGuide.pdf"

if self.PLATFORM_SYSTEM == "Windows":
# This will open a PDF viewer instead of the browser, if available
pdf_path = os.path.join(self.PLUGIN_ABS_PATH, "manuals", file_name)
sh_f.open_local_PDF(pdf_path=pdf_path)
else:
# For OS other than windows, stay safe and simply point to the PDF on GitHub
url = "/".join([self.URL_GITHUB_PLUGIN, "blob", "v." + self.PLUGIN_VERSION_TXT, "manuals", file_name])
sh_f.open_online_url(url=url)
url = "/".join([self.URL_GITHUB_PLUGIN, "blob", "v." + self.PLUGIN_VERSION_TXT, "manuals", file_name])
sh_f.open_online_url(url=url)

return None

Expand Down
4 changes: 2 additions & 2 deletions cdb_tools_main_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Plugin current version
PLUGIN_VERSION_MAJOR: int = 0
PLUGIN_VERSION_MINOR: int = 8
PLUGIN_VERSION_REV: int = 8
PLUGIN_VERSION_REV: int = 9

# Paths
PLUGIN_ABS_PATH: str = os.path.normpath(os.path.dirname(__file__))
Expand All @@ -38,7 +38,7 @@
MENU_LABEL_LOADER: str = "Layer Loader"
MENU_LABEL_DELETER: str = "Bulk Deleter"
MENU_LABEL_ADMIN: str = "QGIS Package Administrator"
MENU_LABEL_USRGUIDE: str= "User guide (PDF)"
MENU_LABEL_USRGUIDE: str= "User guide (Online PDF)"
MENU_LABEL_ABOUT: str = "About"

# Dialog names
Expand Down
Binary file modified manuals/3DCityDB-Tools_UserGuide.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name=3DCityDB Tools
qgisMinimumVersion=3.22
description=Tools to visualize and manipulate CityGML 2.0 data stored in the 3D City Database
version=0.8.8
version=0.8.9
author=Giorgio Agugiaro, Konstantinos Pantelios
[email protected], [email protected],

Expand All @@ -29,7 +29,8 @@ repository=https://github.com/tudelft3d/3DCityDB-Tools-for-QGIS
hasProcessingProvider=no

# Uncomment the following line and add your changelog:
changelog= 0.8.8 Minor edits
changelog= 0.8.9 Minor changes
0.8.8 Minor edits
0.8.7 Bug fixes and minor improvements
0.8.6 Added About dialog GUI and other minor improvements
0.8.5 Fixed minor bugs in the QGIS client
Expand Down
36 changes: 6 additions & 30 deletions shared/gui_about/about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,36 +181,6 @@ def evt_btn3DCityDBInstall_clicked(self) -> None:
For Windows OS: Opens the default web browser with the PDF file containing the installation and user guide.
Otherwise: Opens the url to GitHub where the PDFs are stored.
"""
# To be activated once we have the PDFs for each main OS
if self.PLATFORM_SYSTEM == "Windows":
file_name: str = "3DCityDB_Suite_QuickInstall_Windows.pdf"
# elif self.PLATFORM_SYSTEM == "Darwin":
# file_name: str = "3DCityDB_Suite_QuickInstall_macOS.pdf"
# elif self.PLATFORM_SYSTEM == "Linux":
# file_name: str = "3DCityDB_Suite_QuickInstall_Linux.pdf"
# else:
# file_name: str = "3DCityDB_Suite_QuickInstall_Linux.pdf"

# **************************************
# Only for testing purposes
#
# self.PLATFORM_SYSTEM = "Darwin"
#
# **************************************

if self.PLATFORM_SYSTEM == "Windows":
# This will open a PDF viewer instead of the browser
pdf_path = os.path.join(self.PLUGIN_ABS_PATH, "manuals", "3dcitydb_install", file_name)
# print(pdf_path)
sh_f.open_local_PDF(pdf_path)
else:
# url = "/".join([self.URL_GITHUB_PLUGIN, "blob", "v." + self.PLUGIN_VERSION_TXT, "manuals", "3dcitydb_install", file_name])

# For OSes other than Windows, simply point to the GitHub folder because
# we cannot automatically guess which default PDF reader (if any) they have on their system
url = "/".join([self.URL_GITHUB_PLUGIN, "blob", "v." + self.PLUGIN_VERSION_TXT, "manuals", "3dcitydb_install"])
# print(url)
sh_f.open_online_url(url)

# **************************************
# Only for testing purposes
Expand All @@ -221,6 +191,12 @@ def evt_btn3DCityDBInstall_clicked(self) -> None:
#
# **************************************

# Simply point to the GitHub folder because
url = "/".join([self.URL_GITHUB_PLUGIN, "blob", "v." + self.PLUGIN_VERSION_TXT, "manuals", "3dcitydb_install"])
# print(url)
sh_f.open_online_url(url)


return None


Expand Down
15 changes: 15 additions & 0 deletions shared/gui_about/html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ <h4>Main changes</h4>
<div>
-->

<div id="0.8.9">
<h3>Version 0.8.9 (2024-07-23)</h3>
<h4>Main changes</h4>
<p>
<ul class="l1">
<li>Client-side
<ul class="l2">
<li>Removed links to local copies of Manual/Installation Guide. Now point only to GitHub</li>
</ul>
</li>
<li>Minor code edits</li>
</ul>
</p>
<div>

<div id="0.8.8">
<h3>Version 0.8.8 (2024-07-04)</h3>
<h4>Main changes</h4>
Expand Down

0 comments on commit 8653e6c

Please sign in to comment.