10 import os |
10 import os |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot |
12 from PyQt4.QtCore import pyqtSlot |
13 from PyQt4.QtGui import QDialog |
13 from PyQt4.QtGui import QDialog |
14 |
14 |
15 from E5Gui.E5Completers import E5DirCompleter |
15 from E5Gui.E5Completers import E5DirCompleter, E5FileCompleter |
16 from E5Gui import E5FileDialog |
16 from E5Gui import E5FileDialog |
17 |
17 |
18 from .Ui_AddFileDialog import Ui_AddFileDialog |
18 from .Ui_AddFileDialog import Ui_AddFileDialog |
19 |
19 |
20 import Utilities |
20 import Utilities |
|
21 import UI.PixmapCache |
21 |
22 |
22 |
23 |
23 class AddFileDialog(QDialog, Ui_AddFileDialog): |
24 class AddFileDialog(QDialog, Ui_AddFileDialog): |
24 """ |
25 """ |
25 Class implementing a dialog to add a file to the project. |
26 Class implementing a dialog to add a file to the project. |
38 super().__init__(parent) |
39 super().__init__(parent) |
39 if name: |
40 if name: |
40 self.setObjectName(name) |
41 self.setObjectName(name) |
41 self.setupUi(self) |
42 self.setupUi(self) |
42 |
43 |
|
44 self.targetDirButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
45 self.sourceFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
46 |
43 self.targetDirCompleter = E5DirCompleter(self.targetDirEdit) |
47 self.targetDirCompleter = E5DirCompleter(self.targetDirEdit) |
|
48 self.sourceFileCompleter = E5FileCompleter(self.sourceFileCompleter) |
44 |
49 |
45 self.targetDirEdit.setText(pro.ppath) |
50 self.targetDirEdit.setText(pro.ppath) |
46 self.filter = filter |
51 self.filter = filter |
47 self.ppath = pro.ppath |
52 self.ppath = pro.ppath |
48 self.startdir = startdir |
53 self.startdir = startdir |