5 |
5 |
6 """ |
6 """ |
7 Module implementing the Editor File Handling configuration page. |
7 Module implementing the Editor File Handling configuration page. |
8 """ |
8 """ |
9 |
9 |
|
10 import sys |
10 |
11 |
11 from PyQt5.QtCore import pyqtSlot |
12 from PyQt5.QtCore import pyqtSlot |
12 from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
13 from PyQt5.QtWidgets import QListWidgetItem, QInputDialog, QLineEdit |
13 from PyQt5.Qsci import QsciScintilla |
14 from PyQt5.Qsci import QsciScintilla |
14 |
15 |
15 from E5Gui import E5MessageBox |
16 from E5Gui import E5MessageBox |
|
17 from E5Gui.E5Application import e5App |
16 |
18 |
17 from .ConfigurationPageBase import ConfigurationPageBase |
19 from .ConfigurationPageBase import ConfigurationPageBase |
18 from .Ui_EditorFilePage import Ui_EditorFilePage |
20 from .Ui_EditorFilePage import Ui_EditorFilePage |
19 |
21 |
20 from Utilities import supportedCodecs |
22 from Utilities import supportedCodecs |
353 @param previous previous current item (QListWidgetItem) |
355 @param previous previous current item (QListWidgetItem) |
354 """ |
356 """ |
355 self.editFileFilterButton.setEnabled(current is not None) |
357 self.editFileFilterButton.setEnabled(current is not None) |
356 self.deleteFileFilterButton.setEnabled(current is not None) |
358 self.deleteFileFilterButton.setEnabled(current is not None) |
357 |
359 |
|
360 @pyqtSlot() |
|
361 def on_previewMarkdownPyMdownInstallPushButton_clicked(self): |
|
362 """ |
|
363 Private slot to install the pymdown extensions package via pip. |
|
364 """ |
|
365 pip = e5App().getObject("Pip") |
|
366 pip.installPackages(["pymdown-extensions"], interpreter=sys.executable) |
|
367 |
358 |
368 |
359 def create(dlg): |
369 def create(dlg): |
360 """ |
370 """ |
361 Module function to create the configuration page. |
371 Module function to create the configuration page. |
362 |
372 |