diff --git a/beePen_QWidget.py b/beePen_QWidget.py index 3a6ea60..1f31896 100644 --- a/beePen_QWidget.py +++ b/beePen_QWidget.py @@ -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 @@ -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") diff --git a/beePen_gui.py b/beePen_gui.py index 48b8a35..1b4db18 100644 --- a/beePen_gui.py +++ b/beePen_gui.py @@ -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) diff --git a/help/help.html b/help/help.html index 9a724dd..4596ce6 100644 --- a/help/help.html +++ b/help/help.html @@ -2,36 +2,56 @@ beePen help + -

beePen help

- +

beePen help

+

vers. 0.2.0 for QGIS 3

+ +
+ Plugin creators: Mauro Dedonatis (Urbino Univ., Italy, mauro.dedonatis@uniurb.it) and Mauro Alberti (alberti.m65 at gmail.com). +
The original concept is by Mauro DeDonatis, while the implementation is by Mauro Alberti. +
+
+
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 BeeGIS - 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 BeeGIS. + and based on the code by Pavol Kapusta in his Frehand Editing plugin. The plugin window is started by the "beePen" command (Fig. 1).

- -
Fig. 1. -


+
+

+

Fig. 1
+
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).
-
- -
Fig. 2. -


+
+

+

Fig. 2
+
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).
-
- -
Fig. 3. -
-
-

- The conception of beePen is by Mauro Dedonatis (Urbino Univ., Italy), while the implementation is by Mauro Alberti.
-
-
Milan, September 2016, by Mauro Alberti
+
+

+

Fig. 3
+
+
+

+
Text version: August 5, 2018, by Mauro Alberti
diff --git a/help/ims/beepen_window.png b/help/ims/beepen_window.png index 7acd87d..8ddebec 100644 Binary files a/help/ims/beepen_window.png and b/help/ims/beepen_window.png differ