src/eric7/Project/Project.py

branch
eric7
changeset 11217
856628e8a303
parent 11216
a1471981ef18
equal deleted inserted replaced
11216:a1471981ef18 11217:856628e8a303
332 self.__fileTypeCallbacks = {} 332 self.__fileTypeCallbacks = {}
333 self.__lexerAssociationCallbacks = {} 333 self.__lexerAssociationCallbacks = {}
334 self.__binaryTranslationsCallbacks = {} 334 self.__binaryTranslationsCallbacks = {}
335 335
336 self.__projectTypes = { 336 self.__projectTypes = {
337 "PyQt5": self.tr("PyQt5 GUI"),
338 "PyQt5C": self.tr("PyQt5 Console"),
339 "PyQt6": self.tr("PyQt6 GUI"), 337 "PyQt6": self.tr("PyQt6 GUI"),
340 "PyQt6C": self.tr("PyQt6 Console"), 338 "PyQt6C": self.tr("PyQt6 Console"),
341 "E7Plugin": self.tr("Eric7 Plugin"), 339 "E7Plugin": self.tr("Eric7 Plugin"),
342 "Console": self.tr("Console"), 340 "Console": self.tr("Console"),
343 "Other": self.tr("Other"), 341 "Other": self.tr("Other"),
344 } 342 }
345 343
346 self.__projectProgLanguages = { 344 self.__projectProgLanguages = {
347 "Python3": [ 345 "Python3": [
348 "PyQt5",
349 "PyQt5C",
350 "PyQt6", 346 "PyQt6",
351 "PyQt6C", 347 "PyQt6C",
352 "E7Plugin", 348 "E7Plugin",
353 "Console", 349 "Console",
354 "Other", 350 "Other",
886 fileTypesDict["*{0}".format(ext)] = "SOURCES" 882 fileTypesDict["*{0}".format(ext)] = "SOURCES"
887 883
888 # Forms 884 # Forms
889 if projectType in [ 885 if projectType in [
890 "E7Plugin", 886 "E7Plugin",
891 "PyQt5",
892 "PyQt6", 887 "PyQt6",
893 "PySide6", 888 "PySide6",
894 ]: 889 ]:
895 fileTypesDict["*.ui"] = "FORMS" 890 fileTypesDict["*.ui"] = "FORMS"
896 891
897 # Resources 892 # Resources
898 if projectType in [ 893 if projectType in [
899 "PyQt5",
900 "PyQt5C",
901 "PySide6", 894 "PySide6",
902 "PySide6C", 895 "PySide6C",
903 ]: 896 ]:
904 fileTypesDict["*.qrc"] = "RESOURCES" 897 fileTypesDict["*.qrc"] = "RESOURCES"
905 898
906 # Translations 899 # Translations
907 if projectType in [ 900 if projectType in [
908 "E7Plugin", 901 "E7Plugin",
909 "PyQt5",
910 "PyQt5C",
911 "PyQt6", 902 "PyQt6",
912 "PyQt6C", 903 "PyQt6C",
913 "PySide6", 904 "PySide6",
914 "PySide6C", 905 "PySide6C",
915 ]: 906 ]:
939 Public method to update the filetype associations with new default 930 Public method to update the filetype associations with new default
940 values. 931 values.
941 """ 932 """
942 if self.__pdata["PROJECTTYPE"] in [ 933 if self.__pdata["PROJECTTYPE"] in [
943 "E7Plugin", 934 "E7Plugin",
944 "PyQt5",
945 "PyQt5C",
946 "PyQt6", 935 "PyQt6",
947 "PyQt6C", 936 "PyQt6C",
948 "PySide6", 937 "PySide6",
949 "PySide6C", 938 "PySide6C",
950 ]: 939 ]:
1769 1758
1770 dlg = AddLanguageDialog(parent=self.parent()) 1759 dlg = AddLanguageDialog(parent=self.parent())
1771 if dlg.exec() == QDialog.DialogCode.Accepted: 1760 if dlg.exec() == QDialog.DialogCode.Accepted:
1772 lang = dlg.getSelectedLanguage() 1761 lang = dlg.getSelectedLanguage()
1773 if self.__pdata["PROJECTTYPE"] in [ 1762 if self.__pdata["PROJECTTYPE"] in [
1774 "PyQt5",
1775 "PyQt5C",
1776 "PyQt6", 1763 "PyQt6",
1777 "PyQt6C", 1764 "PyQt6C",
1778 "E7Plugin", 1765 "E7Plugin",
1779 "PySide6", 1766 "PySide6",
1780 "PySide6C", 1767 "PySide6C",

eric ide

mercurial