Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
even more font propagation
  • Loading branch information
jef-n committed Jan 25, 2012
1 parent 747e497 commit c25ae56
Show file tree
Hide file tree
Showing 45 changed files with 71 additions and 70 deletions.
13 changes: 6 additions & 7 deletions python/plugins/GdalTools/GdalTools.py
Expand Up @@ -96,16 +96,15 @@ def initGui( self ):

if rasterMenu == None:
# no Raster menu, create and insert it before the Help menu
self.menu = QMenu()
self.menu.setTitle( rasterText )
self.menu = QMenu( rasterText, self.iface.mainWindow() )
lastAction = actions[ len( actions ) - 1 ]
menu_bar.insertMenu( lastAction, self.menu )
else:
self.menu = rasterMenu
self.menu.addSeparator()

# projections menu (Warp (Reproject), Assign projection)
self.projectionsMenu = QMenu( QCoreApplication.translate( "GdalTools", "Projections" ) )
self.projectionsMenu = QMenu( QCoreApplication.translate( "GdalTools", "Projections" ), self.iface.mainWindow() )

self.warp = QAction( QIcon(":/icons/warp.png"), QCoreApplication.translate( "GdalTools", "Warp (Reproject)" ), self.iface.mainWindow() )
self.warp.setStatusTip( QCoreApplication.translate( "GdalTools", "Warp an image into a new coordinate system") )
Expand All @@ -122,7 +121,7 @@ def initGui( self ):
self.projectionsMenu.addActions( [ self.warp, self.projection, self.extractProj ] )

# conversion menu (Rasterize (Vector to raster), Polygonize (Raster to vector), Translate, RGB to PCT, PCT to RGB)
self.conversionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Conversion" ) )
self.conversionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Conversion" ), self.iface.mainWindow() )

if self.GdalVersion >= "1.3":
self.rasterize = QAction( QIcon(":/icons/rasterize.png"), QCoreApplication.translate( "GdalTools", "Rasterize (Vector to raster)" ), self.iface.mainWindow() )
Expand Down Expand Up @@ -151,7 +150,7 @@ def initGui( self ):
self.conversionMenu.addActions( [ self.translate, self.paletted, self.rgb ] )

# extraction menu (Clipper, Contour)
self.extractionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Extraction" ) )
self.extractionMenu = QMenu( QCoreApplication.translate( "GdalTools", "Extraction" ), self.iface.mainWindow() )

if self.GdalVersion >= "1.6":
self.contour = QAction( QIcon(":/icons/contour.png"), QCoreApplication.translate( "GdalTools", "Contour" ), self.iface.mainWindow() )
Expand All @@ -166,7 +165,7 @@ def initGui( self ):
self.extractionMenu.addActions( [ self.clipper ] )

# analysis menu (DEM (Terrain model), Grid (Interpolation), Near black, Proximity (Raster distance), Sieve)
self.analysisMenu = QMenu( QCoreApplication.translate( "GdalTools", "Analysis" ) )
self.analysisMenu = QMenu( QCoreApplication.translate( "GdalTools", "Analysis" ), self.iface.mainWindow() )

if self.GdalVersion >= "1.6":
self.sieve = QAction( QIcon(":/icons/sieve.png"), QCoreApplication.translate( "GdalTools", "Sieve" ), self.iface.mainWindow() )
Expand Down Expand Up @@ -207,7 +206,7 @@ def initGui( self ):
#self.analysisMenu.addActions( [ ] )

# miscellaneous menu (Build overviews (Pyramids), Tile index, Information, Merge, Build Virtual Raster (Catalog))
self.miscellaneousMenu = QMenu( QCoreApplication.translate( "GdalTools", "Miscellaneous" ) )
self.miscellaneousMenu = QMenu( QCoreApplication.translate( "GdalTools", "Miscellaneous" ), self.iface.mainWindow() )

if self.GdalVersion >= "1.6":
self.buildVRT = QAction( QIcon(":/icons/vrt.png"), QCoreApplication.translate( "GdalTools", "Build Virtual Raster (Catalog)" ), self.iface.mainWindow() )
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/dialogSRS.py
Expand Up @@ -5,8 +5,8 @@
from qgis.gui import *

class GdalToolsSRSDialog(QDialog):
def __init__(self, title):
QDialog.__init__(self)
def __init__(self, title, parent):
QDialog.__init__(self, parent)
self.setWindowTitle( title )

layout = QVBoxLayout()
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/tools/doClipper.py
Expand Up @@ -16,7 +16,7 @@ def __init__(self, iface):
self.canvas = self.iface.mapCanvas()

self.setupUi(self)
BasePluginWidget.__init__(self, self.iface, "gdal_translate", self.iface.mainWindow())
BasePluginWidget.__init__(self, self.iface, "gdal_translate")

self.outSelector.setType( self.outSelector.FILE )
self.extentSelector.setCanvas(self.canvas)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/tools/doExtractProj.py
Expand Up @@ -21,7 +21,7 @@

class GdalToolsDialog( QDialog, Ui_Dialog ):
def __init__( self, iface ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.setupUi( self )
self.iface = iface

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/widgetBatchBase.py
Expand Up @@ -9,8 +9,8 @@

class GdalToolsBaseBatchWidget(BasePluginWidget):

def __init__(self, iface, commandName, helpFileBaseName = None):
BasePluginWidget.__init__(self, iface, commandName, helpFileBaseName)
def __init__(self, iface, commandName):
BasePluginWidget.__init__(self, iface, commandName)

def getBatchArguments(self, inFile, outFile = None):
arguments = QStringList()
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/widgetPluginBase.py
Expand Up @@ -9,10 +9,10 @@

class GdalToolsBasePluginWidget:

def __init__(self, iface, commandName, parent = None):
def __init__(self, iface, commandName):
self.iface = iface
self.initialized = False
self.base = BaseDialog(parent, iface, self, self.windowTitle(), commandName)
self.base = BaseDialog( iface.mainWindow(), iface, self, self.windowTitle(), commandName)

self.connect(self.base, SIGNAL("processError(QProcess::ProcessError)"), self.onError)
self.connect(self.base, SIGNAL("processFinished(int, QProcess::ExitStatus)"), self.onFinished)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doDefineProj.py
Expand Up @@ -38,7 +38,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
self.toolOut.setEnabled(False)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doGeometry.py
Expand Up @@ -41,7 +41,7 @@
class GeometryDialog(QDialog, Ui_Dialog):

def __init__(self, iface, function):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
self.myFunction = function
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doGeoprocessing.py
Expand Up @@ -40,7 +40,7 @@

class GeoprocessingDialog( QDialog, Ui_Dialog ):
def __init__( self, iface, function ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.iface = iface
self.setupUi( self )
self.param.setValidator(QDoubleValidator(self.param))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doIntersectLines.py
Expand Up @@ -37,7 +37,7 @@
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doMeanCoords.py
Expand Up @@ -37,7 +37,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface, function):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.function = function
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doMergeShapes.py
Expand Up @@ -12,7 +12,7 @@

class Dialog( QDialog, Ui_Dialog ):
def __init__( self, iface ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.setupUi( self )
self.iface = iface

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doPointDistance.py
Expand Up @@ -73,7 +73,7 @@ def writerows(self, rows):

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doPointsInPolygon.py
Expand Up @@ -37,7 +37,7 @@
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doRandPoints.py
Expand Up @@ -38,7 +38,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doRandom.py
Expand Up @@ -37,7 +37,7 @@
import random
class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doRegPoints.py
Expand Up @@ -38,7 +38,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
self.xMin.setValidator(QDoubleValidator(self.xMin))
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSelectByLocation.py
Expand Up @@ -37,7 +37,7 @@
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSimplify.py
Expand Up @@ -40,7 +40,7 @@

class Dialog( QDialog, Ui_Dialog ):
def __init__( self, iface, function ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.setupUi( self )
self.iface = iface
self.myFunction = function
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSpatialIndex.py
Expand Up @@ -29,7 +29,7 @@

class Dialog( QDialog, Ui_Dialog ):
def __init__( self, iface ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.setupUi( self )
self.iface = iface

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSpatialJoin.py
Expand Up @@ -54,7 +54,7 @@ def myself(L):
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSubsetSelect.py
Expand Up @@ -37,7 +37,7 @@
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doSumLines.py
Expand Up @@ -37,7 +37,7 @@
class Dialog(QDialog, Ui_Dialog):

def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
# Set up the user interface from Designer.
self.setupUi(self)
Expand Down
6 changes: 3 additions & 3 deletions python/plugins/fTools/tools/doValidate.py
Expand Up @@ -67,11 +67,11 @@ def reset(self):

class ValidateDialog( QDialog, Ui_Dialog ):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
self.setModal(False) # we want to be able to interact with the featuresmc.extent().width()
self.setWindowFlags( Qt.SubWindow )
# self.setModal(False) # we want to be able to interact with the featuresmc.extent().width()
# self.setWindowFlags( Qt.SubWindow )
# adjust user interface
self.setWindowTitle( self.tr( "Check geometry validity" ) )
self.cmbField.setVisible( False )
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doVectorGrid.py
Expand Up @@ -36,7 +36,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface
self.setupUi(self)
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doVectorSplit.py
Expand Up @@ -36,7 +36,7 @@

class Dialog(QDialog, Ui_Dialog):
def __init__(self, iface):
QDialog.__init__(self)
QDialog.__init__(self, iface.mainWindow())
self.iface = iface

self.setupUi(self)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/tools/doVisual.py
Expand Up @@ -37,7 +37,7 @@

class VisualDialog( QDialog, Ui_Dialog ):
def __init__( self, iface, function ):
QDialog.__init__( self )
QDialog.__init__( self, iface.mainWindow() )
self.iface = iface
self.setupUi( self )
self.myFunction = function
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/mapserver_export/mapserverexport.py
Expand Up @@ -73,7 +73,7 @@ def unload(self):
# run method that performs all the real work
def run(self):
# create and show the MapServerExport dialog
self.dlg = MapServerExportDialog()
self.dlg = MapServerExportDialog(self.iface.mainWindow())
# attach events to inputs and buttons
QObject.connect(self.dlg.ui.btnChooseFile, SIGNAL("clicked()"), self.setMapFile)
QObject.connect(self.dlg.ui.txtMapFilePath, SIGNAL("textChanged(QString)"), self.mapfileChanged)
Expand Down
16 changes: 8 additions & 8 deletions python/plugins/mapserver_export/mapserverexportdialog.py
Expand Up @@ -17,23 +17,23 @@
* *
***************************************************************************/
"""
from PyQt4 import QtCore, QtGui
from PyQt4 import QtCore, QtGui
from ms_export import defaults
from ui_qgsmapserverexportbase import Ui_QgsMapserverExportBase
# create the dialog for mapserver export
class MapServerExportDialog(QtGui.QDialog):
def __init__(self):
QtGui.QDialog.__init__(self)
# Set up the user interface from Designer.
self.ui = Ui_QgsMapserverExportBase()
self.ui.setupUi(self)
class MapServerExportDialog(QtGui.QDialog):
def __init__(self, parent):
QtGui.QDialog.__init__(self, parent)
# Set up the user interface from Designer.
self.ui = Ui_QgsMapserverExportBase()
self.ui.setupUi(self)

units = ["meters", "dd", "feet", "miles", "inches", "kilometers"]
# make them able to be translated
tr_units = [ QtGui.QApplication.translate("QgsMapserverExportBase", "meters", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "dd", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "feet", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "miles", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "inches", None, QtGui.QApplication.UnicodeUTF8), QtGui.QApplication.translate("QgsMapserverExportBase", "kilometers", None, QtGui.QApplication.UnicodeUTF8) ]
for unit in units:
self.ui.cmbMapUnits.addItem( QtGui.QApplication.translate("QgsMapserverExportBase", unit, None, QtGui.QApplication.UnicodeUTF8), QtCore.QVariant(unit) )

# TODO: set default unit. Is now the first value entered in the unit-list above

# Set defaults from ms_export.py:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/osm/OsmAddRelationDlg.py
Expand Up @@ -37,7 +37,7 @@ def __init__(self, plugin, newRelationFirstMember=None, relationToEdit=None):
@param relationToEdit if relation is given, this dialog is for editing of existing relation, not for creation a new one
"""

QDialog.__init__(self,None)
QDialog.__init__(self, plugin.iface.mainWindow())
self.setupUi(self)
self.dockWidget=plugin.dockWidget
self.plugin=plugin
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/osm/OsmDownloadDlg.py
Expand Up @@ -46,7 +46,7 @@ def __init__(self, plugin):
@param plugin is pointer to instance of OSM Plugin.
"""

QDialog.__init__(self, None)
QDialog.__init__(self, plugin.iface.mainWindow())
self.setupUi(self)
self.dbm=plugin.dbm

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/osm/OsmImportDlg.py