UI/Previewers/PreviewerHTML.py

changeset 3591
2f2a4a76dd22
parent 3539
0c2dc1446ebf
child 3656
441956d8fce5
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
95 Preferences.setUI("ShowFilePreviewSSI", checked) 95 Preferences.setUI("ShowFilePreviewSSI", checked)
96 self.processEditor() 96 self.processEditor()
97 97
98 def processEditor(self, editor=None): 98 def processEditor(self, editor=None):
99 """ 99 """
100 Private slot to process an editor's text. 100 Public slot to process an editor's text.
101 101
102 @param editor editor to be processed (Editor) 102 @param editor editor to be processed (Editor)
103 """ 103 """
104 if editor is None: 104 if editor is None:
105 editor = self.__previewedEditor 105 editor = self.__previewedEditor
239 239
240 self.__lock = threading.Lock() 240 self.__lock = threading.Lock()
241 241
242 def process(self, filePath, language, text, ssiEnabled, rootPath): 242 def process(self, filePath, language, text, ssiEnabled, rootPath):
243 """ 243 """
244 Convert the given text to HTML. 244 Public method to convert the given text to HTML.
245 245
246 @param filePath file path of the text (string) 246 @param filePath file path of the text (string)
247 @param language language of the text (string) 247 @param language language of the text (string)
248 @param text text to be processed (string) 248 @param text text to be processed (string)
249 @param ssiEnabled flag indicating to do some (limited) SSI processing 249 @param ssiEnabled flag indicating to do some (limited) SSI processing
260 if not self.isRunning(): 260 if not self.isRunning():
261 self.start(QThread.LowPriority) 261 self.start(QThread.LowPriority)
262 262
263 def run(self): 263 def run(self):
264 """ 264 """
265 Thread function to convert the stored data. 265 Public thread method to convert the stored data.
266 """ 266 """
267 while True: 267 while True:
268 # exits with break 268 # exits with break
269 with self.__lock: 269 with self.__lock:
270 filePath = self.__filePath 270 filePath = self.__filePath

eric ide

mercurial