Exemple #1
0
 def __ammendToolTip(self):
     """
     Private slot to add the primary keyboard accelerator to the tooltip.
     """
     shortcut = self.shortcut().toString(QKeySequence.NativeText)
     if shortcut:
         if qApp.isLeftToRight():
             fmt = "{0} ({1})"
         else:
             fmt = "({1}) {0}"
         self.setToolTip(fmt.format(self.iconText(), shortcut))
Exemple #2
0
 def __ammendToolTip(self):
     """
     Private slot to add the primary keyboard accelerator to the tooltip.
     """
     shortcut = self.shortcut().toString(QKeySequence.NativeText)
     if shortcut:
         if qApp.isLeftToRight():
             fmt = "{0} ({1})"
         else:
             fmt = "({1}) {0}"
         self.setToolTip(fmt.format(self.iconText(), shortcut))
Exemple #3
0
    def __startPage(self):
        """
        Private method to build the Start page.
        
        @return built Start page
        @rtype str
        """
        page = readAllFileContents(":/html/startPage.html")
        page = page.replace("@FAVICON@", "qrc:icons/ericWeb16.png")
        page = page.replace("@IMAGE@", "qrc:icons/ericWeb32.png")
        page = page.replace("@TITLE@",
                            self.tr("Welcome to eric6 Web Browser!"))
        page = page.replace("@ERIC_LINK@", self.tr("About eric6"))
        page = page.replace("@HEADER_TITLE@", self.tr("eric6 Web Browser"))
        page = page.replace("@SUBMIT@", self.tr("Search!"))
        if qApp.isLeftToRight():
            ltr = "LTR"
        else:
            ltr = "RTL"
        page = page.replace("@QT_LAYOUT_DIRECTION@", ltr)

        return page