Esempio n. 1
0
    def CreateMap(self):
        species = self.lblCommonName.text()

        filter = code_Filter.Filter()
        filter.setSpeciesName(species)

        sub = code_Web.Web()
        sub.mdiParent = self.mdiParent

        sub.LoadLocationsMap(filter)

        self.parent().parent().addSubWindow(sub)
        self.mdiParent.PositionChildWindow(sub, self)
        sub.show()
Esempio n. 2
0
    def CreateWebPageForAudubon(self):
        speciesCommonName = self.lblCommonName.text()

        if "(" in speciesCommonName:
            speciesCommonName = speciesCommonName.split(" (")[0]

        speciesCommonName = speciesCommonName.replace(" ", "-")
        speciesCommonName = speciesCommonName.replace("'", "")

        sub = code_Web.Web()
        sub.mdiParent = self.mdiParent
        sub.title = "Audubon: " + speciesCommonName
        url = ("http://www.audubon.org/field-guide/bird/" + speciesCommonName)
        sub.LoadWebPage(url)
        self.parent().parent().addSubWindow(sub)
        self.mdiParent.PositionChildWindow(sub, self)
        sub.show()
Esempio n. 3
0
    def CreateWebPageForWikipedia(self):

        speciesScientificName = self.lblScientificName.text()
        speciesCommonName = self.lblCommonName.text()

        if "(" in speciesCommonName:
            speciesCommonName = speciesCommonName.split(" (")[0]

        sub = code_Web.Web()
        sub.mdiParent = self.mdiParent
        sub.title = "Wikipedia: " + speciesCommonName
        url = ("https://en.wikipedia.org/wiki/" +
               speciesScientificName.split(" ")[0] + "_" +
               speciesScientificName.split(" ")[1])
        sub.LoadWebPage(url)
        self.parent().parent().addSubWindow(sub)
        self.mdiParent.PositionChildWindow(sub, self)
        sub.show()
Esempio n. 4
0
    def CreateWebPageForAllAboutBirds(self):

        speciesCommonName = self.lblCommonName.text()

        if "(" in speciesCommonName:
            speciesCommonName = speciesCommonName.split(" (")[0]

        speciesCommonName = speciesCommonName.replace(" ", "_")
        speciesCommonName = speciesCommonName.replace("'", "")

        sub = code_Web.Web()
        sub.mdiParent = self.mdiParent
        sub.title = "All About Birds: " + speciesCommonName
        url = ("https://www.allaboutbirds.org/guide/" + speciesCommonName +
               "/id")
        sub.LoadWebPage(url)
        self.parent().parent().addSubWindow(sub)
        self.mdiParent.PositionChildWindow(sub, self)
        sub.show()
Esempio n. 5
0
    def CreateWebPageForPhotos(self):

        speciesScientificName = self.lblScientificName.text()
        speciesCommonName = self.lblCommonName.text()

        sub = code_Web.Web()
        sub.mdiParent = self.mdiParent
        sub.title = "Macaulay Library Photos: " + speciesCommonName
        url = (
            "https://search.macaulaylibrary.org/catalog?searchField=species&q="
            + speciesScientificName.split(" ")[0] + "+" +
            speciesScientificName.split(" ")[1])

        if speciesScientificName.count(" ") == 2:
            url = url + "%20" + speciesScientificName.split(" ")[2]

        sub.LoadWebPage(url)
        self.parent().parent().addSubWindow(sub)
        self.mdiParent.PositionChildWindow(sub, self)
        sub.show()