Skip to content

Commit

Permalink
Added sum-unit pencil widths
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroalberti committed Feb 28, 2016
1 parent 34696c0 commit f43b372
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions beePen_QWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def create_annotation_layer(self):
shape_name = file_path.split("/")[-1].split(".")[0]
geom_type = ogr.wkbLineString

fields_dict_list = [{"name": "width", "ogr_type": ogr.OFTInteger},
fields_dict_list = [{"name": "width", "ogr_type": ogr.OFTReal},
{"name": "transp", "ogr_type": ogr.OFTInteger},
{"name": "color", "ogr_type": ogr.OFTString, "width": 20}]

Expand All @@ -170,7 +170,7 @@ def get_current_color_name_choice(self):

def get_current_pencil_width_choice(self):

self.pencil_width = int(self.pen_width_QComboBox.currentText())
self.pencil_width = float(self.pen_width_QComboBox.currentText())
# self.info("Width is %d" % (self.pencil_width))
self.style_signal.emit("width", str(self.pencil_width))

Expand Down
2 changes: 1 addition & 1 deletion beePen_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, interface):
self.pencil_active = False
self.plugin_name = "beePen"

self.pen_widths = [1,5,10,25,50,100,250,500,750,1000]
self.pen_widths = [0.01, 0.02, 0.05, 0.08, 0.1, 0.2, 0.5, 1,5,10,25,50,100,250,500,750,1000]
self.pen_transparencies = [0,25,50,75]
self.pen_colors = ["blue","red","yellow","green","orange","violet","pink"]

Expand Down
2 changes: 1 addition & 1 deletion freehandeditingtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def update_pen_style(self, name, parameter):
if name == "color":
self.color_name = parameter
elif name == "width":
self.pencil_width = int(parameter)
self.pencil_width = float(parameter)
elif name == "transparency":
self.transparency = int(parameter)

Expand Down
5 changes: 3 additions & 2 deletions metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name=beePen
description=Allows to draw freehand lines in a layer
category=Vector
version=0.0.8
version=0.0.9
experimental=False
qgisMinimumVersion=2.0
author=Mauro Alberti, Mauro DeDonatis
Expand All @@ -18,7 +18,8 @@ changelog=
0.0.6 : - pencil widths in map units, so they scale correctly with map extent
0.0.7 : - removed unwanted styling on non-annotation layers
0.0.8 : - removed bug appearing when multiple clicks on pencil tool; added eraser tool

0.0.8 : - added sub-unit pencil widths

; tags are in comma separated value format, spaces are allowed
tags = annotation, field work, geology, mapping

Expand Down

0 comments on commit f43b372

Please sign in to comment.