Exemple #1
0
    def initGui(self):
        self.settingsAction = QAction("Settings", self.iface.mainWindow())
        self.settingsAction.triggered.connect(self.onSettings)

        self.aboutAction = QAction("About", self.iface.mainWindow())
        self.aboutAction.triggered.connect(self.onAbout)

        self.helpAction = QAction("Help", self.iface.mainWindow())
        self.helpAction.triggered.connect(self.onHelp)

        self.loadAction = QAction("Load a GMLAS database",
                                  self.iface.mainWindow())
        self.loadAction.triggered.connect(self.onLoad)

        self.exportAction = QAction("Export a GMLAS database to GML",
                                    self.iface.mainWindow())
        self.exportAction.triggered.connect(self.onExport)

        self.wizardAction = QAction("Load (wizard)", self.iface.mainWindow())
        self.wizardAction.triggered.connect(self.onWizardLoad)

        self.iface.addPluginToMenu(plugin_name(), self.wizardAction)
        self.iface.addPluginToMenu(plugin_name(), self.loadAction)
        self.iface.addPluginToMenu(plugin_name(), self.exportAction)
        self.iface.addPluginToMenu(plugin_name(), self.settingsAction)
        self.iface.addPluginToMenu(plugin_name(), self.aboutAction)
        self.iface.addPluginToMenu(plugin_name(), self.helpAction)

        self.model_dlg = None
        self.model = None

        self.xml_widget_factory = XMLWidgetFactory()
        self.xml_widget_formatter = XMLWidgetFormatter()
        QgsGui.editorWidgetRegistry().registerWidget("XML",
                                                     self.xml_widget_factory)
        QgsApplication.fieldFormatterRegistry().addFieldFormatter(
            self.xml_widget_formatter)
Exemple #2
0
 def testMembers(self):
     self.assertTrue(QgsApplication.actionScopeRegistry())
     # self.assertTrue(QgsApplication.annotationRegistry()) NOT AVAILABLE IN BINDINGS
     self.assertTrue(QgsApplication.colorSchemeRegistry())
     self.assertTrue(QgsApplication.fieldFormatterRegistry())
     self.assertTrue(QgsApplication.gpsConnectionRegistry())
     self.assertTrue(QgsApplication.messageLog())
     self.assertTrue(QgsApplication.paintEffectRegistry())
     self.assertTrue(QgsApplication.pluginLayerRegistry())
     self.assertTrue(QgsApplication.processingRegistry())
     self.assertTrue(QgsApplication.profiler())
     # self.assertTrue(QgsApplication.rasterRendererRegistry()) NOT AVAILABLE IN BINDINGS
     self.assertTrue(QgsApplication.rendererRegistry())
     self.assertTrue(QgsApplication.svgCache())
     self.assertTrue(QgsApplication.symbolLayerRegistry())
     self.assertTrue(QgsApplication.taskManager())
 def testMembers(self):
     self.assertTrue(QgsApplication.actionScopeRegistry())
     # self.assertTrue(QgsApplication.annotationRegistry()) NOT AVAILABLE IN BINDINGS
     self.assertTrue(QgsApplication.colorSchemeRegistry())
     self.assertTrue(QgsApplication.fieldFormatterRegistry())
     self.assertTrue(QgsApplication.gpsConnectionRegistry())
     self.assertTrue(QgsApplication.messageLog())
     self.assertTrue(QgsApplication.paintEffectRegistry())
     self.assertTrue(QgsApplication.pluginLayerRegistry())
     self.assertTrue(QgsApplication.processingRegistry())
     self.assertTrue(QgsApplication.profiler())
     # self.assertTrue(QgsApplication.rasterRendererRegistry()) NOT AVAILABLE IN BINDINGS
     self.assertTrue(QgsApplication.rendererRegistry())
     self.assertTrue(QgsApplication.svgCache())
     self.assertTrue(QgsApplication.symbolLayerRegistry())
     self.assertTrue(QgsApplication.taskManager())