Fixed problems with empty layers
Changed os.tmpnam() calls to use QTemporaryFile() objects
Added tooltips
Renamed ui files

file:b43879a06a935379b1c0f8198001f8656baa46b0 -> file:90c21962feb604688560337918002e97cf8c3506
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,2 @@
clip:
- pyuic4 -o mainwindow.py mainwindow.ui
+ pyuic4 -o topo_clip_ui.py topo_clip.ui
file:35c81e6ba42b2b4ec2c54265e6f28d01de50e70e(deleted)
--- a/mainwindow.py
+++ /dev/null
@@ -1,179 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file 'mainwindow.ui'
-#
-# Created: Sun Jan 27 06:30:21 2008
-# by: PyQt4 UI code generator 4.3.3
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-
-class Ui_MainWindow(object):
- def setupUi(self, MainWindow):
- MainWindow.setObjectName("MainWindow")
- MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,842,560).size()).expandedTo(MainWindow.minimumSizeHint()))
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
- MainWindow.setSizePolicy(sizePolicy)
-
- self.centralwidget = QtGui.QWidget(MainWindow)
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
- self.centralwidget.setSizePolicy(sizePolicy)
- self.centralwidget.setObjectName("centralwidget")
-
- self.gridlayout = QtGui.QGridLayout(self.centralwidget)
- self.gridlayout.setObjectName("gridlayout")
-
- self.frameMap = QtGui.QFrame(self.centralwidget)
- self.frameMap.setWindowModality(QtCore.Qt.NonModal)
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(10)
- sizePolicy.setVerticalStretch(10)
- sizePolicy.setHeightForWidth(self.frameMap.sizePolicy().hasHeightForWidth())
- self.frameMap.setSizePolicy(sizePolicy)
- self.frameMap.setCursor(QtCore.Qt.CrossCursor)
- self.frameMap.setFocusPolicy(QtCore.Qt.ClickFocus)
- self.frameMap.setFrameShape(QtGui.QFrame.NoFrame)
- self.frameMap.setFrameShadow(QtGui.QFrame.Raised)
- self.frameMap.setObjectName("frameMap")
- self.gridlayout.addWidget(self.frameMap,0,0,1,1)
-
- self.hboxlayout = QtGui.QHBoxLayout()
- self.hboxlayout.setObjectName("hboxlayout")
-
- self.vboxlayout = QtGui.QVBoxLayout()
- self.vboxlayout.setObjectName("vboxlayout")
-
- self.LoadDataButton = QtGui.QPushButton(self.centralwidget)
- self.LoadDataButton.setObjectName("LoadDataButton")
- self.vboxlayout.addWidget(self.LoadDataButton)
-
- self.LoadShapeButton = QtGui.QPushButton(self.centralwidget)
- self.LoadShapeButton.setObjectName("LoadShapeButton")
- self.vboxlayout.addWidget(self.LoadShapeButton)
- self.hboxlayout.addLayout(self.vboxlayout)
-
- self.vboxlayout1 = QtGui.QVBoxLayout()
- self.vboxlayout1.setObjectName("vboxlayout1")
-
- self.zLabelToggleButton = QtGui.QToolButton(self.centralwidget)
- self.zLabelToggleButton.setObjectName("zLabelToggleButton")
- self.vboxlayout1.addWidget(self.zLabelToggleButton)
-
- self.zoomDataExtentsButton = QtGui.QToolButton(self.centralwidget)
- self.zoomDataExtentsButton.setObjectName("zoomDataExtentsButton")
- self.vboxlayout1.addWidget(self.zoomDataExtentsButton)
-
- self.zoomShapeExtentsButton = QtGui.QToolButton(self.centralwidget)
- self.zoomShapeExtentsButton.setEnabled(True)
- self.zoomShapeExtentsButton.setObjectName("zoomShapeExtentsButton")
- self.vboxlayout1.addWidget(self.zoomShapeExtentsButton)
- self.hboxlayout.addLayout(self.vboxlayout1)
-
- spacerItem = QtGui.QSpacerItem(20,20,QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Minimum)
- self.hboxlayout.addItem(spacerItem)
-
- self.vboxlayout2 = QtGui.QVBoxLayout()
- self.vboxlayout2.setObjectName("vboxlayout2")
-
- self.hboxlayout1 = QtGui.QHBoxLayout()
- self.hboxlayout1.setObjectName("hboxlayout1")
-
- self.insideCheckBox = QtGui.QCheckBox(self.centralwidget)
- self.insideCheckBox.setEnabled(False)
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.insideCheckBox.sizePolicy().hasHeightForWidth())
- self.insideCheckBox.setSizePolicy(sizePolicy)
- self.insideCheckBox.setObjectName("insideCheckBox")
- self.hboxlayout1.addWidget(self.insideCheckBox)
-
- self.inFileButton = QtGui.QToolButton(self.centralwidget)
- self.inFileButton.setEnabled(False)
- self.inFileButton.setObjectName("inFileButton")
- self.hboxlayout1.addWidget(self.inFileButton)
-
- self.inTextEdit = QtGui.QLineEdit(self.centralwidget)
- self.inTextEdit.setEnabled(False)
- self.inTextEdit.setObjectName("inTextEdit")
- self.hboxlayout1.addWidget(self.inTextEdit)
- self.vboxlayout2.addLayout(self.hboxlayout1)
-
- self.hboxlayout2 = QtGui.QHBoxLayout()
- self.hboxlayout2.setObjectName("hboxlayout2")
-
- self.outsideCheckBox = QtGui.QCheckBox(self.centralwidget)
- self.outsideCheckBox.setEnabled(False)
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.outsideCheckBox.sizePolicy().hasHeightForWidth())
- self.outsideCheckBox.setSizePolicy(sizePolicy)
- self.outsideCheckBox.setObjectName("outsideCheckBox")
- self.hboxlayout2.addWidget(self.outsideCheckBox)
-
- self.outFileButton = QtGui.QToolButton(self.centralwidget)
- self.outFileButton.setEnabled(False)
- self.outFileButton.setObjectName("outFileButton")
- self.hboxlayout2.addWidget(self.outFileButton)
-
- self.outTextEdit = QtGui.QLineEdit(self.centralwidget)
- self.outTextEdit.setEnabled(False)
- self.outTextEdit.setObjectName("outTextEdit")
- self.hboxlayout2.addWidget(self.outTextEdit)
- self.vboxlayout2.addLayout(self.hboxlayout2)
- self.hboxlayout.addLayout(self.vboxlayout2)
-
- self.vboxlayout3 = QtGui.QVBoxLayout()
- self.vboxlayout3.setObjectName("vboxlayout3")
-
- self.saveButton = QtGui.QPushButton(self.centralwidget)
- self.saveButton.setEnabled(False)
- self.saveButton.setObjectName("saveButton")
- self.vboxlayout3.addWidget(self.saveButton)
-
- self.QuitButton = QtGui.QPushButton(self.centralwidget)
- self.QuitButton.setObjectName("QuitButton")
- self.vboxlayout3.addWidget(self.QuitButton)
- self.hboxlayout.addLayout(self.vboxlayout3)
- self.gridlayout.addLayout(self.hboxlayout,1,0,1,1)
- MainWindow.setCentralWidget(self.centralwidget)
-
- self.menubar = QtGui.QMenuBar(MainWindow)
- self.menubar.setGeometry(QtCore.QRect(0,0,842,31))
- self.menubar.setObjectName("menubar")
- MainWindow.setMenuBar(self.menubar)
-
- self.statusbar = QtGui.QStatusBar(MainWindow)
- self.statusbar.setObjectName("statusbar")
- MainWindow.setStatusBar(self.statusbar)
-
- self.retranslateUi(MainWindow)
- QtCore.QMetaObject.connectSlotsByName(MainWindow)
-
- def retranslateUi(self, MainWindow):
- MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Clip Data", None, QtGui.QApplication.UnicodeUTF8))
- self.LoadDataButton.setText(QtGui.QApplication.translate("MainWindow", "Load Data", None, QtGui.QApplication.UnicodeUTF8))
- self.LoadShapeButton.setText(QtGui.QApplication.translate("MainWindow", "Load Shape", None, QtGui.QApplication.UnicodeUTF8))
- self.zLabelToggleButton.setText(QtGui.QApplication.translate("MainWindow", "Z", None, QtGui.QApplication.UnicodeUTF8))
- self.zoomDataExtentsButton.setText(QtGui.QApplication.translate("MainWindow", "D", None, QtGui.QApplication.UnicodeUTF8))
- self.zoomShapeExtentsButton.setText(QtGui.QApplication.translate("MainWindow", "S", None, QtGui.QApplication.UnicodeUTF8))
- self.insideCheckBox.setText(QtGui.QApplication.translate("MainWindow", " IN ", None, QtGui.QApplication.UnicodeUTF8))
- self.inFileButton.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
- self.outsideCheckBox.setText(QtGui.QApplication.translate("MainWindow", "OUT", None, QtGui.QApplication.UnicodeUTF8))
- self.outFileButton.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
- self.saveButton.setText(QtGui.QApplication.translate("MainWindow", "Save", None, QtGui.QApplication.UnicodeUTF8))
- self.QuitButton.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8))
-
file:08647517d4b4defe6b8afc42c282b2547b7a5c3d(deleted)
--- a/mainwindow.ui
+++ /dev/null
@@ -1,237 +0,0 @@
-<ui version="4.0" >
- <author>Simeon Veldstra</author>
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>842</width>
- <height>560</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>Clip Data</string>
- </property>
- <widget class="QWidget" name="centralwidget" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QFrame" name="frameMap" >
- <property name="windowModality" >
- <enum>Qt::NonModal</enum>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="MinimumExpanding" >
- <horstretch>10</horstretch>
- <verstretch>10</verstretch>
- </sizepolicy>
- </property>
- <property name="cursor" >
- <cursorShape>CrossCursor</cursorShape>
- </property>
- <property name="focusPolicy" >
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="frameShape" >
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <layout class="QHBoxLayout" >
- <item>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QPushButton" name="LoadDataButton" >
- <property name="text" >
- <string>Load Data</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="LoadShapeButton" >
- <property name="text" >
- <string>Load Shape</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QToolButton" name="zLabelToggleButton" >
- <property name="text" >
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="zoomDataExtentsButton" >
- <property name="text" >
- <string>D</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="zoomShapeExtentsButton" >
- <property name="enabled" >
- <bool>true</bool>
- </property>
- <property name="text" >
- <string>S</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QCheckBox" name="insideCheckBox" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string> IN </string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="inFileButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="inTextEdit" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QCheckBox" name="outsideCheckBox" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text" >
- <string>OUT</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="outFileButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="outTextEdit" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QPushButton" name="saveButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string>Save</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="QuitButton" >
- <property name="text" >
- <string>Quit</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>842</width>
- <height>31</height>
- </rect>
- </property>
- </widget>
- <widget class="QStatusBar" name="statusbar" />
- </widget>
- <includes/>
- <resources/>
- <connections/>
-</ui>
file:821778377c150f82b516e78d21e5a4aee10335b8 -> file:ecfc609c49df6a69583254456ed95a694820b7b7
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,9 @@
-# Distutils setup script
+# topo_clip distutils setup script
from distutils.core import setup
-setup(,
- windows=[{"script": "topo_clip.py"}] )
+setup(name="topo_clip",
+ version="0.0.1",
+ py_modules=['pip', 'mainwindow'],
+ scripts=['topo_clip.pyw'],
+ windows=[{"script": "topo_clip.pyw"}] )
file:1d0d01a7c1306b36d9eaaaadb7ce9144f3288762 -> file:38da887c0e96a0e0e129feda512125748b7d793a
--- a/topo_clip.pyw
+++ b/topo_clip.pyw
@@ -30,7 +30,7 @@ from PyQt4.QtGui import *
from pprint import pprint
-from mainwindow import Ui_MainWindow
+from topo_clip_ui import Ui_MainWindow
import pip
import sys
@@ -74,8 +74,14 @@ class Twind(QMainWindow, Ui_MainWindow):
self.DelAtExit = []
self.z_on = False # show z labels
- self.save_in = os.tmpnam() # QTempFile??
- self.save_out = os.tmpnam()
+ self.save_in_qtf = QTemporaryFile()
+ self.save_in_qtf.open()
+ self.save_in = self.save_in_qtf.fileName()
+ self.save_in_qtf.close()
+ self.save_out_qtf = QTemporaryFile()
+ self.save_out_qtf.open()
+ self.save_out = self.save_out_qtf.fileName()
+ self.save_out_qtf.close()
self.csv_header = True
self.canvas = QgsMapCanvas(self)
@@ -98,12 +104,22 @@ class Twind(QMainWindow, Ui_MainWindow):
# Add a CSV header if none found
fp = open(fn, 'r')
ln = fp.readline().lower()
+ if ((not ln) or (2 > len(ln.split(',')))):
+ # Empty or unreadable file
+ self.msg("Layer empty: %s " % layer_name)
+ print "Layer empty: %s " % layer_name
+ return None
+
if not (('northing' in ln) and ('easting' in ln)):
self.csv_header = False
full_header = "Easting,Northing,Elevation,Name,Code"
header = ','.join(full_header.split(',')[:len(ln.split(','))])
fp.seek(0)
- tfn = os.tmpnam()
+ qtf = QTemporaryFile()
+ qtf.open()
+ tfn = qtf.fileName()
+ qtf.close()
+ #tfn = os.tmpnam()
fpt = open(tfn, 'w')
fpt.write(header + '\n')
while 1:
@@ -114,14 +130,16 @@ class Twind(QMainWindow, Ui_MainWindow):
fpt.close()
fp.close()
+ # delimitedtextprovider crashes with empty file
+
# Try to load the layer
uri = "%s?delimiter=,&xField=Easting&yField=Northing" % (tfn or fn)
vlayer = QgsVectorLayer(uri, layer_name, "delimitedtext")
- if tfn:
- if Windows:
- self.DelAtExit.append(tfn)
- else:
- os.unlink(tfn)
+# if tfn:
+# if Windows:
+# self.DelAtExit.append(tfn)
+# else:
+# os.unlink(tfn)
vlayer.setSrs(self.srs)
if not vlayer.isValid():
@@ -129,20 +147,28 @@ class Twind(QMainWindow, Ui_MainWindow):
return None
#pprint(dir( vlayer ))
- print "Feature Count: ", vlayer.featureCount()
- print "Features: ", vlayer.vectorType()
+ print "Loaded layer: %s Feature Count: %d" % (layer_name, vlayer.featureCount())
return vlayer
def mapLayer(self, lname, vlayer):
+ """mapLayer(layer_name, QgsVectorLayer)
+ Pass None as layer and layer_name is deleted"""
if self.layers.has_key(lname):
- #remove old CSV from self.layers
- #QgsMapLayerRegistry.instance().removeMapLayer(self.CSV)
QgsMapLayerRegistry.instance().removeMapLayer(lname)
- self.layers[lname] = QgsMapCanvasLayer(vlayer)
- # add layer to map layer registry:
- QgsMapLayerRegistry.instance().addMapLayer(vlayer)
+ if vlayer == None:
+ # delete any existing, and return
+ print "deleting ", lname
+ del self.layers[lname]
+ self.render()
+ return
+
+ if vlayer:
+ self.layers[lname] = QgsMapCanvasLayer(vlayer)
+
+ # add layer to map layer registry:
+ QgsMapLayerRegistry.instance().addMapLayer(vlayer)
self.render()
@@ -181,27 +207,25 @@ class Twind(QMainWindow, Ui_MainWindow):
fn = str(fileName)
self.msg(fn)
vlayer = self._CSV(fn, "data_layer")
- if not vlayer:
- return None
-
- vlayer.setLabelOn(self.z_on)
- try:
- vlayer.label().setLabelField(0, 2)
- except AttributeError:
- self.msg("Can't read file: %s" % fn)
- return
- vlayer.label().layerAttributes().setSize(7.75, 1) # 1 for constant zoom
- #vlayer.label().layerAttributes().setColor(QColor(0,255,0))
- #pprint(dir( vlayer.label().layerAttributes() ))
+ if vlayer:
+ try:
+ vlayer.setLabelOn(self.z_on)
+ vlayer.label().setLabelField(0, 2)
+ vlayer.label().layerAttributes().setSize(7.75, 1) # 1 for constant zoom
+ except AttributeError:
+ self.msg("Can't read file: %s" % fn)
+ self.CSVfn = fn
+ #vlayer.label().layerAttributes().setColor(QColor(0,255,0))
+ #pprint(dir( vlayer.label().layerAttributes() ))
+ else:
+ self.CSVfn = ''
+ self.msg("Problem reading %s" % fn)
- # Layer is good
- self.CSVfn = fn
self.CSV = vlayer
-
self.mapLayer('data_layer', vlayer)
- if self.BLN:
- self.enableSave()
+ #if self.BLN and self.CSV:
+ self.enableSave()
def addShape(self):
@@ -220,7 +244,12 @@ class Twind(QMainWindow, Ui_MainWindow):
fp = open(fn, 'r')
header = fp.readline()
- tfn = os.tmpnam()
+
+ qtf = QTemporaryFile()
+ qtf.open()
+ tfn = qtf.fileName()
+ qtf.close()
+
fpt = open(tfn, 'w')
fpt.write("Easting,Northing\n")
while 1:
@@ -234,11 +263,11 @@ class Twind(QMainWindow, Ui_MainWindow):
# Try to load the layer
uri = "%s?delimiter=,&xField=Easting&yField=Northing" % (tfn or fn)
blayer = QgsVectorLayer(uri, "shape_layer", "delimitedtext")
- if tfn:
- if Windows:
- self.DelAtExit.append(tfn)
- else:
- os.unlink(tfn)
+# if tfn:
+# if Windows:
+# self.DelAtExit.append(tfn)
+# else:
+# os.unlink(tfn)
blayer.setSrs(self.srs)
#blayer.label().layerAttributes().setColor(QColor(255,0,0))
#pprint(dir( blayer.renderer().setSelectionColor(QColor(0,0,255)) ))
@@ -262,8 +291,8 @@ class Twind(QMainWindow, Ui_MainWindow):
# add layer to map layer registry:
QgsMapLayerRegistry.instance().addMapLayer(blayer)
self.render()
- if self.CSV:
- self.enableSave()
+ #if self.CSV:
+ self.enableSave()
def render(self):
#self.canvas.setLayerSet(self.layers.values())
@@ -296,43 +325,18 @@ class Twind(QMainWindow, Ui_MainWindow):
def enableSave(self):
self.msg("Calculating")
- if self.BLN and self.CSV:
- self.saveButton.setEnabled(True)
-
- self.insideCheckBox.setEnabled(True)
- self.outsideCheckBox.setEnabled(True)
-
- self.inFileButton.setEnabled(True)
- self.outFileButton.setEnabled(True)
-
- basepath, s_in = os.path.split(self.CSVfn)
- if s_in[-4:].lower() == ".csv":
- s_in = s_in[:-4]
- s_out = s_in
- s_in += "-IN-"
- s_out += "-OUT-"
- BLN = os.path.split(self.BLNfn)[1]
- if BLN[-4:].lower() == ".bln":
- BLN = BLN[:-4]
- s_in += BLN
- s_out += BLN
- s_in += ".csv"
- s_out += ".csv"
-
- s_in = os.path.join(basepath, s_in)
- s_out = os.path.join(basepath, s_out)
-
- self.inTextEdit.setEnabled(True)
- self.outTextEdit.setEnabled(True)
- self.inTextEdit.setText(s_in)
- self.outTextEdit.setText(s_out)
-
- self.save()
-
- def save(self):
+ self.saveButton.setEnabled(False)
+ self.insideCheckBox.setEnabled(False)
+ self.inFileButton.setEnabled(False)
+ self.inTextEdit.setEnabled(False)
+ self.inTextEdit.setText("")
+ self.outsideCheckBox.setEnabled(False)
+ self.outFileButton.setEnabled(False)
+ self.outTextEdit.setEnabled(False)
+ self.outTextEdit.setText("")
if not (self.BLN and self.CSV):
return
- self.msg("running")
+
outfn = self.save_out
ofp = open(outfn, 'w')
@@ -344,34 +348,80 @@ class Twind(QMainWindow, Ui_MainWindow):
ofp.write("Easting,Northing,Elevation,Name,Code\n")
# Read bln:
- bfp = open(self.BLNfn, 'r')
- discard = bfp.readline()
- poly = []
- for line in bfp:
- l = line.split(',')
- try:
- poly.append(Pt(float(l[0]), float(l[1])))
- except ValueError:
- continue
- bfp.close()
-
- inFunc = pip.pip(poly)
+ try:
+ bfp = open(self.BLNfn, 'r')
+ discard = bfp.readline()
+ except IOError:
+ discard = None
+ if not discard:
+ sys.stderr.write("Empty bln file: %s\n" % self.BLNfn)
+ inFunc = None
+ else:
+ poly = []
+ for line in bfp:
+ l = line.split(',')
+ try:
+ poly.append(Pt(float(l[0]), float(l[1])))
+ except ValueError:
+ continue
+ bfp.close()
+ inFunc = pip.pip(poly)
#for...
- datafp = open(self.CSVfn, 'r')
- for line in datafp:
- try:
- l = line.split(',')
- if inFunc(Pt(float(l[0]), float(l[1]))):
- if ifp: ifp.write(line)
- else:
- if ofp: ofp.write(line)
- except ValueError:
- continue
+ try:
+ datafp = open(self.CSVfn, 'r')
+ except IOError:
+ sys.stderr.write("Empty csv file: %s\n" % self.CSVfn)
+ datafp = None
+ ofpp = ofp.tell()
+ ifpp = ifp.tell()
+ if inFunc and datafp:
+ for line in datafp:
+ try:
+ l = line.split(',')
+ if inFunc(Pt(float(l[0]), float(l[1]))):
+ if ifp: ifp.write(line)
+ else:
+ if ofp: ofp.write(line)
+ except ValueError:
+ continue
+
+ # Default names for output files
+ basepath, s_in = os.path.split(self.CSVfn)
+ if s_in[-4:].lower() == ".csv":
+ s_in = s_in[:-4]
+ s_out = s_in
+ s_in += "-IN-"
+ s_out += "-OUT-"
+ BLN = os.path.split(self.BLNfn)[1]
+ if BLN[-4:].lower() == ".bln":
+ BLN = BLN[:-4]
+ s_in += BLN
+ s_out += BLN
+ s_in += ".csv"
+ s_out += ".csv"
+ s_in = os.path.join(basepath, s_in)
+ s_out = os.path.join(basepath, s_out)
+
+ #Set up form state for saving [any] output
+ if ifpp != ifp.tell(): # Wrote to the 'IN' file
+ self.insideCheckBox.setEnabled(True)
+ self.inFileButton.setEnabled(True)
+ self.inTextEdit.setEnabled(True)
+ self.inTextEdit.setText(s_in)
+ self.saveButton.setEnabled(True)
+ if ofpp != ofp.tell():
+ self.outsideCheckBox.setEnabled(True)
+ self.outFileButton.setEnabled(True)
+ self.outTextEdit.setText(s_out)
+ self.outTextEdit.setEnabled(True)
+ self.saveButton.setEnabled(True)
if ofp: ofp.close()
if ifp: ifp.close()
- for fn, ln in ((infn, "CSV-IN"), (outfn, "CSV-OUT")):
+ for fn, ln in ((infn, "CSV-IN"),
+ #(self.CSVfn, "data_layer"),
+ (outfn, "CSV-OUT")):
vlayer = self._CSV(fn, ln)
self.mapLayer(ln, vlayer)
self.msg("Done")
file:3b26e1637b215f29402ff04d9ca08174d015121e(new)
--- /dev/null
+++ b/topo_clip.ui
@@ -0,0 +1,275 @@
+<ui version="4.0" >
+ <author>Simeon Veldstra</author>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>842</width>
+ <height>560</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Clip Data</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QFrame" name="frameMap" >
+ <property name="windowModality" >
+ <enum>Qt::NonModal</enum>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="MinimumExpanding" >
+ <horstretch>10</horstretch>
+ <verstretch>10</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor" >
+ <cursorShape>CrossCursor</cursorShape>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <layout class="QHBoxLayout" >
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="LoadDataButton" >
+ <property name="toolTip" >
+ <string>Open CSV file</string>
+ </property>
+ <property name="text" >
+ <string>Load Data</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="LoadShapeButton" >
+ <property name="toolTip" >
+ <string>Open BLN file</string>
+ </property>
+ <property name="text" >
+ <string>Load Shape</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QToolButton" name="zLabelToggleButton" >
+ <property name="toolTip" >
+ <string>Toggle elevation labels</string>
+ </property>
+ <property name="text" >
+ <string>Z</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="zoomDataExtentsButton" >
+ <property name="toolTip" >
+ <string>Zoom to data extents</string>
+ </property>
+ <property name="text" >
+ <string>D</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="zoomShapeExtentsButton" >
+ <property name="enabled" >
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Zoom to shape extents</string>
+ </property>
+ <property name="text" >
+ <string>S</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType" >
+ <enum>QSizePolicy::MinimumExpanding</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QCheckBox" name="insideCheckBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Save the points inside the shape</string>
+ </property>
+ <property name="text" >
+ <string> IN </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="inFileButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Select filename to save as</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="inTextEdit" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Save as</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QCheckBox" name="outsideCheckBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Save the points outside of the shape</string>
+ </property>
+ <property name="text" >
+ <string>OUT</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="outFileButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Select filename to save as</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="outTextEdit" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Save as</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="saveButton" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Save the checked files</string>
+ </property>
+ <property name="text" >
+ <string>Save</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="QuitButton" >
+ <property name="toolTip" >
+ <string/>
+ </property>
+ <property name="text" >
+ <string>Quit</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>842</width>
+ <height>31</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
file:1d180705aa6f0b57613d10f78e3543c9562e6f14(new)
--- /dev/null
+++ b/topo_clip_ui.py
@@ -0,0 +1,191 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'topo_clip.ui'
+#
+# Created: Tue Jan 29 13:13:43 2008
+# by: PyQt4 UI code generator 4.3.3
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,842,560).size()).expandedTo(MainWindow.minimumSizeHint()))
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
+ MainWindow.setSizePolicy(sizePolicy)
+
+ self.centralwidget = QtGui.QWidget(MainWindow)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
+ self.centralwidget.setSizePolicy(sizePolicy)
+ self.centralwidget.setObjectName("centralwidget")
+
+ self.gridlayout = QtGui.QGridLayout(self.centralwidget)
+ self.gridlayout.setObjectName("gridlayout")
+
+ self.frameMap = QtGui.QFrame(self.centralwidget)
+ self.frameMap.setWindowModality(QtCore.Qt.NonModal)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Expanding)
+ sizePolicy.setHorizontalStretch(10)
+ sizePolicy.setVerticalStretch(10)
+ sizePolicy.setHeightForWidth(self.frameMap.sizePolicy().hasHeightForWidth())
+ self.frameMap.setSizePolicy(sizePolicy)
+ self.frameMap.setCursor(QtCore.Qt.CrossCursor)
+ self.frameMap.setFocusPolicy(QtCore.Qt.ClickFocus)
+ self.frameMap.setFrameShape(QtGui.QFrame.NoFrame)
+ self.frameMap.setFrameShadow(QtGui.QFrame.Raised)
+ self.frameMap.setObjectName("frameMap")
+ self.gridlayout.addWidget(self.frameMap,0,0,1,1)
+
+ self.hboxlayout = QtGui.QHBoxLayout()
+ self.hboxlayout.setObjectName("hboxlayout")
+
+ self.vboxlayout = QtGui.QVBoxLayout()
+ self.vboxlayout.setObjectName("vboxlayout")
+
+ self.LoadDataButton = QtGui.QPushButton(self.centralwidget)
+ self.LoadDataButton.setObjectName("LoadDataButton")
+ self.vboxlayout.addWidget(self.LoadDataButton)
+
+ self.LoadShapeButton = QtGui.QPushButton(self.centralwidget)
+ self.LoadShapeButton.setObjectName("LoadShapeButton")
+ self.vboxlayout.addWidget(self.LoadShapeButton)
+ self.hboxlayout.addLayout(self.vboxlayout)
+
+ self.vboxlayout1 = QtGui.QVBoxLayout()
+ self.vboxlayout1.setObjectName("vboxlayout1")
+
+ self.zLabelToggleButton = QtGui.QToolButton(self.centralwidget)
+ self.zLabelToggleButton.setObjectName("zLabelToggleButton")
+ self.vboxlayout1.addWidget(self.zLabelToggleButton)
+
+ self.zoomDataExtentsButton = QtGui.QToolButton(self.centralwidget)
+ self.zoomDataExtentsButton.setObjectName("zoomDataExtentsButton")
+ self.vboxlayout1.addWidget(self.zoomDataExtentsButton)
+
+ self.zoomShapeExtentsButton = QtGui.QToolButton(self.centralwidget)
+ self.zoomShapeExtentsButton.setEnabled(True)
+ self.zoomShapeExtentsButton.setObjectName("zoomShapeExtentsButton")
+ self.vboxlayout1.addWidget(self.zoomShapeExtentsButton)
+ self.hboxlayout.addLayout(self.vboxlayout1)
+
+ spacerItem = QtGui.QSpacerItem(20,20,QtGui.QSizePolicy.MinimumExpanding,QtGui.QSizePolicy.Minimum)
+ self.hboxlayout.addItem(spacerItem)
+
+ self.vboxlayout2 = QtGui.QVBoxLayout()
+ self.vboxlayout2.setObjectName("vboxlayout2")
+
+ self.hboxlayout1 = QtGui.QHBoxLayout()
+ self.hboxlayout1.setObjectName("hboxlayout1")
+
+ self.insideCheckBox = QtGui.QCheckBox(self.centralwidget)
+ self.insideCheckBox.setEnabled(False)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.insideCheckBox.sizePolicy().hasHeightForWidth())
+ self.insideCheckBox.setSizePolicy(sizePolicy)
+ self.insideCheckBox.setObjectName("insideCheckBox")
+ self.hboxlayout1.addWidget(self.insideCheckBox)
+
+ self.inFileButton = QtGui.QToolButton(self.centralwidget)
+ self.inFileButton.setEnabled(False)
+ self.inFileButton.setObjectName("inFileButton")
+ self.hboxlayout1.addWidget(self.inFileButton)
+
+ self.inTextEdit = QtGui.QLineEdit(self.centralwidget)
+ self.inTextEdit.setEnabled(False)
+ self.inTextEdit.setObjectName("inTextEdit")
+ self.hboxlayout1.addWidget(self.inTextEdit)
+ self.vboxlayout2.addLayout(self.hboxlayout1)
+
+ self.hboxlayout2 = QtGui.QHBoxLayout()
+ self.hboxlayout2.setObjectName("hboxlayout2")
+
+ self.outsideCheckBox = QtGui.QCheckBox(self.centralwidget)
+ self.outsideCheckBox.setEnabled(False)
+
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.outsideCheckBox.sizePolicy().hasHeightForWidth())
+ self.outsideCheckBox.setSizePolicy(sizePolicy)
+ self.outsideCheckBox.setObjectName("outsideCheckBox")
+ self.hboxlayout2.addWidget(self.outsideCheckBox)
+
+ self.outFileButton = QtGui.QToolButton(self.centralwidget)
+ self.outFileButton.setEnabled(False)
+ self.outFileButton.setObjectName("outFileButton")
+ self.hboxlayout2.addWidget(self.outFileButton)
+
+ self.outTextEdit = QtGui.QLineEdit(self.centralwidget)
+ self.outTextEdit.setEnabled(False)
+ self.outTextEdit.setObjectName("outTextEdit")
+ self.hboxlayout2.addWidget(self.outTextEdit)
+ self.vboxlayout2.addLayout(self.hboxlayout2)
+ self.hboxlayout.addLayout(self.vboxlayout2)
+
+ self.vboxlayout3 = QtGui.QVBoxLayout()
+ self.vboxlayout3.setObjectName("vboxlayout3")
+
+ self.saveButton = QtGui.QPushButton(self.centralwidget)
+ self.saveButton.setEnabled(False)
+ self.saveButton.setObjectName("saveButton")
+ self.vboxlayout3.addWidget(self.saveButton)
+
+ self.QuitButton = QtGui.QPushButton(self.centralwidget)
+ self.QuitButton.setObjectName("QuitButton")
+ self.vboxlayout3.addWidget(self.QuitButton)
+ self.hboxlayout.addLayout(self.vboxlayout3)
+ self.gridlayout.addLayout(self.hboxlayout,1,0,1,1)
+ MainWindow.setCentralWidget(self.centralwidget)
+
+ self.menubar = QtGui.QMenuBar(MainWindow)
+ self.menubar.setGeometry(QtCore.QRect(0,0,842,31))
+ self.menubar.setObjectName("menubar")
+ MainWindow.setMenuBar(self.menubar)
+
+ self.statusbar = QtGui.QStatusBar(MainWindow)
+ self.statusbar.setObjectName("statusbar")
+ MainWindow.setStatusBar(self.statusbar)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Clip Data", None, QtGui.QApplication.UnicodeUTF8))
+ self.LoadDataButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Open CSV file", None, QtGui.QApplication.UnicodeUTF8))
+ self.LoadDataButton.setText(QtGui.QApplication.translate("MainWindow", "Load Data", None, QtGui.QApplication.UnicodeUTF8))
+ self.LoadShapeButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Open BLN file", None, QtGui.QApplication.UnicodeUTF8))
+ self.LoadShapeButton.setText(QtGui.QApplication.translate("MainWindow", "Load Shape", None, QtGui.QApplication.UnicodeUTF8))
+ self.zLabelToggleButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Toggle elevation labels", None, QtGui.QApplication.UnicodeUTF8))
+ self.zLabelToggleButton.setText(QtGui.QApplication.translate("MainWindow", "Z", None, QtGui.QApplication.UnicodeUTF8))
+ self.zoomDataExtentsButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Zoom to data extents", None, QtGui.QApplication.UnicodeUTF8))
+ self.zoomDataExtentsButton.setText(QtGui.QApplication.translate("MainWindow", "D", None, QtGui.QApplication.UnicodeUTF8))
+ self.zoomShapeExtentsButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Zoom to shape extents", None, QtGui.QApplication.UnicodeUTF8))
+ self.zoomShapeExtentsButton.setText(QtGui.QApplication.translate("MainWindow", "S", None, QtGui.QApplication.UnicodeUTF8))
+ self.insideCheckBox.setToolTip(QtGui.QApplication.translate("MainWindow", "Save the points inside the shape", None, QtGui.QApplication.UnicodeUTF8))
+ self.insideCheckBox.setText(QtGui.QApplication.translate("MainWindow", " IN ", None, QtGui.QApplication.UnicodeUTF8))
+ self.inFileButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Select filename to save as", None, QtGui.QApplication.UnicodeUTF8))
+ self.inFileButton.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
+ self.inTextEdit.setToolTip(QtGui.QApplication.translate("MainWindow", "Save as", None, QtGui.QApplication.UnicodeUTF8))
+ self.outsideCheckBox.setToolTip(QtGui.QApplication.translate("MainWindow", "Save the points outside of the shape", None, QtGui.QApplication.UnicodeUTF8))
+ self.outsideCheckBox.setText(QtGui.QApplication.translate("MainWindow", "OUT", None, QtGui.QApplication.UnicodeUTF8))
+ self.outFileButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Select filename to save as", None, QtGui.QApplication.UnicodeUTF8))
+ self.outFileButton.setText(QtGui.QApplication.translate("MainWindow", "...", None, QtGui.QApplication.UnicodeUTF8))
+ self.outTextEdit.setToolTip(QtGui.QApplication.translate("MainWindow", "Save as", None, QtGui.QApplication.UnicodeUTF8))
+ self.saveButton.setToolTip(QtGui.QApplication.translate("MainWindow", "Save the checked files", None, QtGui.QApplication.UnicodeUTF8))
+ self.saveButton.setText(QtGui.QApplication.translate("MainWindow", "Save", None, QtGui.QApplication.UnicodeUTF8))
+ self.QuitButton.setText(QtGui.QApplication.translate("MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8))
+