Skip to content

Commit

Permalink
[v0.3.0] Added changelog for v0.3.0. Added link to documentation (it'…
Browse files Browse the repository at this point in the history
…s aware of language [en|es]).
  • Loading branch information
gacarrillor committed Aug 18, 2016
1 parent 4032dc0 commit 2672d3b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 9 deletions.
5 changes: 4 additions & 1 deletion AutoFields.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class AutoFields:
def __init__( self, iface ):
self.iface = iface
self.messageMode = 'production' # 'production' or 'debug'
self.language='en'
self.installTranslator()


Expand Down Expand Up @@ -76,7 +77,7 @@ def initGui( self ):
self.autoFieldManager = AutoFieldManager( self.messageManager, self.iface )
self.autoFieldManager.readAutoFields()

self.dockWidget = AutoFieldsDockWidget( self.iface.mainWindow(), self.iface, self.autoFieldManager, self.messageManager )
self.dockWidget = AutoFieldsDockWidget( self.iface.mainWindow(), self.iface, self.autoFieldManager, self.messageManager, self.language )
self.iface.addDockWidget( Qt.RightDockWidgetArea, self.dockWidget )


Expand All @@ -103,6 +104,8 @@ def installTranslator( self ):

locale = QSettings().value( "locale/userLocale", type=str )
myLocale = str( locale[0:2] )
if myLocale == 'es':
self.language='es'

if os.path.exists( userPluginPath ):
translationPath = os.path.join( userPluginPath, 'i18n', "AutoFields_" + myLocale + ".qm" )
Expand Down
12 changes: 11 additions & 1 deletion AutoFieldsDockWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
class AutoFieldsDockWidget( QDockWidget, Ui_AutoFieldsDockWidget ):
""" Class in charge of all the UI logic """

def __init__( self, parent, iface, autoFieldManager, messageManager ):
def __init__( self, parent, iface, autoFieldManager, messageManager, language='en' ):
self.iface = iface
self.msg = messageManager
self.language = language
QDockWidget.__init__( self, parent )
# Set up the user interface from Designer.
self.setupUi( self )
Expand Down Expand Up @@ -107,6 +108,9 @@ def __init__( self, parent, iface, autoFieldManager, messageManager ):
self.chkOnlyEnabledAutoFields.toggled.connect( self.saveShowOnlyEnabledPreference )
self.btnRemoveAutoFields.clicked.connect( self.removeAutoFieldFromTable )

# About Tab
self.btnHelp.clicked.connect( self.openDocumentation )


def populateLayersTable( self, foo=None, foo2=None, foo3=None ):
""" List vector layers that support changes in attributes and are writable.
Expand Down Expand Up @@ -590,6 +594,12 @@ def saveShowOnlyEnabledPreference( self, status ):
self.populateAutoFieldsTable()


def openDocumentation( self ):
""" Open a browser to show documentation page """
import webbrowser
webbrowser.open( "http://geotux.tuxfamily.org/index.php/"+ self.language +"/geo-blogs/item/333-autofields-plugin-for-qgis" )


def disconnectAll( self ):
""" Terminates all SIGNAL/SLOT connections created by this class """
QgsMapLayerRegistry.instance().legendLayersAdded.disconnect( self.populateLayersTable )
Expand Down
1 change: 0 additions & 1 deletion MessageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
***************************************************************************/
"""
#from qgis.core import QgsMessageLog
from qgis.gui import QgsMessageBar
from PyQt4.QtGui import QPushButton

class MessageManager():
Expand Down
4 changes: 2 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def description():
return "Automatic vector field updates when modifying or creating features"

def version():
return "Version 0.2.7"
return "Version 0.3.0"

def qgisMinimumVersion():
return "2.0"
return "2.12"

def icon():
return "icon.png"
Expand Down
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
Changes:
[0.3.0] (20160817)
- Official release!
- AutoFieldManager: normalize sources from 'Add PostgreSQL layer' and
DBManager so that they coincide.
- AutoFieldManager: Make createAutoFields return the autoFieldId on success,
as it can be used later to remove the AutoField via removeAutoField.
- GUI: Layer list now listens to Layer Tree SIGNALs to keep itself updated.
- Added link to documentation from About tab. It's aware of language [en|es].
[0.2.7] (20160804)
- Implement order for AutoFields storage and for setting event connections,
so that scenarios of AutoFields depending on other AutoFields become
Expand Down
16 changes: 12 additions & 4 deletions metadata.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
[general]
name=AutoFields
description=Automatic attribute updates when creating or modifying vector features
version=0.2.7
qgisMinimumVersion=2.0
version=0.3.0
qgisMinimumVersion=2.12
category=Vector
author=Germán Carrillo (GeoTux)
[email protected]
changelog=
[0.2.7] (20160804)
[0.3.0] (20160817)
- Official release!
- AutoFieldManager: normalize sources from 'Add PostgreSQL layer' and
DBManager so that they coincide.
- AutoFieldManager: Make createAutoFields return the autoFieldId on success,
as it can be used later to remove the AutoField via removeAutoField.
- GUI: Layer list now listens to Layer Tree SIGNALs to keep itself updated.
- Added link to documentation from About tab. It's aware of language [en|es].
[0.2.7] (20160804)
- Implement order for AutoFields storage and for setting event connections,
so that scenarios of AutoFields depending on other AutoFields become
predictable.
Expand Down Expand Up @@ -57,7 +65,7 @@ tags=area, auto, automatic, attribute, calculation, column, coordinates,
expression, feature, field, fill, geometry, layer, populate, property,
refresh, shapefile, trigger, update, vector
about=This plugin allows you to configure vector fields to be automatically calculated for you when digitizing new features or modifying existing ones. Think about it as triggers in a database or as an automatic Field Calculator.
homepage=http://geotux.tuxfamily.org
homepage=http://geotux.tuxfamily.org/index.php/en/geo-blogs/item/333-autofields-plugin-for-qgis
tracker=https://github.com/gacarrillor/AutoFields/issues
repository=https://github.com/gacarrillor/AutoFields
icon=icon.png
Expand Down

0 comments on commit 2672d3b

Please sign in to comment.