16 |
16 |
17 import QScintilla.Lexers |
17 import QScintilla.Lexers |
18 |
18 |
19 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog |
19 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog |
20 |
20 |
|
21 |
21 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog): |
22 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog): |
22 """ |
23 """ |
23 Class implementing a dialog to enter lexer associations for the project. |
24 Class implementing a dialog to enter lexer associations for the project. |
24 """ |
25 """ |
25 def __init__(self, project, parent = None): |
26 def __init__(self, project, parent=None): |
26 """ |
27 """ |
27 Constructor |
28 Constructor |
28 |
29 |
29 @param project reference to the project object |
30 @param project reference to the project object |
30 @param parent reference to the parent widget (QWidget) |
31 @param parent reference to the parent widget (QWidget) |
80 del itm |
81 del itm |
81 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
82 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
82 self.editorFileExtEdit.clear() |
83 self.editorFileExtEdit.clear() |
83 self.editorLexerCombo.setCurrentIndex(0) |
84 self.editorLexerCombo.setCurrentIndex(0) |
84 self.pygmentsLexerCombo.setCurrentIndex(0) |
85 self.pygmentsLexerCombo.setCurrentIndex(0) |
85 self.editorLexerList.sortItems(self.editorLexerList.sortColumn(), |
86 self.editorLexerList.sortItems(self.editorLexerList.sortColumn(), |
86 self.editorLexerList.header().sortIndicatorOrder()) |
87 self.editorLexerList.header().sortIndicatorOrder()) |
87 |
88 |
88 @pyqtSlot() |
89 @pyqtSlot() |
89 def on_deleteLexerButton_clicked(self): |
90 def on_deleteLexerButton_clicked(self): |
90 """ |
91 """ |