示例#1
0
class MTL:

    def __init__(self,iface):
        self.iface=iface
        self.dlg = MTLMainDlg()

    def initGui(self):

        dirPath = os.path.dirname(os.path.abspath(__file__))
        self.action = QAction(u"MODIS Track L1 L2", self.iface.mainWindow())
        self.action.setIcon(QIcon(dirPath + "/icon.png"))
        self.iface.addPluginToVectorMenu(u"MODIS Track L1 L2",self.action)
        self.action.setStatusTip(u"MODIS Track L1 L2")
        self.iface.addVectorToolBarIcon(self.action)
        QObject.connect(self.action, SIGNAL("triggered()"), self.run)

        self.aboutAction = QAction(u"About", self.iface.mainWindow())
        QObject.connect(self.aboutAction, SIGNAL("triggered()"), self.about)
        self.iface.addPluginToVectorMenu(u"MODIS Track L1 L2", self.aboutAction)

    def unload(self):
        self.iface.removeVectorToolBarIcon(self.action)
        self.iface.removePluginVectorMenu(u"MODIS Track L1 L2",self.action)

        self.iface.removePluginVectorMenu(u"MODIS Track L1 L2",self.aboutAction)

    def run(self):
        self.MTLMainDlg = MTLMainDlg()
        self.MTLMainDlg.show()

    def about(self):
        self.MTLAboutDlg = MTLAboutDlg()
        self.MTLAboutDlg.show()
示例#2
0
 def about(self):
     self.MTLAboutDlg = MTLAboutDlg()
     self.MTLAboutDlg.show()