726 @param path full directory path for the new form file |
726 @param path full directory path for the new form file |
727 @type str |
727 @type str |
728 """ |
728 """ |
729 from .FormSelectionDialog import FormSelectionDialog |
729 from .FormSelectionDialog import FormSelectionDialog |
730 |
730 |
731 dlg = FormSelectionDialog() |
731 dlg = FormSelectionDialog(parent=self.__ui) |
732 if dlg.exec() == QDialog.DialogCode.Accepted: |
732 if dlg.exec() == QDialog.DialogCode.Accepted: |
733 template = dlg.getTemplateText() |
733 template = dlg.getTemplateText() |
734 |
734 |
735 fileFilters = self.tr( |
735 fileFilters = self.tr( |
736 "Chameleon Templates (*.pt);;" |
736 "Chameleon Templates (*.pt);;" |
1063 "{1}</a></td></tr>" |
1063 "{1}</a></td></tr>" |
1064 "</table></p>" |
1064 "</table></p>" |
1065 ).format(version, url), |
1065 ).format(version, url), |
1066 modal=True, |
1066 modal=True, |
1067 buttons=EricMessageBox.Ok, |
1067 buttons=EricMessageBox.Ok, |
|
1068 parent=self.__ui, |
1068 ) |
1069 ) |
1069 msgBox.setIconPixmap( |
1070 msgBox.setIconPixmap( |
1070 EricPixmapCache.getPixmap( |
1071 EricPixmapCache.getPixmap( |
1071 os.path.join( |
1072 os.path.join( |
1072 "ProjectPyramid", "icons", "pyramid64-{0}".format(self.__iconSuffix) |
1073 "ProjectPyramid", "icons", "pyramid64-{0}".format(self.__iconSuffix) |
1157 """ |
1158 """ |
1158 Private slot to create a new Pyramid project. |
1159 Private slot to create a new Pyramid project. |
1159 """ |
1160 """ |
1160 from .CreateParametersDialog import CreateParametersDialog |
1161 from .CreateParametersDialog import CreateParametersDialog |
1161 |
1162 |
1162 dlg = CreateParametersDialog(self.__ui) |
1163 dlg = CreateParametersDialog(parent=self.__ui) |
1163 if dlg.exec() == QDialog.DialogCode.Accepted: |
1164 if dlg.exec() == QDialog.DialogCode.Accepted: |
1164 template, version, overwrite, contextData = dlg.getData() |
1165 template, version, overwrite, contextData = dlg.getData() |
1165 |
1166 |
1166 cmd = self.getPyramidCommand("cookiecutter") |
1167 cmd = self.getPyramidCommand("cookiecutter") |
1167 args = ["--no-input"] |
1168 args = ["--no-input"] |
1584 " project created yet. Aborting..." |
1585 " project created yet. Aborting..." |
1585 ), |
1586 ), |
1586 ) |
1587 ) |
1587 return |
1588 return |
1588 |
1589 |
1589 dlg = DistributionTypeSelectionDialog(self, projectPath, self.__ui) |
1590 dlg = DistributionTypeSelectionDialog(self, projectPath, parent=self.__ui) |
1590 if dlg.exec() == QDialog.DialogCode.Accepted: |
1591 if dlg.exec() == QDialog.DialogCode.Accepted: |
1591 formats = dlg.getFormats() |
1592 formats = dlg.getFormats() |
1592 cmd = self.getPyramidCommand( |
1593 cmd = self.getPyramidCommand( |
1593 "python", virtualEnv=self.getProjectVirtualEnvironment() |
1594 "python", virtualEnv=self.getProjectVirtualEnvironment() |
1594 ) |
1595 ) |
1599 args.append("--formats={0}".format(",".join(formats))) |
1600 args.append("--formats={0}".format(",".join(formats))) |
1600 |
1601 |
1601 dia = PyramidDialog( |
1602 dia = PyramidDialog( |
1602 title, |
1603 title, |
1603 msgSuccess=self.tr("Python distribution file built successfully."), |
1604 msgSuccess=self.tr("Python distribution file built successfully."), |
|
1605 parent=self.__ui, |
1604 ) |
1606 ) |
1605 res = dia.startProcess(cmd, args, projectPath) |
1607 res = dia.startProcess(cmd, args, projectPath) |
1606 if res: |
1608 if res: |
1607 dia.exec() |
1609 dia.exec() |
1608 |
1610 |
1643 ) |
1645 ) |
1644 args = [] |
1646 args = [] |
1645 args.append("development.ini") |
1647 args.append("development.ini") |
1646 args.append(url) |
1648 args.append(url) |
1647 |
1649 |
1648 dia = PyramidDialog(title, fixed=True, linewrap=False) |
1650 dia = PyramidDialog(title, fixed=True, linewrap=False, parent=self.__ui) |
1649 res = dia.startProcess(cmd, args, projectPath) |
1651 res = dia.startProcess(cmd, args, projectPath) |
1650 if res: |
1652 if res: |
1651 dia.exec() |
1653 dia.exec() |
1652 |
1654 |
1653 def __showRoutes(self): |
1655 def __showRoutes(self): |
1697 "ptweens", virtualEnv=self.getProjectVirtualEnvironment() |
1699 "ptweens", virtualEnv=self.getProjectVirtualEnvironment() |
1698 ) |
1700 ) |
1699 args = [] |
1701 args = [] |
1700 args.append("development.ini") |
1702 args.append("development.ini") |
1701 |
1703 |
1702 dia = PyramidDialog(title, fixed=True, linewrap=False) |
1704 dia = PyramidDialog(title, fixed=True, linewrap=False, parent=self.__ui) |
1703 res = dia.startProcess(cmd, args, projectPath) |
1705 res = dia.startProcess(cmd, args, projectPath) |
1704 if res: |
1706 if res: |
1705 dia.exec() |
1707 dia.exec() |
1706 |
1708 |
1707 ################################################################## |
1709 ################################################################## |
1823 args = [] |
1825 args = [] |
1824 args.append("setup.py") |
1826 args.append("setup.py") |
1825 args.append("extract_messages") |
1827 args.append("extract_messages") |
1826 |
1828 |
1827 dia = PyramidDialog( |
1829 dia = PyramidDialog( |
1828 title, msgSuccess=self.tr("\nMessages extracted successfully.") |
1830 title, |
|
1831 msgSuccess=self.tr("\nMessages extracted successfully."), |
|
1832 parent=self.__ui, |
1829 ) |
1833 ) |
1830 res = dia.startProcess(cmd, args, projectPath) |
1834 res = dia.startProcess(cmd, args, projectPath) |
1831 if res: |
1835 if res: |
1832 dia.exec() |
1836 dia.exec() |
1833 self.__ericProject.appendFile(os.path.join(projectPath, potFile)) |
1837 self.__ericProject.appendFile(os.path.join(projectPath, potFile)) |
1859 args.append("init_catalog") |
1863 args.append("init_catalog") |
1860 args.append("-l") |
1864 args.append("-l") |
1861 args.append(code) |
1865 args.append(code) |
1862 |
1866 |
1863 dia = PyramidDialog( |
1867 dia = PyramidDialog( |
1864 title, msgSuccess=self.tr("\nMessage catalog initialized successfully.") |
1868 title, |
|
1869 msgSuccess=self.tr("\nMessage catalog initialized successfully."), |
|
1870 parent=self.__ui, |
1865 ) |
1871 ) |
1866 res = dia.startProcess(cmd, args, projectPath) |
1872 res = dia.startProcess(cmd, args, projectPath) |
1867 if res: |
1873 if res: |
1868 dia.exec() |
1874 dia.exec() |
1869 |
1875 |
1897 args = [] |
1903 args = [] |
1898 args.append("setup.py") |
1904 args.append("setup.py") |
1899 args.append("compile_catalog") |
1905 args.append("compile_catalog") |
1900 |
1906 |
1901 dia = PyramidDialog( |
1907 dia = PyramidDialog( |
1902 title, msgSuccess=self.tr("\nMessage catalogs compiled successfully.") |
1908 title, |
|
1909 msgSuccess=self.tr("\nMessage catalogs compiled successfully."), |
|
1910 parent=self.__ui, |
1903 ) |
1911 ) |
1904 res = dia.startProcess(cmd, args, projectPath) |
1912 res = dia.startProcess(cmd, args, projectPath) |
1905 if res: |
1913 if res: |
1906 dia.exec() |
1914 dia.exec() |
1907 |
1915 |
1950 self.__ui, title, self.tr("No locales detected. Aborting...") |
1958 self.__ui, title, self.tr("No locales detected. Aborting...") |
1951 ) |
1959 ) |
1952 return |
1960 return |
1953 |
1961 |
1954 dia = PyramidDialog( |
1962 dia = PyramidDialog( |
1955 title, msgSuccess=self.tr("\nMessage catalogs compiled successfully.") |
1963 title, |
|
1964 msgSuccess=self.tr("\nMessage catalogs compiled successfully."), |
|
1965 parent=self.__ui, |
1956 ) |
1966 ) |
1957 res = dia.startBatchProcesses(argsLists, projectPath) |
1967 res = dia.startBatchProcesses(argsLists, projectPath) |
1958 if res: |
1968 if res: |
1959 dia.exec() |
1969 dia.exec() |
1960 |
1970 |
1989 args = [] |
1999 args = [] |
1990 args.append("setup.py") |
2000 args.append("setup.py") |
1991 args.append("update_catalog") |
2001 args.append("update_catalog") |
1992 |
2002 |
1993 dia = PyramidDialog( |
2003 dia = PyramidDialog( |
1994 title, msgSuccess=self.tr("\nMessage catalogs updated successfully.") |
2004 title, |
|
2005 msgSuccess=self.tr("\nMessage catalogs updated successfully."), |
|
2006 parent=self.__ui, |
1995 ) |
2007 ) |
1996 res = dia.startProcess(cmd, args, projectPath) |
2008 res = dia.startProcess(cmd, args, projectPath) |
1997 if res: |
2009 if res: |
1998 dia.exec() |
2010 dia.exec() |
1999 |
2011 |
2036 self.__ui, title, self.tr("No locales detected. Aborting...") |
2048 self.__ui, title, self.tr("No locales detected. Aborting...") |
2037 ) |
2049 ) |
2038 return |
2050 return |
2039 |
2051 |
2040 dia = PyramidDialog( |
2052 dia = PyramidDialog( |
2041 title, msgSuccess=self.tr("\nMessage catalogs updated successfully.") |
2053 title, |
|
2054 msgSuccess=self.tr("\nMessage catalogs updated successfully."), |
|
2055 parent=self.__ui, |
2042 ) |
2056 ) |
2043 res = dia.startBatchProcesses(argsLists, projectPath) |
2057 res = dia.startBatchProcesses(argsLists, projectPath) |
2044 if res: |
2058 if res: |
2045 dia.exec() |
2059 dia.exec() |
2046 |
2060 |
2140 cmd = self.__getInitDbCommand() |
2154 cmd = self.__getInitDbCommand() |
2141 args = [] |
2155 args = [] |
2142 args.append("development.ini") |
2156 args.append("development.ini") |
2143 |
2157 |
2144 dia = PyramidDialog( |
2158 dia = PyramidDialog( |
2145 title, msgSuccess=self.tr("Database initialized successfully.") |
2159 title, |
|
2160 msgSuccess=self.tr("Database initialized successfully."), |
|
2161 parent=self.__ui, |
2146 ) |
2162 ) |
2147 res = dia.startProcess(cmd, args, projectPath) |
2163 res = dia.startProcess(cmd, args, projectPath) |
2148 if res: |
2164 if res: |
2149 dia.exec() |
2165 dia.exec() |
2150 |
2166 |