Skip to content

Commit

Permalink
Vers. 0.2.0 for QGIS3
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroalberti committed Aug 5, 2018
1 parent d6ed5c4 commit 8ac7ec8
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 29 deletions.
31 changes: 23 additions & 8 deletions beePen_QWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,9 @@ def setup_gui(self):
self.setWindowTitle(self.plugin_name)

def open_help_page(self):

import webbrowser
local_url = os.path.dirname(os.path.realpath(__file__)) + os.sep + "help" + os.sep + "help.html"
local_url = local_url.replace("\\","/")
if not webbrowser.open(local_url):
warn(self.main_window,
self.plugin_name,
"Error with browser.\nOpen help/help.html")

dialog = HelpDialog()
dialog.exec_()

def get_prjcrs_as_proj4str(self):
# get project CRS information
Expand Down Expand Up @@ -245,6 +240,26 @@ def error(self, msg):
QMessageBox.error(self, self.plugin_name, msg)


class HelpDialog(QDialog):

def __init__(self, parent=None):

super(HelpDialog, self).__init__(parent)

layout = QVBoxLayout()

# About section

helpTextBrwsr = QTextBrowser(self)

helpTextBrwsr.setSource(QUrl('{}/help/help.html'.format(os.path.dirname(__file__))))
helpTextBrwsr.setSearchPaths(['{}/help'.format(os.path.dirname(__file__))])

layout.addWidget(helpTextBrwsr)

self.setLayout(layout)

self.setWindowTitle("beePen Help")



2 changes: 1 addition & 1 deletion beePen_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def erase_features(self):
"First launch %s" % self.plugin_name)
return

self.eraser_tool = EraserTool(self.canvas)
self.eraser_tool = EraserTool(self.interface, self.canvas)

self.canvas.setMapTool(self.eraser_tool)
self.beePen_rubber_QAction.setChecked(True)
Expand Down
60 changes: 40 additions & 20 deletions help/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,56 @@
<html>
<head>
<title>beePen help</title>
<style>
h5 { font-size: 95%; color: #333; }
img { max-width: 95%; }
figure {
text-align: center;
font-style: italic;
font-size: smaller;
text-indent: 0;
border: thin silver solid;
margin: 0.5em;
padding: 0.5em;
}
figcaption { font-size: 95%; color: #333; }
</style>
</head>

<h1>beePen help</h1>

<h2>beePen help</h2>
<h3>vers. 0.2.0 for QGIS 3</h3>

<div style="font-size: 90%; font-style: italic;">
Plugin creators: Mauro Dedonatis (Urbino Univ., Italy, [email protected]) and Mauro Alberti (alberti.m65 at gmail.com).
<br />The original concept is by Mauro DeDonatis, while the implementation is by Mauro Alberti.
</div>
<br />
<div>
beePen is a Python plugin for drawing freeand annotations and sketches in an ad-hoc layer in QGis.
It is inspired by the corresponding tool in <a href="http://www.beegis.org/" target="_blank">BeeGIS</a>
and re-use the code by Pavol Kapusta in his Frehand Editing plugin. The plugin window is started by the "beePen" command (Fig. 1).
It is inspired by the corresponding tool in <a href="http://www.beegis.org/" target="_blank">BeeGIS</a>.
and based on the code by Pavol Kapusta in his Frehand Editing plugin. The plugin window is started by the "beePen" command (Fig. 1).
<br /><br />
<img src="ims/beepen_icon.png">
<br/>Fig. 1.
<br /><br /><br />
<figure>
<p><img src="ims/beepen_icon.png">
<figcaption>Fig. 1</figcaption>
</figure>
beePen allows to create an annotation layer, that is characterized by three fields, storing: 1) the user-defined width (in map units); 2) the color and transparency of the pen;
3) the optional note to be associated with each element.
These value are automatically inserted based on the user choice in the plugin window (Fig. 2).<br />
<br />
<img src="ims/beepen_window.png">
<br/>Fig. 2.
<br /><br /><br />
<figure>
<p><img src="ims/beepen_window.png">
<figcaption>Fig. 2</figcaption>
</figure>
To draw annotations, create a new annotation layer from the beePen window (see Fig. 2) or load an existing one with QGIS (and style it if necessary
with the "Style selected layers" command), and then draw annotations by selecting the pen tool (command with pencil icon in Fig. 3).
You can delete one or more annotations by drawing a line above them with the eraser tool (rightmost command in Fig. 3).<br />
<br />
<img src="ims/beepen_commands.png">
<br/>Fig. 3.
<br />
<div>
<br /><br />
The conception of beePen is by Mauro Dedonatis (Urbino Univ., Italy), while the implementation is by Mauro Alberti.</div>
<br />
<div style="font-style: italic; font-size:90%">Milan, September 2016, by Mauro Alberti</div>
<figure>
<p><img src="ims/beepen_commands.png">
<figcaption>Fig. 3</figcaption>
</figure>
</div>
<br /><br />
<div style="font-style: italic; font-size:80%">Text version: August 5, 2018, by Mauro Alberti</div>



Expand Down
Binary file modified help/ims/beepen_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8ac7ec8

Please sign in to comment.