mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
even more font propagation
This commit is contained in:
parent
747e497e0b
commit
c25ae5635c
@ -96,8 +96,7 @@ class GdalTools:
|
||||
|
||||
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:
|
||||
@ -105,7 +104,7 @@ class GdalTools:
|
||||
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") )
|
||||
@ -122,7 +121,7 @@ class GdalTools:
|
||||
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() )
|
||||
@ -151,7 +150,7 @@ class GdalTools:
|
||||
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() )
|
||||
@ -166,7 +165,7 @@ class GdalTools:
|
||||
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() )
|
||||
@ -207,7 +206,7 @@ class GdalTools:
|
||||
#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() )
|
||||
|
@ -5,8 +5,8 @@ from qgis.core import *
|
||||
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()
|
||||
|
@ -16,7 +16,7 @@ class GdalToolsDialog(QWidget, Ui_Widget, BasePluginWidget):
|
||||
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)
|
||||
|
@ -21,7 +21,7 @@ except ImportError, e:
|
||||
|
||||
class GdalToolsDialog( QDialog, Ui_Dialog ):
|
||||
def __init__( self, iface ):
|
||||
QDialog.__init__( self )
|
||||
QDialog.__init__( self, iface.mainWindow() )
|
||||
self.setupUi( self )
|
||||
self.iface = iface
|
||||
|
||||
|
@ -9,8 +9,8 @@ import GdalTools_utils as Utils
|
||||
|
||||
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()
|
||||
|
@ -9,10 +9,10 @@ import GdalTools_utils as Utils
|
||||
|
||||
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)
|
||||
|
@ -38,7 +38,7 @@ from ui_frmReProject import Ui_Dialog
|
||||
|
||||
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)
|
||||
|
@ -41,7 +41,7 @@ from sets import Set
|
||||
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
|
||||
|
@ -40,7 +40,7 @@ import sys
|
||||
|
||||
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))
|
||||
|
@ -37,7 +37,7 @@ from ui_frmIntersectLines import Ui_Dialog
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ from ui_frmMeanCoords import Ui_Dialog
|
||||
|
||||
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)
|
||||
|
@ -12,7 +12,7 @@ from ui_frmMergeShapes import Ui_Dialog
|
||||
|
||||
class Dialog( QDialog, Ui_Dialog ):
|
||||
def __init__( self, iface ):
|
||||
QDialog.__init__( self )
|
||||
QDialog.__init__( self, iface.mainWindow() )
|
||||
self.setupUi( self )
|
||||
self.iface = iface
|
||||
|
||||
|
@ -73,7 +73,7 @@ class UnicodeWriter:
|
||||
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ from ui_frmPointsInPolygon import Ui_Dialog
|
||||
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)
|
||||
|
@ -38,7 +38,7 @@ from ui_frmRandPoints import Ui_Dialog
|
||||
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ from ui_frmRandom import Ui_Dialog
|
||||
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)
|
||||
|
@ -38,7 +38,7 @@ from ui_frmRegPoints import Ui_Dialog
|
||||
|
||||
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))
|
||||
|
@ -37,7 +37,7 @@ from ui_frmPointsInPolygon import Ui_Dialog
|
||||
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)
|
||||
|
@ -40,7 +40,7 @@ from ui_frmSimplify import Ui_Dialog
|
||||
|
||||
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
|
||||
|
@ -29,7 +29,7 @@ from ui_frmSpatialIndex import Ui_Dialog
|
||||
|
||||
class Dialog( QDialog, Ui_Dialog ):
|
||||
def __init__( self, iface ):
|
||||
QDialog.__init__( self )
|
||||
QDialog.__init__( self, iface.mainWindow() )
|
||||
self.setupUi( self )
|
||||
self.iface = iface
|
||||
|
||||
|
@ -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)
|
||||
|
@ -37,7 +37,7 @@ from ui_frmSubsetSelect import Ui_Dialog
|
||||
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)
|
||||
|
@ -37,7 +37,7 @@ from ui_frmSumLines import Ui_Dialog
|
||||
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)
|
||||
|
@ -67,11 +67,11 @@ class MarkerErrorGeometry():
|
||||
|
||||
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 )
|
||||
|
@ -36,7 +36,7 @@ from ui_frmVectorGrid import Ui_Dialog
|
||||
|
||||
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)
|
||||
|
@ -36,7 +36,7 @@ from ui_frmVectorSplit import Ui_Dialog
|
||||
|
||||
class Dialog(QDialog, Ui_Dialog):
|
||||
def __init__(self, iface):
|
||||
QDialog.__init__(self)
|
||||
QDialog.__init__(self, iface.mainWindow())
|
||||
self.iface = iface
|
||||
|
||||
self.setupUi(self)
|
||||
|
@ -37,7 +37,7 @@ import math
|
||||
|
||||
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
|
||||
|
@ -73,7 +73,7 @@ class MapServerExport:
|
||||
# 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)
|
||||
|
@ -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:
|
||||
|
@ -37,7 +37,7 @@ class OsmAddRelationDlg(QDialog, Ui_OsmAddRelationDlg):
|
||||
@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
|
||||
|
@ -46,7 +46,7 @@ class OsmDownloadDlg(QDialog, Ui_OsmDownloadDlg):
|
||||
@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
|
||||
|
||||
|
@ -53,7 +53,7 @@ class OsmImportDlg(QDialog, Ui_OsmImportDlg):
|
||||
@param plugin is pointer to instance of OSM Plugin
|
||||
"""
|
||||
|
||||
QDialog.__init__(self, None)
|
||||
QDialog.__init__(self, plugin.iface.mainWindow())
|
||||
self.setupUi(self)
|
||||
|
||||
self.plugin=plugin
|
||||
|
@ -40,7 +40,7 @@ class OsmLoadDlg(QDialog, Ui_OsmLoadDlg):
|
||||
@param plugin is pointer to instance of OSM Plugin
|
||||
"""
|
||||
|
||||
QDialog.__init__(self, None)
|
||||
QDialog.__init__(self, plugin.iface.mainWindow())
|
||||
self.setupUi(self)
|
||||
|
||||
self.canvas=plugin.canvas
|
||||
|
@ -31,7 +31,7 @@ class OsmSaveDlg(QDialog, Ui_OsmSaveDlg):
|
||||
@param plugin is pointer to instance of OSM Plugin
|
||||
"""
|
||||
|
||||
QDialog.__init__(self, None)
|
||||
QDialog.__init__(self, plugin.iface.mainWindow())
|
||||
self.setupUi(self)
|
||||
|
||||
self.plugin=plugin
|
||||
|
@ -47,7 +47,7 @@ class OsmUploadDlg(QDialog, Ui_OsmUploadDlg):
|
||||
@param plugin is pointer to instance of OSM Plugin.
|
||||
"""
|
||||
|
||||
QDialog.__init__(self,None)
|
||||
QDialog.__init__(self, plugin.iface.mainWindow())
|
||||
self.setupUi(self)
|
||||
|
||||
self.dockWidget=plugin.dockWidget
|
||||
|
@ -3062,7 +3062,7 @@ void QgisApp::newPrintComposer()
|
||||
|
||||
void QgisApp::showComposerManager()
|
||||
{
|
||||
QgsComposerManager m;
|
||||
QgsComposerManager m( this );
|
||||
m.exec();
|
||||
}
|
||||
|
||||
@ -5149,7 +5149,7 @@ void QgisApp::addMapLayer( QgsMapLayer *theMapLayer )
|
||||
void QgisApp::embedLayers()
|
||||
{
|
||||
//dialog to select groups/layers from other project files
|
||||
QgsEmbedLayerDialog d;
|
||||
QgsEmbedLayerDialog d( this );
|
||||
if ( d.exec() == QDialog::Accepted )
|
||||
{
|
||||
mMapCanvas->freeze( true );
|
||||
|
@ -259,7 +259,7 @@ void QgsGrassBrowser::copyMap()
|
||||
typeName = "region";
|
||||
}
|
||||
|
||||
QgsGrassElementDialog ed;
|
||||
QgsGrassElementDialog ed( this );
|
||||
bool ok;
|
||||
QString source;
|
||||
QString suggest;
|
||||
@ -344,7 +344,7 @@ void QgsGrassBrowser::renameMap()
|
||||
typeName = "region";
|
||||
}
|
||||
|
||||
QgsGrassElementDialog ed;
|
||||
QgsGrassElementDialog ed( this );
|
||||
bool ok;
|
||||
QString newName = ed.getItem( element, tr( "New name" ),
|
||||
tr( "New name for layer \"%1\"" ).arg( map ), "", map, &ok );
|
||||
|
@ -40,7 +40,7 @@ QgsGrassMapcalc::QgsGrassMapcalc(
|
||||
QgsGrassTools *tools, QgsGrassModule *module,
|
||||
QgisInterface *iface,
|
||||
QWidget * parent, Qt::WFlags f )
|
||||
: QMainWindow( 0, Qt::Dialog )
|
||||
: QMainWindow( iface->mainWindow(), Qt::Dialog )
|
||||
, QgsGrassMapcalcBase( )
|
||||
, QgsGrassModuleOptions( tools, module, iface )
|
||||
, mTool( -1 )
|
||||
@ -1255,7 +1255,7 @@ void QgsGrassMapcalc::load()
|
||||
{
|
||||
QgsDebugMsg( "entered." );
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::MAPCALC );
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( this, QgsGrassSelect::MAPCALC );
|
||||
if ( sel->exec() == QDialog::Rejected )
|
||||
return;
|
||||
|
||||
|
@ -52,7 +52,7 @@ class QgsGrassModule: public QDialog, private Ui::QgsGrassModuleBase
|
||||
public:
|
||||
//! Constructor
|
||||
QgsGrassModule( QgsGrassTools *tools, QString moduleName, QgisInterface *iface,
|
||||
QString path, QWidget * parent = 0, Qt::WFlags f = 0 );
|
||||
QString path, QWidget *parent, Qt::WFlags f = 0 );
|
||||
|
||||
//! Destructor
|
||||
~QgsGrassModule();
|
||||
|
@ -292,7 +292,7 @@ void QgsGrassPlugin::addVector()
|
||||
// QgsDebugMsg("entered.");
|
||||
QString uri;
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::VECTOR );
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( qGisInterface->mainWindow(), QgsGrassSelect::VECTOR );
|
||||
if ( sel->exec() )
|
||||
{
|
||||
uri = sel->gisdbase + "/" + sel->location + "/" + sel->mapset + "/" + sel->map + "/" + sel->layer;
|
||||
@ -387,7 +387,7 @@ void QgsGrassPlugin::addRaster()
|
||||
// QgsDebugMsg("entered.");
|
||||
QString uri;
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::RASTER );
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( qGisInterface->mainWindow(), QgsGrassSelect::RASTER );
|
||||
if ( sel->exec() )
|
||||
{
|
||||
QString element;
|
||||
@ -520,7 +520,7 @@ void QgsGrassPlugin::newVector()
|
||||
bool ok;
|
||||
QString name;
|
||||
|
||||
QgsGrassElementDialog dialog;
|
||||
QgsGrassElementDialog dialog( qGisInterface->mainWindow() );
|
||||
name = dialog.getItem( "vector", tr( "New vector name" ),
|
||||
tr( "New vector name" ), "", "", &ok );
|
||||
|
||||
@ -710,7 +710,7 @@ void QgsGrassPlugin::openMapset()
|
||||
|
||||
QString element;
|
||||
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( QgsGrassSelect::MAPSET );
|
||||
QgsGrassSelect *sel = new QgsGrassSelect( qGisInterface->mainWindow(), QgsGrassSelect::MAPSET );
|
||||
|
||||
if ( !sel->exec() )
|
||||
return;
|
||||
|
@ -29,7 +29,7 @@ extern "C"
|
||||
}
|
||||
|
||||
|
||||
QgsGrassSelect::QgsGrassSelect( int type ): QgsGrassSelectBase()
|
||||
QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ): QDialog( parent ), QgsGrassSelectBase()
|
||||
{
|
||||
QgsDebugMsg( QString( "QgsGrassSelect() type = %1" ).arg( type ) );
|
||||
|
||||
|
@ -28,7 +28,7 @@ class QgsGrassSelect: public QDialog, private Ui::QgsGrassSelectBase
|
||||
public:
|
||||
//! Constructor
|
||||
//QgsGrassSelect(QWidget *parent = 0, int type = VECTOR );
|
||||
QgsGrassSelect( int type = VECTOR );
|
||||
QgsGrassSelect( QWidget *parent, int type = VECTOR );
|
||||
//! Destructor
|
||||
~QgsGrassSelect();
|
||||
|
||||
|
@ -65,7 +65,7 @@ bool QgsGrassUtils::itemExists( QString element, QString item )
|
||||
return fi.exists();
|
||||
}
|
||||
|
||||
QgsGrassElementDialog::QgsGrassElementDialog() : QObject()
|
||||
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent ) : QObject(), mParent( parent )
|
||||
{
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ QString QgsGrassElementDialog::getItem( QString element,
|
||||
*ok = false;
|
||||
mElement = element;
|
||||
mSource = source;
|
||||
mDialog = new QDialog();
|
||||
mDialog = new QDialog( mParent );
|
||||
mDialog->setWindowTitle( title );
|
||||
QVBoxLayout *layout = new QVBoxLayout( mDialog );
|
||||
QHBoxLayout *buttonLayout = new QHBoxLayout( );
|
||||
|
@ -58,7 +58,7 @@ class QgsGrassElementDialog: public QObject
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
QgsGrassElementDialog();
|
||||
QgsGrassElementDialog( QWidget *parent );
|
||||
|
||||
//! Destructor
|
||||
~QgsGrassElementDialog();
|
||||
@ -83,6 +83,7 @@ class QgsGrassElementDialog: public QObject
|
||||
QLabel *mErrorLabel;
|
||||
QPushButton *mOkButton;
|
||||
QPushButton *mCancelButton;
|
||||
QWidget *mParent;
|
||||
};
|
||||
|
||||
#endif // QGSGRASSUTILS_H
|
||||
|
@ -20,10 +20,11 @@
|
||||
#include "qgsrasterlayer.h"
|
||||
#include "qgsvectordataprovider.h"
|
||||
#include "qgsvectorlayer.h"
|
||||
#include "qgisinterface.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog( QgisInterface* iface ): QDialog(), mIface( iface )
|
||||
QgsZonalStatisticsDialog::QgsZonalStatisticsDialog( QgisInterface* iface ): QDialog( iface->mainWindow() ), mIface( iface )
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user