Skip to content
Permalink
Browse files
add helpful info to GdalTools Settings dialog on how to configure GDA…
…L path
  • Loading branch information
brushtyler committed Dec 1, 2011
1 parent 99edf1d commit 0e0947f048d2c0758daeb441095407e76d33267b
Binary file not shown.
@@ -24,5 +24,6 @@
<file>icons/fillnodata.png</file>
<file>icons/edit.png</file>
<file>icons/reset.png</file>
<file>icons/tooltip.png</file>
</qresource>
</RCC>
@@ -7,19 +7,36 @@
<x>0</x>
<y>0</y>
<width>368</width>
<height>324</height>
<height>337</height>
</rect>
</property>
<property name="windowTitle">
<string>Gdal Tools settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Path to the GDAL binaries</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Path to the GDAL binaries</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="bin_tooltip_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">##tooltip icon##</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
@@ -36,11 +53,28 @@
</layout>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>GDAL help path</string>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>GDAL help path</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="help_tooltip_label">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string notr="true">##tooltip icon##</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
@@ -8,18 +8,34 @@
from ui_dialogSettings import Ui_GdalToolsSettingsDialog as Ui_Dialog
import GdalTools_utils as Utils

from .. import resources_rc

class GdalToolsSettingsDialog( QDialog, Ui_Dialog ):
def __init__( self, iface ):
QDialog.__init__( self, iface.mainWindow() )
self.setAttribute(Qt.WA_DeleteOnClose)
self.iface = iface
self.setupUi( self )

# binaries
self.leGdalBinPath.setText( Utils.getGdalPath() )
self.leGdalHelpPath.setText( Utils.getHelpPath() )

QObject.connect( self.btnSetBinPath, SIGNAL( "clicked()" ), self.setBinPath )
self.bin_tooltip_label.setPixmap( QPixmap(':/icons/tooltip.png') )
self.bin_tooltip_label.setToolTip( self.tr( \
u"""A list of colon-separated (Linux and MacOS) or
semicolon-separated (Windows) paths to executables.
MacOS users usually need to set it to something like
/Library/Frameworks/GDAL.framework/Versions/1.8/Programs""") )

# help
self.leGdalHelpPath.setText( Utils.getHelpPath() )
QObject.connect( self.btnSetHelpPath, SIGNAL( "clicked()" ), self.setHelpPath )
self.help_tooltip_label.setPixmap( QPixmap(':/icons/tooltip.png') )
self.help_tooltip_label.setToolTip( self.tr( \
u"""Useful to open local GDAL documentation instead of online help
when pressing on the tool dialog's Help button.""") )


def setBinPath( self ):
inputDir = Utils.FileDialog.getExistingDirectory( self, self.tr( "Select directory with GDAL executables" ) )

0 comments on commit 0e0947f

Please sign in to comment.