Exemple #1
0
    def processStyles(self, style_path):
        """ Object method
            Params: style_path (str) -> The style's path
            Return: None
            Applies the style of style_path to the documentation and copies it into the created dir.
        """
        style_name = os.path.basename(style_path)

        for html_file in self._htmlFiles:
            StyleHandler.setStyle(html_file, "'"+style_name+"'")

        shutil.copyfile(style_path, self._path + "/" + style_name)
Exemple #2
0
 def changeStyle(self, index):
     """ Object method
         Params: int index -> the index of the active tab
         Return: None
         Changes the style applied to the HTML files, using the index of the active tab.
         This method is called each time the active tab is changed.
         This applies a soft StyleSheet change (the HTML files are not modified).
     """
     new_name = "'" + QUrl.fromUserInput(os.path.realpath(self._styles[index]._path)).url() + "'"
     StyleHandler.setStyle(self._chosen_file.toLocalFile(), new_name)
     self.tab_bar.widget(index).load(self._chosen_file)
     old_name = new_name