19 |
19 |
20 from E5Gui.E5Completers import E5DirCompleter |
20 from E5Gui.E5Completers import E5DirCompleter |
21 from E5Gui import E5FileDialog |
21 from E5Gui import E5FileDialog |
22 |
22 |
23 from .Ui_EricdocConfigDialog import Ui_EricdocConfigDialog |
23 from .Ui_EricdocConfigDialog import Ui_EricdocConfigDialog |
24 from DocumentationTools.Config import eric5docDefaultColors, \ |
24 from DocumentationTools.Config import eric6docDefaultColors, \ |
25 eric5docColorParameterNames |
25 eric6docColorParameterNames |
26 import Utilities |
26 import Utilities |
27 import UI.PixmapCache |
27 import UI.PixmapCache |
28 |
28 |
29 from eric5config import getConfig |
29 from eric6config import getConfig |
30 |
30 |
31 |
31 |
32 class EricdocConfigDialog(QDialog, Ui_EricdocConfigDialog): |
32 class EricdocConfigDialog(QDialog, Ui_EricdocConfigDialog): |
33 """ |
33 """ |
34 Class implementing a dialog to enter the parameters for eric5_doc. |
34 Class implementing a dialog to enter the parameters for eric6_doc. |
35 """ |
35 """ |
36 def __init__(self, project, parms=None, parent=None): |
36 def __init__(self, project, parms=None, parent=None): |
37 """ |
37 """ |
38 Constructor |
38 Constructor |
39 |
39 |
75 '''</body></html>''' |
75 '''</body></html>''' |
76 ) |
76 ) |
77 |
77 |
78 # get a copy of the defaults to store the user settings |
78 # get a copy of the defaults to store the user settings |
79 self.parameters = copy.deepcopy(self.defaults) |
79 self.parameters = copy.deepcopy(self.defaults) |
80 self.colors = eric5docDefaultColors.copy() |
80 self.colors = eric6docDefaultColors.copy() |
81 |
81 |
82 # combine it with the values of parms |
82 # combine it with the values of parms |
83 if parms is not None: |
83 if parms is not None: |
84 for key, value in list(parms.items()): |
84 for key, value in list(parms.items()): |
85 if key.endswith("Color"): |
85 if key.endswith("Color"): |
173 args = [] |
173 args = [] |
174 |
174 |
175 # 1. the program name |
175 # 1. the program name |
176 args.append(sys.executable) |
176 args.append(sys.executable) |
177 args.append( |
177 args.append( |
178 Utilities.normabsjoinpath(getConfig('ericDir'), "eric5_doc.py")) |
178 Utilities.normabsjoinpath(getConfig('ericDir'), "eric6_doc.py")) |
179 |
179 |
180 # 2. the commandline options |
180 # 2. the commandline options |
181 # 2a. general commandline options |
181 # 2a. general commandline options |
182 if self.parameters['outputDirectory'] != \ |
182 if self.parameters['outputDirectory'] != \ |
183 self.defaults['outputDirectory']: |
183 self.defaults['outputDirectory']: |
231 args.append(self.parameters['cssFile']) |
231 args.append(self.parameters['cssFile']) |
232 else: |
232 else: |
233 args.append( |
233 args.append( |
234 os.path.join(self.ppath, self.parameters['cssFile'])) |
234 os.path.join(self.ppath, self.parameters['cssFile'])) |
235 for key, value in list(self.colors.items()): |
235 for key, value in list(self.colors.items()): |
236 if self.colors[key] != eric5docDefaultColors[key]: |
236 if self.colors[key] != eric6docDefaultColors[key]: |
237 parms[key] = self.colors[key] |
237 parms[key] = self.colors[key] |
238 args.append("--{0}={1}".format( |
238 args.append("--{0}={1}".format( |
239 eric5docColorParameterNames[key], self.colors[key])) |
239 eric6docColorParameterNames[key], self.colors[key])) |
240 |
240 |
241 # 2c. QtHelp commandline options |
241 # 2c. QtHelp commandline options |
242 parms['qtHelpEnabled'] = self.parameters['qtHelpEnabled'] |
242 parms['qtHelpEnabled'] = self.parameters['qtHelpEnabled'] |
243 if self.parameters['qtHelpEnabled']: |
243 if self.parameters['qtHelpEnabled']: |
244 args.append('--create-qhp') |
244 args.append('--create-qhp') |