6 """ |
6 """ |
7 Module implementing the add project dialog. |
7 Module implementing the add project dialog. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
|
11 |
|
12 import os |
11 |
13 |
12 from PyQt4.QtCore import pyqtSlot |
14 from PyQt4.QtCore import pyqtSlot |
13 from PyQt4.QtGui import QDialog, QDialogButtonBox |
15 from PyQt4.QtGui import QDialog, QDialogButtonBox |
14 |
16 |
15 from E5Gui.E5Completers import E5FileCompleter |
17 from E5Gui.E5Completers import E5FileCompleter |
96 if not self.uid: |
98 if not self.uid: |
97 # new project entry |
99 # new project entry |
98 from PyQt4.QtCore import QUuid |
100 from PyQt4.QtCore import QUuid |
99 self.uid = QUuid.createUuid().toString() |
101 self.uid = QUuid.createUuid().toString() |
100 |
102 |
|
103 filename = Utilities.toNativeSeparators(self.filenameEdit.text()) |
|
104 if not os.path.isabs(filename): |
|
105 filename = Utilities.toNativeSeparators( |
|
106 os.path.join(self.startdir, filename)) |
101 return (self.nameEdit.text(), |
107 return (self.nameEdit.text(), |
102 self.filenameEdit.text(), |
108 filename, |
103 self.masterCheckBox.isChecked(), |
109 self.masterCheckBox.isChecked(), |
104 self.descriptionEdit.toPlainText(), |
110 self.descriptionEdit.toPlainText(), |
105 self.categoryComboBox.currentText(), |
111 self.categoryComboBox.currentText(), |
106 self.uid) |
112 self.uid) |
107 |
113 |