|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>eric4.Project.AddFileDialog</title> |
|
6 <style> |
|
7 body { |
|
8 background:white; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #4FA4FF; } |
|
14 h2 { color: white; background: #4FA4FF; } |
|
15 h3 { color: white; background: #00557F; } |
|
16 h4 { color: white; background: #00557F; } |
|
17 |
|
18 a { color: #AA5500; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric4.Project.AddFileDialog</h1> |
|
24 <p> |
|
25 Module implementing a dialog to add a file to the project. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#AddFileDialog">AddFileDialog</a></td> |
|
35 <td>Class implementing a dialog to add a file to the project.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="AddFileDialog" ID="AddFileDialog"></a> |
|
44 <h2>AddFileDialog</h2> |
|
45 <p> |
|
46 Class implementing a dialog to add a file to the project. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QDialog, Ui_AddFileDialog |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <h3>Methods</h3> |
|
55 <table> |
|
56 <tr> |
|
57 <td><a href="#AddFileDialog.__init__">AddFileDialog</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#AddFileDialog.getData">getData</a></td> |
|
61 <td>Public slot to retrieve the dialogs data.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#AddFileDialog.on_sourceFileButton_clicked">on_sourceFileButton_clicked</a></td> |
|
64 <td>Private slot to display a file selection dialog.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#AddFileDialog.on_sourceFileEdit_textChanged">on_sourceFileEdit_textChanged</a></td> |
|
67 <td>Private slot to handle the source file text changed.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#AddFileDialog.on_targetDirButton_clicked">on_targetDirButton_clicked</a></td> |
|
70 <td>Private slot to display a directory selection dialog.</td> |
|
71 </tr> |
|
72 </table> |
|
73 <a NAME="AddFileDialog.__init__" ID="AddFileDialog.__init__"></a> |
|
74 <h4>AddFileDialog (Constructor)</h4> |
|
75 <b>AddFileDialog</b>(<i>pro, parent = None, filter = None, name = None, startdir = None</i>) |
|
76 <p> |
|
77 Constructor |
|
78 </p><dl> |
|
79 <dt><i>pro</i></dt> |
|
80 <dd> |
|
81 reference to the project object |
|
82 </dd><dt><i>parent</i></dt> |
|
83 <dd> |
|
84 parent widget of this dialog (QWidget) |
|
85 </dd><dt><i>filter</i></dt> |
|
86 <dd> |
|
87 filter specification for the file to add (string) |
|
88 </dd><dt><i>name</i></dt> |
|
89 <dd> |
|
90 name of this dialog (string) |
|
91 </dd><dt><i>startdir</i></dt> |
|
92 <dd> |
|
93 start directory for the selection dialog |
|
94 </dd> |
|
95 </dl><a NAME="AddFileDialog.getData" ID="AddFileDialog.getData"></a> |
|
96 <h4>AddFileDialog.getData</h4> |
|
97 <b>getData</b>(<i></i>) |
|
98 <p> |
|
99 Public slot to retrieve the dialogs data. |
|
100 </p><dl> |
|
101 <dt>Returns:</dt> |
|
102 <dd> |
|
103 tuple of three values (list of string, string, boolean) giving the |
|
104 source files, the target directory and a flag telling, whether |
|
105 the files shall be added as source code |
|
106 </dd> |
|
107 </dl><a NAME="AddFileDialog.on_sourceFileButton_clicked" ID="AddFileDialog.on_sourceFileButton_clicked"></a> |
|
108 <h4>AddFileDialog.on_sourceFileButton_clicked</h4> |
|
109 <b>on_sourceFileButton_clicked</b>(<i></i>) |
|
110 <p> |
|
111 Private slot to display a file selection dialog. |
|
112 </p><a NAME="AddFileDialog.on_sourceFileEdit_textChanged" ID="AddFileDialog.on_sourceFileEdit_textChanged"></a> |
|
113 <h4>AddFileDialog.on_sourceFileEdit_textChanged</h4> |
|
114 <b>on_sourceFileEdit_textChanged</b>(<i>sfile</i>) |
|
115 <p> |
|
116 Private slot to handle the source file text changed. |
|
117 </p><p> |
|
118 If the entered source directory is a subdirectory of the current |
|
119 projects main directory, the target directory path is synchronized. |
|
120 It is assumed, that the user wants to add a bunch of files to |
|
121 the project in place. |
|
122 </p><dl> |
|
123 <dt><i>sfile</i></dt> |
|
124 <dd> |
|
125 the text of the source file line edit (string) |
|
126 </dd> |
|
127 </dl><a NAME="AddFileDialog.on_targetDirButton_clicked" ID="AddFileDialog.on_targetDirButton_clicked"></a> |
|
128 <h4>AddFileDialog.on_targetDirButton_clicked</h4> |
|
129 <b>on_targetDirButton_clicked</b>(<i></i>) |
|
130 <p> |
|
131 Private slot to display a directory selection dialog. |
|
132 </p> |
|
133 <div align="right"><a href="#top">Up</a></div> |
|
134 <hr /> |
|
135 </body></html> |