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