Browse Source

add link to documentation and overpass turbo

tags/1.0
Etienne Trimaille 5 years ago
parent
commit
c0dfc680c0
6 changed files with 93 additions and 9 deletions
  1. 1
    0
      resources.qrc
  2. BIN
      resources/turbo.png
  3. 37
    8
      resources_rc.py
  4. 15
    1
      ui/query.py
  5. 22
    0
      ui/query.ui
  6. 18
    0
      ui/query_dialog.py

+ 1
- 0
resources.qrc View File

@@ -11,5 +11,6 @@
<file>resources/quick.png</file>
<file>resources/gnu.png</file>
<file>resources/info.png</file>
<file>resources/turbo.png</file>
</qresource>
</RCC>

BIN
resources/turbo.png View File


+ 37
- 8
resources_rc.py View File

@@ -2,7 +2,7 @@

# Resource object code
#
# Created: lun. juil. 28 11:48:36 2014
# Created: mar. juil. 29 17:25:05 2014
# by: The Resource Compiler for PyQt (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
@@ -3658,6 +3658,30 @@ qt_resource_data = "\
\xd1\xa2\x45\x8b\x16\x2d\x5a\xb4\x68\xd1\xa2\x45\x8b\x16\x2f\x33\
\xff\x07\xa7\x32\xf5\x6f\x61\xb9\x75\x56\x00\x00\x00\x00\x49\x45\
\x4e\x44\xae\x42\x60\x82\
\x00\x00\x01\x5f\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x10\x00\x00\x00\x10\x08\x04\x00\x00\x00\xb5\xfa\x37\xea\
\x00\x00\x01\x26\x49\x44\x41\x54\x28\xcf\x5d\xd1\x3f\x4a\x03\x61\
\x10\x87\xe1\x47\x12\x85\xd4\x5b\x59\x68\xd2\x59\x68\x0e\x10\x41\
\x4b\x49\x63\x63\xe5\x21\xb6\x0c\x7c\x5a\xe5\x10\x5a\x58\xe4\x0c\
\xe6\x00\x12\xad\xa2\x9d\x20\xbb\xa0\x6e\x56\x93\x10\x0b\xc1\x3f\
\xa0\x42\xd0\xce\x22\x5b\x18\x67\xba\x81\xdf\x0c\xf3\xbe\x40\x49\
\x64\x53\x70\xe1\xcb\x9b\x9e\x60\x53\xa4\xa4\xa8\xb2\x9a\x58\x5f\
\x66\x20\x97\xc9\x64\xfa\x62\x35\xe5\x59\xba\xa6\x2d\x91\xeb\x6a\
\xd9\xb5\xab\xa5\x2b\x97\x68\xab\x29\x11\x89\xa5\x12\x41\x5d\xa4\
\xa2\x22\x52\x17\x24\x12\xb1\x88\x86\x4b\x13\x87\xaa\xb3\x85\xc5\
\xd1\xaa\x03\x0f\xfa\x1a\x1c\x78\x32\xb4\x6f\xd5\x92\x85\xa2\x97\
\xac\xda\x73\xe5\x51\xe0\xdc\xa7\x6f\x89\x63\xdb\xd6\xad\x59\xb3\
\x6e\xdb\xb1\x1b\x9f\x3e\x9c\xf3\x6a\x6a\xec\xde\xd8\x9d\x6b\x5d\
\x5d\xd7\xee\x8a\xc9\xd4\x2b\x2f\x86\x62\x4d\x1d\xa9\x89\x13\x27\
\x26\x52\x1d\x4d\xb1\xa1\x17\x7a\x32\x2d\xcb\x56\xec\x38\x33\x32\
\x72\x66\xc7\x8a\x65\x2d\x99\x1e\x41\xe6\x54\x5d\x59\x45\xd3\xc0\
\x40\x53\x45\x59\xdd\xa9\x4c\xa0\xa1\x2f\x17\x54\x2d\xda\x90\x4a\
\x6d\x58\x54\x15\xe4\xb3\x37\x23\xb1\xa4\x00\xb5\xe5\xd6\xad\xad\
\x79\x50\x7f\x51\x1f\x79\xf6\xec\x68\x1e\xf5\x5f\x59\x63\x3f\xbe\
\x8d\xe6\x65\xfd\xd7\xfd\x3e\xaf\xfb\x17\xba\x23\x79\x7e\x1a\xb6\
\x4b\x97\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
\x00\x00\x22\xb8\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
@@ -6552,6 +6576,10 @@ qt_resource_name = "\
\x00\x67\
\x00\x6e\x00\x75\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x09\
\x08\x92\xa0\xc7\
\x00\x74\
\x00\x75\x00\x72\x00\x62\x00\x6f\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x09\
\x0f\x9e\xa6\x27\
\x00\x71\
\x00\x75\x00\x69\x00\x63\x00\x6b\x00\x2e\x00\x70\x00\x6e\x00\x67\
@@ -6582,17 +6610,18 @@ qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x14\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\
\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x00\x40\x00\x02\x00\x00\x00\x0a\x00\x00\x00\x05\
\x00\x00\x00\x40\x00\x02\x00\x00\x00\x0b\x00\x00\x00\x05\
\x00\x00\x00\x6e\x00\x00\x00\x00\x00\x01\x00\x00\x25\x1b\
\x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\x01\x5d\x80\
\x00\x00\x01\x2e\x00\x00\x00\x00\x00\x01\x00\x01\x5e\xe3\
\x00\x00\x00\x58\x00\x00\x00\x00\x00\x01\x00\x00\x0b\xe1\
\x00\x00\x01\x36\x00\x00\x00\x00\x00\x01\x00\x01\x93\x77\
\x00\x00\x01\x4e\x00\x00\x00\x00\x00\x01\x00\x01\x94\xda\
\x00\x00\x00\x84\x00\x00\x00\x00\x00\x01\x00\x00\x94\xea\
\x00\x00\x00\xfa\x00\x01\x00\x00\x00\x01\x00\x01\x39\xdd\
\x00\x00\x00\xc8\x00\x00\x00\x00\x00\x01\x00\x01\x06\x0c\
\x00\x00\x00\xde\x00\x00\x00\x00\x00\x01\x00\x01\x37\xb4\
\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x01\x00\x00\x9d\xa5\
\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x01\x00\x00\xe3\x50\
\x00\x00\x01\x12\x00\x01\x00\x00\x00\x01\x00\x01\x3b\x40\
\x00\x00\x00\xe0\x00\x00\x00\x00\x00\x01\x00\x01\x07\x6f\
\x00\x00\x00\xf6\x00\x00\x00\x00\x00\x01\x00\x01\x39\x17\
\x00\x00\x00\x9c\x00\x00\x00\x00\x00\x01\x00\x00\x9d\xa5\
\x00\x00\x00\xc8\x00\x00\x00\x00\x00\x01\x00\x00\xe4\xb3\
"

def qInitResources():

+ 15
- 1
ui/query.py View File

@@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'query.ui'
#
# Created: Thu Jul 24 11:29:34 2014
# Created: Tue Jul 29 17:25:54 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
@@ -186,6 +186,18 @@ class Ui_ui_query(object):
self.progressBar_execution.setProperty("value", 0)
self.progressBar_execution.setObjectName(_fromUtf8("progressBar_execution"))
self.verticalLayout.addWidget(self.progressBar_execution)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.pushButton_overpassTurbo = QtGui.QPushButton(ui_query)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/QuickOSM/resources/turbo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.pushButton_overpassTurbo.setIcon(icon1)
self.pushButton_overpassTurbo.setObjectName(_fromUtf8("pushButton_overpassTurbo"))
self.horizontalLayout_5.addWidget(self.pushButton_overpassTurbo)
self.pushButton_docOverpass = QtGui.QPushButton(ui_query)
self.pushButton_docOverpass.setObjectName(_fromUtf8("pushButton_docOverpass"))
self.horizontalLayout_5.addWidget(self.pushButton_docOverpass)
self.verticalLayout.addLayout(self.horizontalLayout_5)
spacerItem = QtGui.QSpacerItem(20, 71, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)

@@ -221,6 +233,8 @@ class Ui_ui_query(object):
self.pushButton_generateQuery.setText(_translate("ui_query", "Generate query", None))
self.pushButton_runQuery.setText(_translate("ui_query", "Run query", None))
self.pushButton_saveQuery.setText(_translate("ui_query", "Save query", None))
self.pushButton_overpassTurbo.setText(_translate("ui_query", "Overpass Turbo", None))
self.pushButton_docOverpass.setText(_translate("ui_query", "Overpass\'s documentation", None))

from qgis.gui import QgsCollapsibleGroupBox
from QuickOSM import resources_rc

+ 22
- 0
ui/query.ui View File

@@ -318,6 +318,28 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="pushButton_overpassTurbo">
<property name="text">
<string>Overpass Turbo</string>
</property>
<property name="icon">
<iconset resource="../resources.qrc">
<normaloff>:/plugins/QuickOSM/resources/turbo.png</normaloff>:/plugins/QuickOSM/resources/turbo.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_docOverpass">
<property name="text">
<string>Overpass's documentation</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">

+ 18
- 0
ui/query_dialog.py View File

@@ -77,6 +77,8 @@ class QueryWidget(QuickOSMWidget, Ui_ui_query):
self.textEdit_query.cursorPositionChanged.connect(self.allowNominatimOrExtent)
self.radioButton_extentLayer.toggled.connect(self.extentRadio)
self.pushButton_refreshLayers.clicked.connect(self.fillLayerCombobox)
self.pushButton_docOverpass.clicked.connect(self.openDocOverpass)
self.pushButton_overpassTurbo.clicked.connect(self.openOverpassTurbo)

def allowNominatimOrExtent(self):
'''
@@ -218,6 +220,22 @@ class QueryWidget(QuickOSMWidget, Ui_ui_query):
saveQueryDialog = SaveQueryDialog(query=query,outputGeomTypes=outputGeomTypes,whiteListValues=whiteListValues)
saveQueryDialog.signalNewQuerySuccessful.connect(self.signalNewQuerySuccessful.emit)
saveQueryDialog.exec_()

def openOverpassTurbo(self):
'''
Open Overpass Turbo
'''
desktopService = QDesktopServices()
desktopService.openUrl(QUrl("http://overpass-turbo.eu/"))
def openDocOverpass(self):
'''
Open Overpass's documentation
'''
desktopService = QDesktopServices()
desktopService.openUrl(QUrl("http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide"))

class QueryDockWidget(QDockWidget):
def __init__(self, parent=None):

Loading…
Cancel
Save