def show(self):
     QtGui.QDialog.show(self)
     self.setWindowModality(0)
     if self.firstShow:
          inet = geopunt.internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
          #filters
          if inet:
             self.poiThemes = dict( self.poi.listPoiThemes() )
             poiThemes = [""] + self.poiThemes.keys()
             poiThemes.sort()
             self.ui.filterPoiThemeCombo.addItems( poiThemes )
             self.poiCategories = dict( self.poi.listPoiCategories() )
             poiCategories = [""] + self.poiCategories.keys()
             poiCategories.sort()
             self.ui.filterPoiCategoryCombo.addItems( poiCategories )
             self.poiTypes = dict( self.poi.listPoitypes() )
             poiTypes = [""] + self.poiTypes.keys()
             poiTypes.sort()
             self.ui.filterPoiTypeCombo.addItems(  poiTypes )
             gemeentes = json.load( open(os.path.join(os.path.dirname(__file__), "data/gemeentenVL.json")) )
             self.NIScodes= { n["Naam"] : n["Niscode"] for n in gemeentes }
             gemeenteNamen = [n["Naam"] for n in gemeentes]
             gemeenteNamen.sort()
             self.ui.filterPoiNIS.addItems( gemeenteNamen )            
             #connect when inet on
             self.ui.filterPoiThemeCombo.activated.connect(self.onThemeFilterChange)
             self.ui.filterPoiCategoryCombo.activated.connect(self.onCategorieFilterChange)
             
             self.firstShow = False      
          else:
             self.bar.pushMessage(
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", "Waarschuwing "), 
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", "Kan geen verbing maken met het internet."), 
               level=QgsMessageBar.WARNING, duration=3)
 def internet_on(self):
     inet_on = geopunt.internet_on( timeout= self.timeout , proxyUrl= self.proxy , port= self.port  )
     if True != inet_on:
         self.ui.statusMsg.setText(
         QtCore.QCoreApplication.translate("batcGeoCodedialog", 
                              "<div style='color:red'>Kon geen connectie maken met geopunt</div>"))
     return inet_on
 def show(self):
     QtGui.QDialog.show(self)
     self.setWindowModality(0)
     if self.firstShow:
          inet = geopunt.internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
          #filters
          if inet:
             self.poiThemes = dict( self.poi.listPoiThemes() )
             poiThemes = [""] + self.poiThemes.keys()
             poiThemes.sort()
             self.ui.filterPoiThemeCombo.addItems( poiThemes )
             self.poiCategories = dict( self.poi.listPoiCategories() )
             poiCategories = [""] + self.poiCategories.keys()
             poiCategories.sort()
             self.ui.filterPoiCategoryCombo.addItems( poiCategories )
             self.poiTypes = dict( self.poi.listPoitypes() )
             poiTypes = [""] + self.poiTypes.keys()
             poiTypes.sort()
             self.ui.filterPoiTypeCombo.addItems(  poiTypes )
             gemeentes = json.load( open(os.path.join(os.path.dirname(__file__), "data/gemeentenVL.json")) )
             self.NIScodes= { n["Naam"] : n["Niscode"] for n in gemeentes }
             gemeenteNamen = [n["Naam"] for n in gemeentes]
             gemeenteNamen.sort()
             self.ui.filterPoiNIS.addItems( gemeenteNamen )            
             self.firstShow = False      
          else:
             self.bar.pushMessage(
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", "Waarschuwing "), 
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", "Kan geen verbing maken met het internet."), 
               level=QgsMessageBar.WARNING, duration=3)
    def show(self):
        QtGui.QDialog.show(self)
        self.setWindowModality(0)
        if self.firstShow:
            inet = internet_on(proxyUrl=self.proxy,
                               port=self.port,
                               timeout=self.timeout)
            if inet:
                self.ui.GDIThemaCbx.addItems([''] + self.md.list_GDI_theme())
                self.ui.organisatiesCbx.addItems([''] +
                                                 self.md.list_organisations())
                keywords = sorted(self.md.list_suggestionKeyword())
                self.completerModel.setStringList(keywords)
                self.bronnen = self.md.list_bronnen()
                self.ui.bronCbx.addItems([''] + [n[1] for n in self.bronnen])
                self.ui.typeCbx.addItems([''] +
                                         [n[0] for n in self.md.dataTypes])

                self.ui.INSPIREannexCbx.addItems([''] + self.md.inspireannex)
                self.ui.INSPIREserviceCbx.addItems([''] +
                                                   self.md.inspireServiceTypes)
                self.ui.INSPIREthemaCbx.addItems([''] +
                                                 self.md.list_inspire_theme())
                self.firstShow = False
            else:
                self.bar.pushMessage(
                    QtCore.QCoreApplication.translate("geopunt4QgisPoidialog",
                                                      "Waarschuwing "),
                    QtCore.QCoreApplication.translate(
                        "geopunt4QgisPoidialog",
                        "Kan geen verbing maken met het internet."),
                    level=QgsMessageBar.WARNING,
                    duration=3)
    def show(self):
        QtGui.QDialog.show(self)
        if self.firstShow:
            inet = geopunt.internet_on(proxyUrl=self.proxy,
                                       port=self.port,
                                       timeout=self.timeout)
            if inet:
                self.firstShow = False

                self.municipalities = self.parcel.getMunicipalities()
                self.ui.municipalityCbx.clear()
                muniNames = [
                    n['municipalityName'] for n in self.municipalities
                ]
                self.ui.municipalityCbx.addItems([''] + muniNames)
                self.setCompleter(muniNames, self.ui.municipalityCbx)
            else:
                self.bar.pushMessage(
                    QtCore.QCoreApplication.translate("geopunt4QgisParcelDlg",
                                                      "Waarschuwing "),
                    QtCore.QCoreApplication.translate(
                        "geopunt4QgisParcelDlg",
                        "Kan geen verbing maken met het internet."),
                    level=QgsMessageBar.WARNING,
                    duration=5)
 def show(self):
     QtGui.QDialog.show(self)
     if self.firstShow:
          inet =  geopunt.internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
          if inet:
             self.firstShow = False
             
             self.municipalities = self.parcel.getMunicipalities()
             self.ui.municipalityCbx.clear()
             muniNames = [n['municipalityName'] for n in self.municipalities]
             self.ui.municipalityCbx.addItems( [''] + muniNames )
             self.setCompleter( muniNames, self.ui.municipalityCbx )
          else:
             self.bar.pushMessage(
               QtCore.QCoreApplication.translate("geopunt4QgisParcelDlg", "Waarschuwing "), 
               QtCore.QCoreApplication.translate("geopunt4QgisParcelDlg", 
                 "Kan geen verbing maken met het internet."), level=QgsMessageBar.WARNING, duration=5)
 def show(self):
   QtGui.QDialog.show(self)
   if  self.firstShow:
     'exend show to load data'
     internet = geopunt.internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
     if internet:
         self.gemeentes = json.load( open(os.path.join(os.path.dirname(__file__), "data/gemeentenVL.json")) )
         #populate combo's
         self.ui.provinceCbx.clear()
         self.ui.provinceCbx.addItems(["","Antwerpen","Limburg","Oost-Vlaanderen","Vlaams-Brabant","West-Vlaanderen"])
         self.ui.cityCbx.clear()
         self.ui.cityCbx.addItems([n["Naam"] for n in self.gemeentes])
         self.ui.ownerCbx.clear()
         self.ui.ownerCbx.addItems([""] + self.gp.getOwner())
         self.ui.eventCbx.clear()
         self.ui.eventCbx.addItems([""] + self.gp.getEventType())
         self.ui.mgsBox.setText('')
         self.firstShow = False
     elif not internet:
         self.ui.mgsBox.setText( "<div style='color:red'>%s</div>" %  QtCore.QCoreApplication.translate("geopunt4QgisGIPOD", 
           "<strong>Waarschuwing: </strong>kan niet verbinden met internet"))
 def show(self):
   QtGui.QDialog.show(self)
   if  self.firstShow:
     'exend show to load data'
     internet = geopunt.internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
     if internet:
         self.gemeentes = json.load( open(os.path.join(os.path.dirname(__file__), "data/gemeentenVL.json")) )
         #populate combo's
         self.ui.provinceCbx.clear()
         self.ui.provinceCbx.addItems(["","Antwerpen","Limburg","Oost-Vlaanderen","Vlaams-Brabant","West-Vlaanderen"])
         self.ui.cityCbx.clear()
         self.ui.cityCbx.addItems([n["Naam"] for n in self.gemeentes])
         self.ui.ownerCbx.clear()
         self.ui.ownerCbx.addItems([""] + self.gp.getOwner())
         self.ui.eventCbx.clear()
         self.ui.eventCbx.addItems([""] + self.gp.getEventType())
         self.ui.mgsBox.setText('')
         self.firstShow = False
     elif not internet:
         self.ui.mgsBox.setText( "<div style='color:red'>%s</div>" %  QtCore.QCoreApplication.translate("geopunt4QgisGIPOD", 
           "<strong>Waarschuwing: </strong>kan niet verbinden met internet"))
 def show(self):
     QtGui.QDialog.show(self)
     self.setWindowModality(0)
     if self.firstShow:
          inet = internet_on( proxyUrl=self.proxy, port=self.port, timeout=self.timeout )
          if inet:
             self.ui.GDIThemaCbx.addItems( ['']+ self.md.list_GDI_theme() )
             self.ui.organisatiesCbx.addItems( ['']+ self.md.list_organisations() )
             keywords = sorted( self.md.list_suggestionKeyword() ) 
             self.completerModel.setStringList( keywords )
             self.bronnen = self.md.list_bronnen()
             self.ui.bronCbx.addItems( ['']+ [ n[1] for n in self.bronnen] )
             self.ui.typeCbx.addItems(['']+  [ n[0] for n in self.md.dataTypes])                
             
             self.ui.INSPIREannexCbx.addItems( ['']+ self.md.inspireannex )
             self.ui.INSPIREserviceCbx.addItems( ['']+ self.md.inspireServiceTypes )
             self.ui.INSPIREthemaCbx.addItems( ['']+ self.md.list_inspire_theme() )
             self.firstShow = False      
          else:
             self.bar.pushMessage(
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", "Waarschuwing "), 
               QtCore.QCoreApplication.translate("geopunt4QgisPoidialog", 
                 "Kan geen verbing maken met het internet."), level=QgsMessageBar.WARNING, duration=3)