def initGui(self):
        """Create the menu entries and toolbar icons inside the QGIS GUI."""

        icon_path = ':/vfkPluginIcon.png'
        self.add_action(icon_path,
                        text=u'Otevřít prohlížeč VFK',
                        callback=self.run,
                        whats_this=u'VFK Plugin',
                        parent=self.iface.mainWindow())

        self.myDockWidget = MainApp(self.iface)
 def run(self):
     """
     Run method that performs all the real work
     """
     # show the dialog
     if self.myDockWidget.isVisible():
         self.myDockWidget.hide()
     else:
         self.myDockWidget.close()
         self.myDockWidget = None
         self.myDockWidget = MainApp(self.iface)
         self.iface.addDockWidget(Qt.TopDockWidgetArea, self.myDockWidget)
         self.myDockWidget.show()
예제 #3
0
from mainApp import MainApp

run_flask = False

printOutput = ""
newInput = ""
skipMain = False

def cust_print(text):
    global printOutput
    printOutput = printOutput + str(text) + "<br />\n"
    print(text)

def cust_input():
    global newInput, skipMain, run_flask
    if run_flask:
        skipMain = True
        from main import _get_data
        import sys
        sys.exit()
        # while newInput == "":
        #     continue
        return newInput
    else:
        return input("> ")

mainApp = MainApp()